1. Home
  2. Docs
  3. Documentation
  4. Warehouse APIs – V1
  5. API: List Item Balance

API: List Item Balance

Request

URL https://your_account.modulus.biz/api/wh/v1/ListWarehouseItemBalance?token=YOUR_TOKEN
API Name
ListWarehouseItemBalance
Method GET
Source Third Party Server
Recipient modulus® Server
Content Type application/json

Query String Parameters

Parameter
Required
Type
Description
token
Yes
Text
Your authentication token.
warehouse_code
Yes
Text
The code of the warehouse.
include_disabled
No
boolean
If false active items are only returned. If true, both active and inactive items are returned, default false.
include_out_of_stock
No
boolean
If false stock items (balance greater than zero) are only returned. If true all items are returned, default false.
page_size
No
Number
The number of returned results. Default value is 100.
page_number
No
Number
The page number from which the entities will be returned. Default value is 1.

Responses

HTTP Status result title message object
Success Responses        
200 OK true Success Item balance
retrieved successfully.
{ “meta_data”:

        {
          “record_count”: 20,
          “page_count”: 20,
          “page_size”: 100,
          “page_number”: 1,
        },
      “data”:
        [
          {
            “item”: { “code”: “2”, “name”: “BK Module” },
            “warehouse”: { “code”: “1”, “name”: “التام” },
            “total_balance”:
              {
                “unit_code”: “C62”,
                “unit_name”: “Activity Unit Product”,
                “quantity”: 2,
              },
            “reserved_balance”:
              {
                “unit_code”: “C62”,
                “unit_name”: “Activity Unit Product”,
                “quantity”: 0,
              },
            “available_balances”:
              {
                “unit_code”: “C62”,
                “unit_name”: “Activity Unit Product”,
                “quantity”: 2,
              },
            “is_disabled”: false,
          },
          {
            “item”: { “code”: “3”, “name”: “SF Module” },
            “warehouse”: { “code”: “1”, “name”: “التام” },
            “total_balance”:
              {
                “unit_code”: “C62”,
                “unit_name”: “Activity Unit Product”,
                “quantity”: 10,
              },
            “reserved_balance”:
              {
                “unit_code”: “C62”,
                “unit_name”: “Activity Unit Product”,
                “quantity”: 0,
              },
            “available_balances”:
              {
                “unit_code”: “C62”,
                “unit_name”: “Activity Unit Product”,
                “quantity”: 10,
              },
            “is_disabled”: false,
          }
        ],
    }


Failure Responses        
500 Internal Server Error false Error Error message describe the problem.  

Example

Request
curl --request GET 'https://your_account.modulus.biz/api/itm/ListWarehouseItemBalance?token=YOUR_TOKEN&warehouse_code=warehouse_code' \ --header 'Content-Type: application/json'
200 OK
{

  "result": true,

  "title": "Success",

  "message": "Item balance listed successfully",

  "object":

    {

      "meta_data":

        {

          "record_count": 20,

          "page_count": 20,

          "page_size": 100,

          "page_number": 1,

        },

      "data":

        [

          {

            "item": { "code": "2", "name": "BK Module" },

            "warehouse": { "code": "1", "name": "التام" },

            "total_balance":

              {

                "unit_code": "C62",

                "unit_name": "Activity Unit Product",

                "quantity": 2,

              },

            "reserved_balance":

              {

                "unit_code": "C62",

                "unit_name": "Activity Unit Product",

                "quantity": 0,

              },

            "available_balances":

              {

                "unit_code": "C62",

                "unit_name": "Activity Unit Product",

                "quantity": 2,

              },

            "is_disabled": false,

          },

          {

            "item": { "code": "3", "name": "SF Module" },

            "warehouse": { "code": "1", "name": "التام" },

            "total_balance":

              {

                "unit_code": "C62",

                "unit_name": "Activity Unit Product",

                "quantity": 10,

              },

            "reserved_balance":

              {

                "unit_code": "C62",

                "unit_name": "Activity Unit Product",

                "quantity": 0,

              },

            "available_balances":

              {

                "unit_code": "C62",

                "unit_name": "Activity Unit Product",

                "quantity": 10,

              },

            "is_disabled": false,

          }

        ],

    },

}