GET warehouses/get_stock_balance_per_product

Available from CRM.COM R9.0.0

This method returns information related with the stock balance of a specific product across all warehouses. 

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

product_identifier

(semi-optional)

Product Identifier  

The identifier of the product whose stock balance that should be returned as a result. The allowed product identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the product

code

(semi-optional)

String

The code of the product

alternative_code

(semi-optional)

String

The alternative code of  the product

product_type_identifier

(semi-optional)

Product Type Identifier

The identifier of the product type based on which the stock balance of all products of this type will be returned as a results. The allowed product type identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the product type

name

(semi-optional)

String

The name of the product type

alternative_code

(semi-optional)

String

The alternative code of  a product type

product_family_identifier

(semi-optional)

Product Family Identifier

The identifier of the product family based on which the stock balance of all products of this family will be returned as a results. The allowed product family identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The ID of the product family

name

(semi-optional)

String

The name of the product family

code

(semi-optional)

String

The code of  a product family

fields_set

(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.

Response Data

Name

Type

Description

quantity

Number

The stock balance of the product across all warehouses

number_of_products_included_in_bundles

Number

The number of items included in physical good bundles

productProduct ObjectThe product whose stock balance across all warehouses is calculated
stock_balance_per_warehouseSet of Stock Balance Per Warehouse ObjectsThe warehouses based on which the product's stock balance was calculated

Referred Objects Response Data

 product object response data
Name
Type
Description
IdStringThe ID of the product
codeStringThe code of product

alternative_code

String

The alternative code of product

description

String

The description of product

priority_levelInteger

The priority level of the product

Available from CRM.COM R12.3.0

global_rateGlobal Rate Object

The global rate of the retrieved product

Available from CRM.COM R15.0.0

product_typeProduct type objectThe type of the product

Referred Objects Response Data

 product_type object data response
NameType Description
IdStringThe ID of the retrieved product type
nameStringThe Name of the retrieved product type
alternative_codeStringThe Alternative Code of the retrieved product type
descriptionStringThe Description of the retrieved product type
classificationStringThe Classification of the retrieved product type which can be SERVICES or PHYSICALGOODS
service_typeStringThe Service Type of the retrieved product type which can be TERMED, USAGE, ONETIME or EXPENSE
physical_good_typeStringThe physical Good Type of the retrieved product type which can be TRACEABLE or NONTRACEABLE
composition_methodStringThe Composition Method of the retrieved product type which can be FLAT, FLEXIBLEBUNDLE or FIXEDBUNDLE
used_for_provisioningBooleanThe flag shows if the retrieved product type is used for provisioning
udr_typeUsage Detail Record TypeThe UDR type related with the product type. This is applicable only if the product type is classified as SERVICES and the service type is set to USAGE
meter_reading_typeMeter Reading Type

The Meter Reading type related with the product type. This is applicable only for traceable physical goods

Available from CRM.COM R14.0.0

Referred Objects Response Data

 usage_detail_record_type object data response
NameType Description
IdStringThe ID of the retrieved usage detail record type
nameStringThe Name of the retrieved usage detail record type
alternative_codeStringThe Alternative Code of the retrieved usage detail record type
descriptionStringThe Description of the retrieved usage detail record type
unit_of_measurementStringThe Unit of measurement of the retrieved usage detail record type

Referred Objects Response Data

 unit_of_measurement object response data

Name

Type

Description

idStringThe identifier of the Unit of measurement

name

String

The name of the Unit of measurement

description

String

The description of the Unit of measurement

alternative_codeStringThe alternative code of the Unit of measurement

 

 meter_reading_type object data response
NameType Description
IdStringThe ID of the retrieved meter reading type
nameStringThe Name of the retrieved meter reading type
alternative_codeStringThe Alternative Code of the retrieved meter reading type
classificationStringThe Classification of the retrieved meter reading type
descriptionStringThe Description of the retrieved meter reading type
unit_of_measurementStringThe Unit of measurement of the retrieved meter reading type

Referred Objects Response Data

 unit_of_measurement object response data

Name

Type

Description

idStringThe identifier of the Unit of measurement

name

String

The name of the Unit of measurement

description

String

The description of the Unit of measurement

alternative_codeStringThe alternative code of the Unit of measurement

 global rate object response data

Name

Type

Description

id

String

The ID of the retrieved rate

rate_model

String

The price plan rate model which can be one of the following:

  • QUANTITYBASED
  • QUANTITYANDPERIODBASED
  • BILLABLEPERIODBASED
  • DURATIONBASED
  • FLATFEEBASED
  • USAGEBASED

From CRM.COM R17.0.0, QUANTITYANDMATURITYBASED is renamed to QUANTITYANDPERIODBASED

global_base_amountNumber

The base price of the product in the Global Price Plan

base_rate_applied_perString

The value for 'Base Rate Applied per'

Available when the rate model is 'Quantity & Quantity Based' and it is a selection between

  • Period
  • Period_Item
uotString

The 'UOT' applicable for the rate

  • Seconds
  • Minute
  • Hour
  • Day
  • Week
  • Month
  • Year

Available for one-time services

time_periodTime Period Object

 The period and unit of time for which the base amount is applicable for. This is available only on termed services rates.

uomString

The 'UOM' applicable for the rate

Available when the product type is of Usage Service Classification 

Referred Objects Response Data

 period object response data

Name

Type

Description

time_period_valueNumber

The time period value

time_period_uot

String

The time period unit of time. The supported values are the following:

MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS

 warehouse product stock object response data

Name

Type

Description

id

String

The ID of the retrieved warehouse

name

String

The name of the retrieved warehouse

alternative_code

String

The alternative code of the retrieved warehouse

descriptionStringA description of the retrieved warehouse
quantityNumberThe stock balance of a specific product within the warehouse
number_of_products_included_in_bundlesNumberTh number of items included in bundles within the warehouse and for the specified product

Examples

 Example 1

HTTP Method: GET

 

Request:

Response:

 {
  "status": {
    "message": "",
    "description": "",
    "code": "OK"
  },
  "data": [
    {
      "number_of_products_included_in_bundles": 73,
      "log_information": {
        "updated_date": "2016-03-10T11:27:14",
        "created_date": "2014-06-25T14:47:27",
        "created_by_unit": {
          "id": "48305F8849E3C18B227C5BE3A27BA6DF",
          "name": "Admin Unit",
          "description": "r1",
          "alternative_code": "MG"
        },
        "updated_by_unit": {
          "id": "48305F8849E3C18B227C5BE3A27BA6DF",
          "name": "Admin Unit",
          "description": "r1",
          "alternative_code": "MG"
        },
        "created_by_user": {
          "person_name": "p_xenopoulou",
          "username": "p_xenopoulou",
          "id": "159C17D9C4B1E48DC129FBC701D38438"
        },
        "updated_by_user": {
          "person_name": "MPAdministrator",
          "username": "MPAdministrator",
          "id": "1"
        }
      },
      "stock_balance_per_warehouse": [
        {
          "number_of_products_included_in_bundles": 0,
          "id": "B6074990DBA3CAF8F214BC2523E1E5BB",
          "name": "Sales Branch 1 - WHS Returned Items",
          "quantity": 11,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 0,
          "id": "A12C68A27F155C2DEEEDE91BF2D0A0DE",
          "name": "Admin Group - WHS Temp Items",
          "quantity": 0,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 4,
          "id": "7E14566864284DEB957FE5E54D3D9C7C",
          "name": "Test11",
          "quantity": 4,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 0,
          "id": "464E037F52CB48CE84BF6AD46A73D833",
          "name": "Return WH Sales Branch UK",
          "quantity": 2,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 4,
          "id": "0A3A99039ECA4F02923FF8780CDCC1EA",
          "name": "Rentals WH Sale Branch UK",
          "quantity": 4,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 0,
          "id": "2BE37F954281683BC71D58803476233B",
          "name": "Admin Group - WHS Broken Items",
          "quantity": 4,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 0,
          "id": "6D304CC639614968C45CC828B1534142",
          "name": "Sales Branch 1 - WHS New Items",
          "quantity": 1,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 2,
          "id": "7C85278FFF69484892CA28C46736C7FA",
          "name": "London New Sales",
          "quantity": 5,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 2,
          "id": "4DB430FA9BBF40139F3E37FD5807BD54",
          "name": "3510",
          "quantity": 2,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 0,
          "id": "9B7964EAD5F34A20B27222ADE4185170",
          "name": "Rentals Warehouse",
          "quantity": 0,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 30,
          "id": "9A9C6CEB30A3FC8F8904E8F129A64CC7",
          "name": "Admin Group - WHS New Items",
          "quantity": 16,
          "description": "Admin Group - WHS New Items",
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 0,
          "id": "1ED962E7656FEC32124DE9069D775CD4",
          "name": "Returned Items Warehouse",
          "quantity": 10,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 2,
          "id": "75D4A476370148F2B67E970F860D8816",
          "name": "Nicosia New Sales",
          "quantity": 5,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 6,
          "id": "B8C1F25E026E4375907B68D75B6321D0",
          "name": "Test12",
          "quantity": 6,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 1,
          "id": "98FB712EE414414B98BA640F7432C877",
          "name": "Jobs New Direct Sales WHS",
          "quantity": 8,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 0,
          "id": "A434E4234E00F2C745CA405C4ADBD472",
          "name": "Meizu Main Warehouse",
          "quantity": 1,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 12,
          "id": "E086EA45709D4718B111BEE48577D354",
          "name": "Ind Subs New Partner Sales Warehouse",
          "quantity": 2,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 0,
          "id": "B71B0900CD05FCC9DF9FE76B80317EE0",
          "name": "Admin Group - WHS Returned Items",
          "quantity": 2,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 7,
          "id": "0BA15C3B976B6997F543E0AF4AFBB480",
          "name": "New Sales Warehouse",
          "quantity": 17,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 0,
          "id": "48765CB093C19B3BD5788DAFD62BC232",
          "name": "Broken Items Warehouse",
          "quantity": 1,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 3,
          "id": "82838755A75C44FEBD71073BF543A647",
          "name": "A-TEAM GROUP WH",
          "quantity": 1,
          "description": null,
          "alternative_code": null
        },
        {
          "number_of_products_included_in_bundles": 0,
          "id": "D233F8B59F3F44A29BA1ED380164380F",
          "name": "B-TEAM GROUP WH",
          "quantity": 0,
          "description": null,
          "alternative_code": null
        }
      ],
      "quantity": 102,
      "product": {
        "product_type": {
          "service_type": null,
          "physical_good_type": "TRACEABLE",
          "used_for_provisioning": true,
          "classification": "PHYSICALGOODS",
          "composition_method": "FLAT",
          "id": "B4A1396AE3D1384B304A0FEB22F7BA50",
          "name": "Decoders",
          "description": "Decoders",
          "alternative_code": "D"
        },
        "id": "E8672BB71A9B1BD25E30705AC34D7D61",
        "description": "Decoders 1",
        "code": "Decoders 1",
        "alternative_code": "D1"
      }
    }
  ]
}