---
title: WMS Current Inventory
slug: fourkites-api-reference/wms-current-inventory
icon: {"apiMethod":"POST"}
createdAt: 2025-10-27T12:01:28.000Z
---

The WMS Current Inventory API receives inventory snapshots from Warehouse Management Systems. It is the ground-truth source for current inventory positions per product, facility and batch, and it feeds the projected on-hand figures used across Inventory Visibility.

Submissions are accepted asynchronously: the API acknowledges receipt and returns a `request_id`, then validates and processes the payload downstream.

:::hint{type="warning"}
A 202 confirms receipt, not validity. Every rule below is applied after the response is returned. Positions that fail are recorded in FourKites service logs only — no error reaches the caller, and there is no callback today. To confirm a snapshot landed, read it back through the inventory projection APIs.

One bad position no longer discards the rest. Each position is validated on its own. Valid positions in the same message persist even when a sibling is rejected.
:::

:::hint{type="danger"}
**Breaking change — the&#x20;**`Available`**&#x20;category is now&#x20;**`OnHand`**.**

`Available` is no longer accepted. A payload containing it fails to parse, and parsing happens before per-position validation, so the entire message is discarded — every position in it, not just the one at fault. You still receive 202 and no error.

Valid categories are `OnHand`, `QualityHold`, `Reserved`, `Blocked` and `InTransit`. Matching is case-insensitive (`onhand` is accepted); any other value rejects the whole message.

If your integration sends `Available` today, change it to `OnHand`.
:::

### Validation Rules

**Per position — rejects that position only:**

- `productId`, `facilityId` and `batchNumber` must be present and non-blank
- `categoryBreakdown` must be present and non-empty, with at most one entry per category
- every category must be one of the five valid values
- every quantity must be present and ≥ 0
- `unitCost` and `totalValue`, when present, must be ≥ 0
- `currency`, when present, must be exactly 3 characters
- every field must be within its maximum length (see Body Parameters)

**Message level — rejects the whole message:**

- `inventory` must be present and non-empty
- at most 500 inventory positions per request
- the body must be parseable JSON
- every category value must be recognised
- `lastUpdatedDate`, `manufacturingDate` and `expiryDate` must be in a parseable format

`NA` and `N/A` are treated as "not supplied" for `uom` and `currency`, after surrounding whitespace is stripped. Omitting the field and sending a placeholder behave identically.

### Data Limits

| **Limit**                                | **Value**                                      |
| ---------------------------------------- | ---------------------------------------------- |
| Inventory positions per request          | 500                                            |
| `categoryBreakdown` entries per position | One per category — five categories are defined |
| `referenceAttributes`                    | No enforced limit on count or size             |

Split larger snapshots across multiple requests.

:::ApiMethodV2
```json
{
  "name": "Production",
  "method": "POST",
  "url": "https://api.fourkites.com/api/v1/async/inventory/current",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "84dp3sw3Qu2MeIT94JSXQ",
        "language": "curl",
        "code": "curl --location 'https://api.fourkites.com/api/v1/async/inventory/current?message_id=MSG-CHI-2026-08-14-001' \\\n--header 'Content-Type: application/json' \\\n--header 'apikey: APIKEY' \\\n--data '{\n    \"messageId\": \"MSG-CHI-2026-08-14-001\",\n    \"inventory\": [\n        {\n            \"productId\": \"SKU-12345\",\n            \"facilityId\": \"FAC-CHI-Z6\",\n            \"productName\": \"Dell Laptop XPS 15\",\n            \"productCategory\": \"Electronics\",\n            \"facilityName\": \"Chicago Warehouse\",\n            \"facilityType\": \"Warehouse\",\n            \"batchNumber\": \"1919149957\",\n            \"lotNumber\": \"BEDU-2423\",\n            \"locationType\": \"STANDARD\",\n            \"categoryBreakdown\": [\n                {\n                    \"category\": \"OnHand\",\n                    \"quantity\": 1500\n                },\n                {\n                    \"category\": \"QualityHold\",\n                    \"quantity\": 500\n                },\n                {\n                    \"category\": \"Reserved\",\n                    \"quantity\": 398\n                }\n            ],\n            \"uom\": \"CSE\",\n            \"lastUpdatedDate\": \"2026-08-14T10:30:00Z\",\n            \"manufacturingDate\": \"2026-04-04\",\n            \"expiryDate\": \"2027-10-04\",\n            \"materialType\": \"FINISHED_GOODS\",\n            \"unitCost\": 45.50,\n            \"currency\": \"USD\",\n            \"totalValue\": 109109.00,\n            \"referenceAttributes\": {\n                \"warehouseSection\": \"NORTH-A\",\n                \"temperatureZone\": \"AMBIENT\",\n                \"customerId\": \"CUST-789\",\n                \"palletId\": \"PAL-123456\"\n            }\n        }\n    ]\n}'",
        "customLabel": ""
      },
      {
        "id": "sXHGOQE1xbyk7KWgQNf__",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"messageId\\\": \\\"MSG-CHI-2026-08-14-001\\\",\\n    \\\"inventory\\\": [\\n        {\\n            \\\"productId\\\": \\\"SKU-12345\\\",\\n            \\\"facilityId\\\": \\\"FAC-CHI-Z6\\\",\\n            \\\"productName\\\": \\\"Dell Laptop XPS 15\\\",\\n            \\\"productCategory\\\": \\\"Electronics\\\",\\n            \\\"facilityName\\\": \\\"Chicago Warehouse\\\",\\n            \\\"facilityType\\\": \\\"Warehouse\\\",\\n            \\\"batchNumber\\\": \\\"1919149957\\\",\\n            \\\"lotNumber\\\": \\\"BEDU-2423\\\",\\n            \\\"locationType\\\": \\\"STANDARD\\\",\\n            \\\"categoryBreakdown\\\": [\\n                {\\n                    \\\"category\\\": \\\"OnHand\\\",\\n                    \\\"quantity\\\": 1500\\n                },\\n                {\\n                    \\\"category\\\": \\\"QualityHold\\\",\\n                    \\\"quantity\\\": 500\\n                },\\n                {\\n                    \\\"category\\\": \\\"Reserved\\\",\\n                    \\\"quantity\\\": 398\\n                }\\n            ],\\n            \\\"uom\\\": \\\"CSE\\\",\\n            \\\"lastUpdatedDate\\\": \\\"2026-08-14T10:30:00Z\\\",\\n            \\\"manufacturingDate\\\": \\\"2026-04-04\\\",\\n            \\\"expiryDate\\\": \\\"2027-10-04\\\",\\n            \\\"materialType\\\": \\\"FINISHED_GOODS\\\",\\n            \\\"unitCost\\\": 45.50,\\n            \\\"currency\\\": \\\"USD\\\",\\n            \\\"totalValue\\\": 109109.00,\\n            \\\"referenceAttributes\\\": {\\n                \\\"warehouseSection\\\": \\\"NORTH-A\\\",\\n                \\\"temperatureZone\\\": \\\"AMBIENT\\\",\\n                \\\"customerId\\\": \\\"CUST-789\\\",\\n                \\\"palletId\\\": \\\"PAL-123456\\\"\\n            }\\n        }\\n    ]\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api.fourkites.com/api/v1/async/inventory/current?message_id=MSG-CHI-2026-08-14-001\")\n  .method(\"POST\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .addHeader(\"apikey\", \"APIKEY\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "kQjOCVVkiAiEaT0GTcKRa",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api.fourkites.com/api/v1/async/inventory/current?message_id=MSG-CHI-2026-08-14-001\",\n  \"method\": \"POST\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"apikey\": \"APIKEY\"\n  },\n  \"data\": JSON.stringify({\n    \"messageId\": \"MSG-CHI-2026-08-14-001\",\n    \"inventory\": [\n      {\n        \"productId\": \"SKU-12345\",\n        \"facilityId\": \"FAC-CHI-Z6\",\n        \"productName\": \"Dell Laptop XPS 15\",\n        \"productCategory\": \"Electronics\",\n        \"facilityName\": \"Chicago Warehouse\",\n        \"facilityType\": \"Warehouse\",\n        \"batchNumber\": \"1919149957\",\n        \"lotNumber\": \"BEDU-2423\",\n        \"locationType\": \"STANDARD\",\n        \"categoryBreakdown\": [\n          {\n            \"category\": \"OnHand\",\n            \"quantity\": 1500\n          },\n          {\n            \"category\": \"QualityHold\",\n            \"quantity\": 500\n          },\n          {\n            \"category\": \"Reserved\",\n            \"quantity\": 398\n          }\n        ],\n        \"uom\": \"CSE\",\n        \"lastUpdatedDate\": \"2026-08-14T10:30:00Z\",\n        \"manufacturingDate\": \"2026-04-04\",\n        \"expiryDate\": \"2027-10-04\",\n        \"materialType\": \"FINISHED_GOODS\",\n        \"unitCost\": 45.5,\n        \"currency\": \"USD\",\n        \"totalValue\": 109109,\n        \"referenceAttributes\": {\n          \"warehouseSection\": \"NORTH-A\",\n          \"temperatureZone\": \"AMBIENT\",\n          \"customerId\": \"CUST-789\",\n          \"palletId\": \"PAL-123456\"\n        }\n      }\n    ]\n  }),\n};\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});",
        "customLabel": ""
      },
      {
        "id": "YZ1EeLoEfskvLYcZOQ4ft",
        "language": "swift",
        "code": "let parameters = \"{\\n    \\\"messageId\\\": \\\"MSG-CHI-2026-08-14-001\\\",\\n    \\\"inventory\\\": [\\n        {\\n            \\\"productId\\\": \\\"SKU-12345\\\",\\n            \\\"facilityId\\\": \\\"FAC-CHI-Z6\\\",\\n            \\\"productName\\\": \\\"Dell Laptop XPS 15\\\",\\n            \\\"productCategory\\\": \\\"Electronics\\\",\\n            \\\"facilityName\\\": \\\"Chicago Warehouse\\\",\\n            \\\"facilityType\\\": \\\"Warehouse\\\",\\n            \\\"batchNumber\\\": \\\"1919149957\\\",\\n            \\\"lotNumber\\\": \\\"BEDU-2423\\\",\\n            \\\"locationType\\\": \\\"STANDARD\\\",\\n            \\\"categoryBreakdown\\\": [\\n                {\\n                    \\\"category\\\": \\\"OnHand\\\",\\n                    \\\"quantity\\\": 1500\\n                },\\n                {\\n                    \\\"category\\\": \\\"QualityHold\\\",\\n                    \\\"quantity\\\": 500\\n                },\\n                {\\n                    \\\"category\\\": \\\"Reserved\\\",\\n                    \\\"quantity\\\": 398\\n                }\\n            ],\\n            \\\"uom\\\": \\\"CSE\\\",\\n            \\\"lastUpdatedDate\\\": \\\"2026-08-14T10:30:00Z\\\",\\n            \\\"manufacturingDate\\\": \\\"2026-04-04\\\",\\n            \\\"expiryDate\\\": \\\"2027-10-04\\\",\\n            \\\"materialType\\\": \\\"FINISHED_GOODS\\\",\\n            \\\"unitCost\\\": 45.50,\\n            \\\"currency\\\": \\\"USD\\\",\\n            \\\"totalValue\\\": 109109.00,\\n            \\\"referenceAttributes\\\": {\\n                \\\"warehouseSection\\\": \\\"NORTH-A\\\",\\n                \\\"temperatureZone\\\": \\\"AMBIENT\\\",\\n                \\\"customerId\\\": \\\"CUST-789\\\",\\n                \\\"palletId\\\": \\\"PAL-123456\\\"\\n            }\\n        }\\n    ]\\n}\"\nlet postData = parameters.data(using: .utf8)\nvar request = URLRequest(url: URL(string: \"https://api.fourkites.com/api/v1/async/inventory/current?message_id=MSG-CHI-2026-08-14-001\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\nrequest.addValue(\"APIKEY\", forHTTPHeaderField: \"apikey\")\nrequest.httpMethod = \"POST\"\nrequest.httpBody = postData\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n  guard let data = data else {\n    print(String(describing: error))\n    return\n  }\n  print(String(data: data, encoding: .utf8)!)\n}\ntask.resume()",
        "customLabel": ""
      },
      {
        "id": "3kd5GseYYaQsA7PM9M_Vh",
        "language": "csharp",
        "code": "var client = new HttpClient();\nvar request = new HttpRequestMessage(HttpMethod.Post, \"https://api.fourkites.com/api/v1/async/inventory/current?message_id=MSG-CHI-2026-08-14-001\");\nrequest.Headers.Add(\"apikey\", \"APIKEY\");\nvar content = new StringContent(\"{\\n    \\\"messageId\\\": \\\"MSG-CHI-2026-08-14-001\\\",\\n    \\\"inventory\\\": [\\n        {\\n            \\\"productId\\\": \\\"SKU-12345\\\",\\n            \\\"facilityId\\\": \\\"FAC-CHI-Z6\\\",\\n            \\\"productName\\\": \\\"Dell Laptop XPS 15\\\",\\n            \\\"productCategory\\\": \\\"Electronics\\\",\\n            \\\"facilityName\\\": \\\"Chicago Warehouse\\\",\\n            \\\"facilityType\\\": \\\"Warehouse\\\",\\n            \\\"batchNumber\\\": \\\"1919149957\\\",\\n            \\\"lotNumber\\\": \\\"BEDU-2423\\\",\\n            \\\"locationType\\\": \\\"STANDARD\\\",\\n            \\\"categoryBreakdown\\\": [\\n                {\\n                    \\\"category\\\": \\\"OnHand\\\",\\n                    \\\"quantity\\\": 1500\\n                },\\n                {\\n                    \\\"category\\\": \\\"QualityHold\\\",\\n                    \\\"quantity\\\": 500\\n                },\\n                {\\n                    \\\"category\\\": \\\"Reserved\\\",\\n                    \\\"quantity\\\": 398\\n                }\\n            ],\\n            \\\"uom\\\": \\\"CSE\\\",\\n            \\\"lastUpdatedDate\\\": \\\"2026-08-14T10:30:00Z\\\",\\n            \\\"manufacturingDate\\\": \\\"2026-04-04\\\",\\n            \\\"expiryDate\\\": \\\"2027-10-04\\\",\\n            \\\"materialType\\\": \\\"FINISHED_GOODS\\\",\\n            \\\"unitCost\\\": 45.50,\\n            \\\"currency\\\": \\\"USD\\\",\\n            \\\"totalValue\\\": 109109.00,\\n            \\\"referenceAttributes\\\": {\\n                \\\"warehouseSection\\\": \\\"NORTH-A\\\",\\n                \\\"temperatureZone\\\": \\\"AMBIENT\\\",\\n                \\\"customerId\\\": \\\"CUST-789\\\",\\n                \\\"palletId\\\": \\\"PAL-123456\\\"\\n            }\\n        }\\n    ]\\n}\", null, \"application/json\");\nrequest.Content = content;\nvar response = await client.SendAsync(request);\nresponse.EnsureSuccessStatusCode();\nConsole.WriteLine(await response.Content.ReadAsStringAsync());\n",
        "customLabel": ""
      },
      {
        "id": "0gR1udJNn5gyJPmUfuxdb",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io\"\n)\n\nfunc main() {\n\n  url := \"https://api.fourkites.com/api/v1/async/inventory/current?message_id=MSG-CHI-2026-08-14-001\"\n  method := \"POST\"\n\n  payload := strings.NewReader(`{\n    \"messageId\": \"MSG-CHI-2026-08-14-001\",\n    \"inventory\": [\n        {\n            \"productId\": \"SKU-12345\",\n            \"facilityId\": \"FAC-CHI-Z6\",\n            \"productName\": \"Dell Laptop XPS 15\",\n            \"productCategory\": \"Electronics\",\n            \"facilityName\": \"Chicago Warehouse\",\n            \"facilityType\": \"Warehouse\",\n            \"batchNumber\": \"1919149957\",\n            \"lotNumber\": \"BEDU-2423\",\n            \"locationType\": \"STANDARD\",\n            \"categoryBreakdown\": [\n                {\n                    \"category\": \"OnHand\",\n                    \"quantity\": 1500\n                },\n                {\n                    \"category\": \"QualityHold\",\n                    \"quantity\": 500\n                },\n                {\n                    \"category\": \"Reserved\",\n                    \"quantity\": 398\n                }\n            ],\n            \"uom\": \"CSE\",\n            \"lastUpdatedDate\": \"2026-08-14T10:30:00Z\",\n            \"manufacturingDate\": \"2026-04-04\",\n            \"expiryDate\": \"2027-10-04\",\n            \"materialType\": \"FINISHED_GOODS\",\n            \"unitCost\": 45.50,\n            \"currency\": \"USD\",\n            \"totalValue\": 109109.00,\n            \"referenceAttributes\": {\n                \"warehouseSection\": \"NORTH-A\",\n                \"temperatureZone\": \"AMBIENT\",\n                \"customerId\": \"CUST-789\",\n                \"palletId\": \"PAL-123456\"\n            }\n        }\n    ]\n}`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"apikey\", \"APIKEY\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := io.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      },
      {
        "id": "iiZ_qALpFGp_4PtwXJRZX",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\nurl = URI(\"https://api.fourkites.com/api/v1/async/inventory/current?message_id=MSG-CHI-2026-08-14-001\")\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"apikey\"] = \"APIKEY\"\nrequest.body = JSON.dump({\n  \"messageId\": \"MSG-CHI-2026-08-14-001\",\n  \"inventory\": [\n    {\n      \"productId\": \"SKU-12345\",\n      \"facilityId\": \"FAC-CHI-Z6\",\n      \"productName\": \"Dell Laptop XPS 15\",\n      \"productCategory\": \"Electronics\",\n      \"facilityName\": \"Chicago Warehouse\",\n      \"facilityType\": \"Warehouse\",\n      \"batchNumber\": \"1919149957\",\n      \"lotNumber\": \"BEDU-2423\",\n      \"locationType\": \"STANDARD\",\n      \"categoryBreakdown\": [\n        {\n          \"category\": \"OnHand\",\n          \"quantity\": 1500\n        },\n        {\n          \"category\": \"QualityHold\",\n          \"quantity\": 500\n        },\n        {\n          \"category\": \"Reserved\",\n          \"quantity\": 398\n        }\n      ],\n      \"uom\": \"CSE\",\n      \"lastUpdatedDate\": \"2026-08-14T10:30:00Z\",\n      \"manufacturingDate\": \"2026-04-04\",\n      \"expiryDate\": \"2027-10-04\",\n      \"materialType\": \"FINISHED_GOODS\",\n      \"unitCost\": 45.5,\n      \"currency\": \"USD\",\n      \"totalValue\": 109109,\n      \"referenceAttributes\": {\n        \"warehouseSection\": \"NORTH-A\",\n        \"temperatureZone\": \"AMBIENT\",\n        \"customerId\": \"CUST-789\",\n        \"palletId\": \"PAL-123456\"\n      }\n    }\n  ]\n})\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "fN5Z7Ng-qFA-BN_tiVoAg",
        "language": "python",
        "code": "import http.client\nimport json\nconn = http.client.HTTPSConnection(\"api.fourkites.com\")\npayload = json.dumps({\n  \"messageId\": \"MSG-CHI-2026-08-14-001\",\n  \"inventory\": [\n    {\n      \"productId\": \"SKU-12345\",\n      \"facilityId\": \"FAC-CHI-Z6\",\n      \"productName\": \"Dell Laptop XPS 15\",\n      \"productCategory\": \"Electronics\",\n      \"facilityName\": \"Chicago Warehouse\",\n      \"facilityType\": \"Warehouse\",\n      \"batchNumber\": \"1919149957\",\n      \"lotNumber\": \"BEDU-2423\",\n      \"locationType\": \"STANDARD\",\n      \"categoryBreakdown\": [\n        {\n          \"category\": \"OnHand\",\n          \"quantity\": 1500\n        },\n        {\n          \"category\": \"QualityHold\",\n          \"quantity\": 500\n        },\n        {\n          \"category\": \"Reserved\",\n          \"quantity\": 398\n        }\n      ],\n      \"uom\": \"CSE\",\n      \"lastUpdatedDate\": \"2026-08-14T10:30:00Z\",\n      \"manufacturingDate\": \"2026-04-04\",\n      \"expiryDate\": \"2027-10-04\",\n      \"materialType\": \"FINISHED_GOODS\",\n      \"unitCost\": 45.5,\n      \"currency\": \"USD\",\n      \"totalValue\": 109109,\n      \"referenceAttributes\": {\n        \"warehouseSection\": \"NORTH-A\",\n        \"temperatureZone\": \"AMBIENT\",\n        \"customerId\": \"CUST-789\",\n        \"palletId\": \"PAL-123456\"\n      }\n    }\n  ]\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'apikey': 'APIKEY'\n}\nconn.request(\"POST\", \"/api/v1/async/inventory/current?message_id=MSG-CHI-2026-08-14-001\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "84dp3sw3Qu2MeIT94JSXQ"
  },
  "results": {
    "languages": [
      {
        "id": "1kGpY8aq8hZSjZvULOip6",
        "language": "202",
        "code": "{\n  \"request_id\": \"MSG-CHI-2026-08-14-001\"\n}",
        "customLabel": ""
      },
      {
        "id": "LHZmynEvrUnjSru1ODxGI",
        "language": "401",
        "code": "{\n  \"message\": \"Invalid authentication credentials\"\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "1kGpY8aq8hZSjZvULOip6"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "messageId",
        "kind": "required",
        "type": "string",
        "description": "Your identifier for this message. Stored on every row it creates and used to name the archived payload. It is not the value returned as request_id — use the message_id query parameter for that. Neither field is checked for uniqueness and neither deduplicates."
      },
      {
        "name": "inventory",
        "kind": "required",
        "type": "object",
        "description": "Inventory positions. Non-empty. Max 500 entries",
        "children": [
          {
            "name": "productId",
            "kind": "required",
            "type": "string",
            "description": "Product or SKU identifier. Max 255 chars"
          },
          {
            "name": "facilityId",
            "kind": "required",
            "type": "string",
            "description": "Facility identifier. Max 255 chars"
          },
          {
            "name": "batchNumber",
            "kind": "required",
            "type": "string",
            "description": "Batch identifier. Cannot be null or blank — it forms part of the upsert grain. Max 50 chars"
          },
          {
            "name": "categoryBreakdown",
            "kind": "required",
            "type": "object",
            "description": "Quantities by category. Non-empty. At most one entry per category, so five entries covers every category the API defines.",
            "children": [
              {
                "name": "category",
                "kind": "required",
                "type": "string",
                "description": "One of \"OnHand\", \"QualityHold\", \"Reserved\", \"Blocked\", \"InTransit\". Case-insensitive; stored in canonical form. Any other value rejects the entire message."
              },
              {
                "name": "quantity",
                "kind": "required",
                "type": "number",
                "description": "Quantity in this category. ≥ 0. Decimals permitted."
              }
            ]
          },
          {
            "name": "lotNumber",
            "kind": "optional",
            "type": "string",
            "description": "Lot identifier. Max 50 chars"
          },
          {
            "name": "uom",
            "kind": "optional",
            "type": "string",
            "description": "Unit of measure, e.g. \"CSE\", \"EA\", \"PLT\". Stored and reported exactly as sent — no default is applied. If omitted, quantities are reported without a unit rather than defaulting to eaches. Max 10 chars"
          },
          {
            "name": "location",
            "kind": "optional",
            "type": "string",
            "description": "Free-text location within the facility. Max 200 chars"
          },
          {
            "name": "locationType",
            "kind": "optional",
            "type": "string",
            "description": "For example \"STANDARD\", \"QUARANTINE\", \"STAGING\". Not validated against a fixed list. Max 20 chars"
          },
          {
            "name": "lastUpdatedDate",
            "kind": "optional",
            "type": "string",
            "description": "Timestamp of the inventory movement. ISO 8601 (e.g., 2026-08-14T10:30:00Z). Defaults to receipt time when omitted. An unparseable value rejects the whole message."
          },
          {
            "name": "manufacturingDate",
            "kind": "optional",
            "type": "string",
            "description": "YYYY-MM-DD format. An unparseable value rejects the whole message."
          },
          {
            "name": "expiryDate",
            "kind": "optional",
            "type": "string",
            "description": "YYYY-MM-DD format. An unparseable value rejects the whole message."
          },
          {
            "name": "materialType",
            "kind": "optional",
            "type": "string",
            "description": "For example \"FINISHED_GOODS\", \"RAW_MATERIAL\", \"WIP\". Not validated against a fixed list. Max 20 chars"
          },
          {
            "name": "unitCost",
            "kind": "optional",
            "type": "number",
            "description": "Cost per unit. Must be ≥ 0."
          },
          {
            "name": "currency",
            "kind": "optional",
            "type": "string",
            "description": "ISO 4217 code, e.g. \"USD\". Must be exactly 3 chars"
          },
          {
            "name": "totalValue",
            "kind": "optional",
            "type": "number",
            "description": "Total value of the position. Must be ≥ 0."
          },
          {
            "name": "productName",
            "kind": "optional",
            "type": "string",
            "description": "Display name of the product. Max 255 chars"
          },
          {
            "name": "productCategory",
            "kind": "optional",
            "type": "string",
            "description": "Product category. Max 100 chars"
          },
          {
            "name": "facilityName",
            "kind": "optional",
            "type": "string",
            "description": "Display name of the facility. Max 255 chars"
          },
          {
            "name": "facilityType",
            "kind": "optional",
            "type": "string",
            "description": "Type of facility. Max 100 chars"
          },
          {
            "name": "referenceAttributes",
            "kind": "optional",
            "type": "object",
            "description": "Flat key-value map for custom data (string to string). Stored as sent, not interpreted. No enforced limit on count or size."
          }
        ],
        "schema": [
          {
            "name": "productId",
            "kind": "required",
            "type": "string",
            "description": "Product or SKU identifier. Max 255 chars"
          },
          {
            "name": "facilityId",
            "kind": "required",
            "type": "string",
            "description": "Facility identifier. Max 255 chars"
          },
          {
            "name": "batchNumber",
            "kind": "required",
            "type": "string",
            "description": "Batch identifier. Cannot be null or blank — it forms part of the upsert grain. Max 50 chars"
          },
          {
            "name": "categoryBreakdown",
            "kind": "required",
            "type": "object",
            "description": "Quantities by category. Non-empty. At most one entry per category, so five entries covers every category the API defines.",
            "children": [
              {
                "name": "category",
                "kind": "required",
                "type": "string",
                "description": "One of \"OnHand\", \"QualityHold\", \"Reserved\", \"Blocked\", \"InTransit\". Case-insensitive; stored in canonical form. Any other value rejects the entire message."
              },
              {
                "name": "quantity",
                "kind": "required",
                "type": "number",
                "description": "Quantity in this category. ≥ 0. Decimals permitted."
              }
            ]
          },
          {
            "name": "lotNumber",
            "kind": "optional",
            "type": "string",
            "description": "Lot identifier. Max 50 chars"
          },
          {
            "name": "uom",
            "kind": "optional",
            "type": "string",
            "description": "Unit of measure, e.g. \"CSE\", \"EA\", \"PLT\". Stored and reported exactly as sent — no default is applied. If omitted, quantities are reported without a unit rather than defaulting to eaches. Max 10 chars"
          },
          {
            "name": "location",
            "kind": "optional",
            "type": "string",
            "description": "Free-text location within the facility. Max 200 chars"
          },
          {
            "name": "locationType",
            "kind": "optional",
            "type": "string",
            "description": "For example \"STANDARD\", \"QUARANTINE\", \"STAGING\". Not validated against a fixed list. Max 20 chars"
          },
          {
            "name": "lastUpdatedDate",
            "kind": "optional",
            "type": "string",
            "description": "Timestamp of the inventory movement. ISO 8601 (e.g., 2026-08-14T10:30:00Z). Defaults to receipt time when omitted. An unparseable value rejects the whole message."
          },
          {
            "name": "manufacturingDate",
            "kind": "optional",
            "type": "string",
            "description": "YYYY-MM-DD format. An unparseable value rejects the whole message."
          },
          {
            "name": "expiryDate",
            "kind": "optional",
            "type": "string",
            "description": "YYYY-MM-DD format. An unparseable value rejects the whole message."
          },
          {
            "name": "materialType",
            "kind": "optional",
            "type": "string",
            "description": "For example \"FINISHED_GOODS\", \"RAW_MATERIAL\", \"WIP\". Not validated against a fixed list. Max 20 chars"
          },
          {
            "name": "unitCost",
            "kind": "optional",
            "type": "number",
            "description": "Cost per unit. Must be ≥ 0."
          },
          {
            "name": "currency",
            "kind": "optional",
            "type": "string",
            "description": "ISO 4217 code, e.g. \"USD\". Must be exactly 3 chars"
          },
          {
            "name": "totalValue",
            "kind": "optional",
            "type": "number",
            "description": "Total value of the position. Must be ≥ 0."
          },
          {
            "name": "productName",
            "kind": "optional",
            "type": "string",
            "description": "Display name of the product. Max 255 chars"
          },
          {
            "name": "productCategory",
            "kind": "optional",
            "type": "string",
            "description": "Product category. Max 100 chars"
          },
          {
            "name": "facilityName",
            "kind": "optional",
            "type": "string",
            "description": "Display name of the facility. Max 255 chars"
          },
          {
            "name": "facilityType",
            "kind": "optional",
            "type": "string",
            "description": "Type of facility. Max 100 chars"
          },
          {
            "name": "referenceAttributes",
            "kind": "optional",
            "type": "object",
            "description": "Flat key-value map for custom data (string to string). Stored as sent, not interpreted. No enforced limit on count or size."
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "production",
  "legacyHash": "FLSDCvIErHwnx0A7qiab_"
}
```
:::

Projected on-hand for this position is 1500 — the `OnHand` quantity only.

:::ApiMethodV2
```json
{
  "name": "Staging",
  "method": "POST",
  "url": "https://api-staging.fourkites.com/api/v1/async/inventory/current",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "84dp3sw3Qu2MeIT94JSXQ",
        "language": "curl",
        "code": "curl --location 'https://api-staging.fourkites.com/api/v1/async/inventory/current?message_id=MSG-TEST-001' \\\n--header 'Content-Type: application/json' \\\n--header 'apikey: STAGING_APIKEY' \\\n--data '{\n    \"messageId\": \"MSG-TEST-001\",\n    \"inventory\": [\n        {\n            \"productId\": \"SKU-12345\",\n            \"facilityId\": \"FAC-CHI-Z6\",\n            \"batchNumber\": \"1919149957\",\n            \"categoryBreakdown\": [\n                { \"category\": \"OnHand\", \"quantity\": 100 }\n            ],\n            \"uom\": \"CSE\",\n            \"lastUpdatedDate\": \"2026-08-14T10:30:00Z\"\n        }\n    ]\n}'\n",
        "customLabel": ""
      },
      {
        "id": "sXHGOQE1xbyk7KWgQNf__",
        "language": "java",
        "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n  .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n    \\\"messageId\\\": \\\"MSG-TEST-001\\\",\\n    \\\"inventory\\\": [\\n        {\\n            \\\"productId\\\": \\\"SKU-12345\\\",\\n            \\\"facilityId\\\": \\\"FAC-CHI-Z6\\\",\\n            \\\"productName\\\": \\\"Dell Laptop XPS 15\\\",\\n            \\\"productCategory\\\": \\\"Electronics\\\",\\n            \\\"facilityName\\\": \\\"Chicago Warehouse\\\",\\n            \\\"facilityType\\\": \\\"Warehouse\\\",\\n            \\\"batchNumber\\\": \\\"1919149957\\\",\\n            \\\"lotNumber\\\": \\\"BEDU-2423\\\",\\n            \\\"locationType\\\": \\\"STANDARD\\\",\\n            \\\"categoryBreakdown\\\": [\\n                {\\n                    \\\"category\\\": \\\"OnHand\\\",\\n                    \\\"quantity\\\": 1500\\n                },\\n                {\\n                    \\\"category\\\": \\\"QualityHold\\\",\\n                    \\\"quantity\\\": 500\\n                },\\n                {\\n                    \\\"category\\\": \\\"Reserved\\\",\\n                    \\\"quantity\\\": 398\\n                }\\n            ],\\n            \\\"uom\\\": \\\"CSE\\\",\\n            \\\"lastUpdatedDate\\\": \\\"2026-08-14T10:30:00Z\\\",\\n            \\\"manufacturingDate\\\": \\\"2026-04-04\\\",\\n            \\\"expiryDate\\\": \\\"2027-10-04\\\",\\n            \\\"materialType\\\": \\\"FINISHED_GOODS\\\",\\n            \\\"unitCost\\\": 45.50,\\n            \\\"currency\\\": \\\"USD\\\",\\n            \\\"totalValue\\\": 109109.00,\\n            \\\"referenceAttributes\\\": {\\n                \\\"warehouseSection\\\": \\\"NORTH-A\\\",\\n                \\\"temperatureZone\\\": \\\"AMBIENT\\\",\\n                \\\"customerId\\\": \\\"CUST-789\\\",\\n                \\\"palletId\\\": \\\"PAL-123456\\\"\\n            }\\n        }\\n    ]\\n}\");\nRequest request = new Request.Builder()\n  .url(\"https://api-staging.fourkites.com/api/v1/async/inventory/current?message_id=MSG-TEST-001\")\n  .method(\"POST\", body)\n  .addHeader(\"Content-Type\", \"application/json\")\n  .addHeader(\"apikey\", \"STAGING_APIKEY\")\n  .build();\nResponse response = client.newCall(request).execute();",
        "customLabel": ""
      },
      {
        "id": "kQjOCVVkiAiEaT0GTcKRa",
        "language": "javascript",
        "code": "var settings = {\n  \"url\": \"https://api-staging.fourkites.com/api/v1/async/inventory/current?message_id=MSG-TEST-001\",\n  \"method\": \"POST\",\n  \"timeout\": 0,\n  \"headers\": {\n    \"Content-Type\": \"application/json\",\n    \"apikey\": \"STAGING_APIKEY\"\n  },\n  \"data\": JSON.stringify({\n    \"messageId\": \"MSG-TEST-001\",\n    \"inventory\": [\n      {\n        \"productId\": \"SKU-12345\",\n        \"facilityId\": \"FAC-CHI-Z6\",\n        \"productName\": \"Dell Laptop XPS 15\",\n        \"productCategory\": \"Electronics\",\n        \"facilityName\": \"Chicago Warehouse\",\n        \"facilityType\": \"Warehouse\",\n        \"batchNumber\": \"1919149957\",\n        \"lotNumber\": \"BEDU-2423\",\n        \"locationType\": \"STANDARD\",\n        \"categoryBreakdown\": [\n          {\n            \"category\": \"OnHand\",\n            \"quantity\": 1500\n          },\n          {\n            \"category\": \"QualityHold\",\n            \"quantity\": 500\n          },\n          {\n            \"category\": \"Reserved\",\n            \"quantity\": 398\n          }\n        ],\n        \"uom\": \"CSE\",\n        \"lastUpdatedDate\": \"2026-08-14T10:30:00Z\",\n        \"manufacturingDate\": \"2026-04-04\",\n        \"expiryDate\": \"2027-10-04\",\n        \"materialType\": \"FINISHED_GOODS\",\n        \"unitCost\": 45.5,\n        \"currency\": \"USD\",\n        \"totalValue\": 109109,\n        \"referenceAttributes\": {\n          \"warehouseSection\": \"NORTH-A\",\n          \"temperatureZone\": \"AMBIENT\",\n          \"customerId\": \"CUST-789\",\n          \"palletId\": \"PAL-123456\"\n        }\n      }\n    ]\n  }),\n};\n$.ajax(settings).done(function (response) {\n  console.log(response);\n});\n",
        "customLabel": ""
      },
      {
        "id": "YZ1EeLoEfskvLYcZOQ4ft",
        "language": "swift",
        "code": "let parameters = \"{\\n    \\\"messageId\\\": \\\"MSG-TEST-001\\\",\\n    \\\"inventory\\\": [\\n        {\\n            \\\"productId\\\": \\\"SKU-12345\\\",\\n            \\\"facilityId\\\": \\\"FAC-CHI-Z6\\\",\\n            \\\"productName\\\": \\\"Dell Laptop XPS 15\\\",\\n            \\\"productCategory\\\": \\\"Electronics\\\",\\n            \\\"facilityName\\\": \\\"Chicago Warehouse\\\",\\n            \\\"facilityType\\\": \\\"Warehouse\\\",\\n            \\\"batchNumber\\\": \\\"1919149957\\\",\\n            \\\"lotNumber\\\": \\\"BEDU-2423\\\",\\n            \\\"locationType\\\": \\\"STANDARD\\\",\\n            \\\"categoryBreakdown\\\": [\\n                {\\n                    \\\"category\\\": \\\"OnHand\\\",\\n                    \\\"quantity\\\": 1500\\n                },\\n                {\\n                    \\\"category\\\": \\\"QualityHold\\\",\\n                    \\\"quantity\\\": 500\\n                },\\n                {\\n                    \\\"category\\\": \\\"Reserved\\\",\\n                    \\\"quantity\\\": 398\\n                }\\n            ],\\n            \\\"uom\\\": \\\"CSE\\\",\\n            \\\"lastUpdatedDate\\\": \\\"2026-08-14T10:30:00Z\\\",\\n            \\\"manufacturingDate\\\": \\\"2026-04-04\\\",\\n            \\\"expiryDate\\\": \\\"2027-10-04\\\",\\n            \\\"materialType\\\": \\\"FINISHED_GOODS\\\",\\n            \\\"unitCost\\\": 45.50,\\n            \\\"currency\\\": \\\"USD\\\",\\n            \\\"totalValue\\\": 109109.00,\\n            \\\"referenceAttributes\\\": {\\n                \\\"warehouseSection\\\": \\\"NORTH-A\\\",\\n                \\\"temperatureZone\\\": \\\"AMBIENT\\\",\\n                \\\"customerId\\\": \\\"CUST-789\\\",\\n                \\\"palletId\\\": \\\"PAL-123456\\\"\\n            }\\n        }\\n    ]\\n}\"\nlet postData = parameters.data(using: .utf8)\nvar request = URLRequest(url: URL(string: \"https://api-staging.fourkites.com/api/v1/async/inventory/current?message_id=MSG-TEST-001\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"Content-Type\")\nrequest.addValue(\"STAGING_APIKEY\", forHTTPHeaderField: \"apikey\")\nrequest.httpMethod = \"POST\"\nrequest.httpBody = postData\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n  guard let data = data else {\n    print(String(describing: error))\n    return\n  }\n  print(String(data: data, encoding: .utf8)!)\n}\ntask.resume()",
        "customLabel": ""
      },
      {
        "id": "3kd5GseYYaQsA7PM9M_Vh",
        "language": "csharp",
        "code": "var client = new HttpClient();\nvar request = new HttpRequestMessage(HttpMethod.Post, \"https://api-staging.fourkites.com/api/v1/async/inventory/current?message_id=MSG-TEST-001\");\nrequest.Headers.Add(\"apikey\", \"STAGING_APIKEY\");\nvar content = new StringContent(\"{\\n    \\\"messageId\\\": \\\"MSG-TEST-001\\\",\\n    \\\"inventory\\\": [\\n        {\\n            \\\"productId\\\": \\\"SKU-12345\\\",\\n            \\\"facilityId\\\": \\\"FAC-CHI-Z6\\\",\\n            \\\"productName\\\": \\\"Dell Laptop XPS 15\\\",\\n            \\\"productCategory\\\": \\\"Electronics\\\",\\n            \\\"facilityName\\\": \\\"Chicago Warehouse\\\",\\n            \\\"facilityType\\\": \\\"Warehouse\\\",\\n            \\\"batchNumber\\\": \\\"1919149957\\\",\\n            \\\"lotNumber\\\": \\\"BEDU-2423\\\",\\n            \\\"locationType\\\": \\\"STANDARD\\\",\\n            \\\"categoryBreakdown\\\": [\\n                {\\n                    \\\"category\\\": \\\"OnHand\\\",\\n                    \\\"quantity\\\": 1500\\n                },\\n                {\\n                    \\\"category\\\": \\\"QualityHold\\\",\\n                    \\\"quantity\\\": 500\\n                },\\n                {\\n                    \\\"category\\\": \\\"Reserved\\\",\\n                    \\\"quantity\\\": 398\\n                }\\n            ],\\n            \\\"uom\\\": \\\"CSE\\\",\\n            \\\"lastUpdatedDate\\\": \\\"2026-08-14T10:30:00Z\\\",\\n            \\\"manufacturingDate\\\": \\\"2026-04-04\\\",\\n            \\\"expiryDate\\\": \\\"2027-10-04\\\",\\n            \\\"materialType\\\": \\\"FINISHED_GOODS\\\",\\n            \\\"unitCost\\\": 45.50,\\n            \\\"currency\\\": \\\"USD\\\",\\n            \\\"totalValue\\\": 109109.00,\\n            \\\"referenceAttributes\\\": {\\n                \\\"warehouseSection\\\": \\\"NORTH-A\\\",\\n                \\\"temperatureZone\\\": \\\"AMBIENT\\\",\\n                \\\"customerId\\\": \\\"CUST-789\\\",\\n                \\\"palletId\\\": \\\"PAL-123456\\\"\\n            }\\n        }\\n    ]\\n}\", null, \"application/json\");\nrequest.Content = content;\nvar response = await client.SendAsync(request);\nresponse.EnsureSuccessStatusCode();\nConsole.WriteLine(await response.Content.ReadAsStringAsync());\n",
        "customLabel": ""
      },
      {
        "id": "0gR1udJNn5gyJPmUfuxdb",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io\"\n)\n\nfunc main() {\n\n  url := \"https://api-staging.fourkites.com/api/v1/async/inventory/current?message_id=MSG-TEST-001\"\n  method := \"POST\"\n\n  payload := strings.NewReader(`{\n    \"messageId\": \"MSG-TEST-001\",\n    \"inventory\": [\n        {\n            \"productId\": \"SKU-12345\",\n            \"facilityId\": \"FAC-CHI-Z6\",\n            \"productName\": \"Dell Laptop XPS 15\",\n            \"productCategory\": \"Electronics\",\n            \"facilityName\": \"Chicago Warehouse\",\n            \"facilityType\": \"Warehouse\",\n            \"batchNumber\": \"1919149957\",\n            \"lotNumber\": \"BEDU-2423\",\n            \"locationType\": \"STANDARD\",\n            \"categoryBreakdown\": [\n                {\n                    \"category\": \"OnHand\",\n                    \"quantity\": 1500\n                },\n                {\n                    \"category\": \"QualityHold\",\n                    \"quantity\": 500\n                },\n                {\n                    \"category\": \"Reserved\",\n                    \"quantity\": 398\n                }\n            ],\n            \"uom\": \"CSE\",\n            \"lastUpdatedDate\": \"2026-08-14T10:30:00Z\",\n            \"manufacturingDate\": \"2026-04-04\",\n            \"expiryDate\": \"2027-10-04\",\n            \"materialType\": \"FINISHED_GOODS\",\n            \"unitCost\": 45.50,\n            \"currency\": \"USD\",\n            \"totalValue\": 109109.00,\n            \"referenceAttributes\": {\n                \"warehouseSection\": \"NORTH-A\",\n                \"temperatureZone\": \"AMBIENT\",\n                \"customerId\": \"CUST-789\",\n                \"palletId\": \"PAL-123456\"\n            }\n        }\n    ]\n}`)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"apikey\", \"STAGING_APIKEY\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := io.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}\n",
        "customLabel": ""
      },
      {
        "id": "iiZ_qALpFGp_4PtwXJRZX",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\nurl = URI(\"https://api-staging.fourkites.com/api/v1/async/inventory/current?message_id=MSG-TEST-001\")\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"apikey\"] = \"STAGING_APIKEY\"\nrequest.body = JSON.dump({\n  \"messageId\": \"MSG-TEST-001\",\n  \"inventory\": [\n    {\n      \"productId\": \"SKU-12345\",\n      \"facilityId\": \"FAC-CHI-Z6\",\n      \"productName\": \"Dell Laptop XPS 15\",\n      \"productCategory\": \"Electronics\",\n      \"facilityName\": \"Chicago Warehouse\",\n      \"facilityType\": \"Warehouse\",\n      \"batchNumber\": \"1919149957\",\n      \"lotNumber\": \"BEDU-2423\",\n      \"locationType\": \"STANDARD\",\n      \"categoryBreakdown\": [\n        {\n          \"category\": \"OnHand\",\n          \"quantity\": 1500\n        },\n        {\n          \"category\": \"QualityHold\",\n          \"quantity\": 500\n        },\n        {\n          \"category\": \"Reserved\",\n          \"quantity\": 398\n        }\n      ],\n      \"uom\": \"CSE\",\n      \"lastUpdatedDate\": \"2026-08-14T10:30:00Z\",\n      \"manufacturingDate\": \"2026-04-04\",\n      \"expiryDate\": \"2027-10-04\",\n      \"materialType\": \"FINISHED_GOODS\",\n      \"unitCost\": 45.5,\n      \"currency\": \"USD\",\n      \"totalValue\": 109109,\n      \"referenceAttributes\": {\n        \"warehouseSection\": \"NORTH-A\",\n        \"temperatureZone\": \"AMBIENT\",\n        \"customerId\": \"CUST-789\",\n        \"palletId\": \"PAL-123456\"\n      }\n    }\n  ]\n})\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "fN5Z7Ng-qFA-BN_tiVoAg",
        "language": "python",
        "code": "import http.client\nimport json\nconn = http.client.HTTPSConnection(\"api-staging.fourkites.com\")\npayload = json.dumps({\n  \"messageId\": \"MSG-TEST-001\",\n  \"inventory\": [\n    {\n      \"productId\": \"SKU-12345\",\n      \"facilityId\": \"FAC-CHI-Z6\",\n      \"productName\": \"Dell Laptop XPS 15\",\n      \"productCategory\": \"Electronics\",\n      \"facilityName\": \"Chicago Warehouse\",\n      \"facilityType\": \"Warehouse\",\n      \"batchNumber\": \"1919149957\",\n      \"lotNumber\": \"BEDU-2423\",\n      \"locationType\": \"STANDARD\",\n      \"categoryBreakdown\": [\n        {\n          \"category\": \"OnHand\",\n          \"quantity\": 1500\n        },\n        {\n          \"category\": \"QualityHold\",\n          \"quantity\": 500\n        },\n        {\n          \"category\": \"Reserved\",\n          \"quantity\": 398\n        }\n      ],\n      \"uom\": \"CSE\",\n      \"lastUpdatedDate\": \"2026-08-14T10:30:00Z\",\n      \"manufacturingDate\": \"2026-04-04\",\n      \"expiryDate\": \"2027-10-04\",\n      \"materialType\": \"FINISHED_GOODS\",\n      \"unitCost\": 45.5,\n      \"currency\": \"USD\",\n      \"totalValue\": 109109,\n      \"referenceAttributes\": {\n        \"warehouseSection\": \"NORTH-A\",\n        \"temperatureZone\": \"AMBIENT\",\n        \"customerId\": \"CUST-789\",\n        \"palletId\": \"PAL-123456\"\n      }\n    }\n  ]\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'apikey': 'STAGING_APIKEY'\n}\nconn.request(\"POST\", \"/api/v1/async/inventory/current?message_id=MSG-TEST-001\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "fN5Z7Ng-qFA-BN_tiVoAg"
  },
  "results": {
    "languages": [
      {
        "id": "1kGpY8aq8hZSjZvULOip6",
        "language": "202",
        "code": "{\n  \"request_id\": \"MSG-TEST-001\"\n}",
        "customLabel": ""
      },
      {
        "id": "LHZmynEvrUnjSru1ODxGI",
        "language": "401",
        "code": "{\n  \"message\": \"Invalid authentication credentials\"\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "1kGpY8aq8hZSjZvULOip6"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "messageId",
        "kind": "required",
        "type": "string",
        "description": "Your identifier for this message. Stored on every row it creates and used to name the archived payload. It is not the value returned as request_id — use the message_id query parameter for that. Neither field is checked for uniqueness and neither deduplicates."
      },
      {
        "name": "inventory",
        "kind": "required",
        "type": "object",
        "description": "Inventory positions. Non-empty. Max 500 entries",
        "children": [
          {
            "name": "productId",
            "kind": "required",
            "type": "string",
            "description": "Product or SKU identifier. Max 255 chars"
          },
          {
            "name": "facilityId",
            "kind": "required",
            "type": "string",
            "description": "Facility identifier. Max 255 chars"
          },
          {
            "name": "batchNumber",
            "kind": "required",
            "type": "string",
            "description": "Batch identifier. Cannot be null or blank — it forms part of the upsert grain. Max 50 chars"
          },
          {
            "name": "categoryBreakdown",
            "kind": "required",
            "type": "object",
            "description": "Quantities by category. Non-empty. At most one entry per category, so five entries covers every category the API defines.",
            "children": [
              {
                "name": "category",
                "kind": "required",
                "type": "string",
                "description": "One of \"OnHand\", \"QualityHold\", \"Reserved\", \"Blocked\", \"InTransit\". Case-insensitive; stored in canonical form. Any other value rejects the entire message."
              },
              {
                "name": "quantity",
                "kind": "required",
                "type": "number",
                "description": "Quantity in this category. ≥ 0. Decimals permitted."
              }
            ]
          },
          {
            "name": "lotNumber",
            "kind": "optional",
            "type": "string",
            "description": "Lot identifier. Max 50 chars"
          },
          {
            "name": "uom",
            "kind": "optional",
            "type": "string",
            "description": "Unit of measure, e.g. \"CSE\", \"EA\", \"PLT\". Stored and reported exactly as sent — no default is applied. If omitted, quantities are reported without a unit rather than defaulting to eaches. Max 10 chars"
          },
          {
            "name": "location",
            "kind": "optional",
            "type": "string",
            "description": "Free-text location within the facility. Max 200 chars"
          },
          {
            "name": "locationType",
            "kind": "optional",
            "type": "string",
            "description": "For example \"STANDARD\", \"QUARANTINE\", \"STAGING\". Not validated against a fixed list. Max 20 chars"
          },
          {
            "name": "lastUpdatedDate",
            "kind": "optional",
            "type": "string",
            "description": "Timestamp of the inventory movement. ISO 8601 (e.g., 2026-08-14T10:30:00Z). Defaults to receipt time when omitted. An unparseable value rejects the whole message."
          },
          {
            "name": "manufacturingDate",
            "kind": "optional",
            "type": "string",
            "description": "YYYY-MM-DD format. An unparseable value rejects the whole message."
          },
          {
            "name": "expiryDate",
            "kind": "optional",
            "type": "string",
            "description": "YYYY-MM-DD format. An unparseable value rejects the whole message."
          },
          {
            "name": "materialType",
            "kind": "optional",
            "type": "string",
            "description": "For example \"FINISHED_GOODS\", \"RAW_MATERIAL\", \"WIP\". Not validated against a fixed list. Max 20 chars"
          },
          {
            "name": "unitCost",
            "kind": "optional",
            "type": "number",
            "description": "Cost per unit. Must be ≥ 0."
          },
          {
            "name": "currency",
            "kind": "optional",
            "type": "string",
            "description": "ISO 4217 code, e.g. \"USD\". Must be exactly 3 chars"
          },
          {
            "name": "totalValue",
            "kind": "optional",
            "type": "number",
            "description": "Total value of the position. Must be ≥ 0."
          },
          {
            "name": "productName",
            "kind": "optional",
            "type": "string",
            "description": "Display name of the product. Max 255 chars"
          },
          {
            "name": "productCategory",
            "kind": "optional",
            "type": "string",
            "description": "Product category. Max 100 chars"
          },
          {
            "name": "facilityName",
            "kind": "optional",
            "type": "string",
            "description": "Display name of the facility. Max 255 chars"
          },
          {
            "name": "facilityType",
            "kind": "optional",
            "type": "string",
            "description": "Type of facility. Max 100 chars"
          },
          {
            "name": "referenceAttributes",
            "kind": "optional",
            "type": "object",
            "description": "Flat key-value map for custom data (string to string). Stored as sent, not interpreted. No enforced limit on count or size."
          }
        ],
        "schema": [
          {
            "name": "productId",
            "kind": "required",
            "type": "string",
            "description": "Product or SKU identifier. Max 255 chars"
          },
          {
            "name": "facilityId",
            "kind": "required",
            "type": "string",
            "description": "Facility identifier. Max 255 chars"
          },
          {
            "name": "batchNumber",
            "kind": "required",
            "type": "string",
            "description": "Batch identifier. Cannot be null or blank — it forms part of the upsert grain. Max 50 chars"
          },
          {
            "name": "categoryBreakdown",
            "kind": "required",
            "type": "object",
            "description": "Quantities by category. Non-empty. At most one entry per category, so five entries covers every category the API defines.",
            "children": [
              {
                "name": "category",
                "kind": "required",
                "type": "string",
                "description": "One of \"OnHand\", \"QualityHold\", \"Reserved\", \"Blocked\", \"InTransit\". Case-insensitive; stored in canonical form. Any other value rejects the entire message."
              },
              {
                "name": "quantity",
                "kind": "required",
                "type": "number",
                "description": "Quantity in this category. ≥ 0. Decimals permitted."
              }
            ]
          },
          {
            "name": "lotNumber",
            "kind": "optional",
            "type": "string",
            "description": "Lot identifier. Max 50 chars"
          },
          {
            "name": "uom",
            "kind": "optional",
            "type": "string",
            "description": "Unit of measure, e.g. \"CSE\", \"EA\", \"PLT\". Stored and reported exactly as sent — no default is applied. If omitted, quantities are reported without a unit rather than defaulting to eaches. Max 10 chars"
          },
          {
            "name": "location",
            "kind": "optional",
            "type": "string",
            "description": "Free-text location within the facility. Max 200 chars"
          },
          {
            "name": "locationType",
            "kind": "optional",
            "type": "string",
            "description": "For example \"STANDARD\", \"QUARANTINE\", \"STAGING\". Not validated against a fixed list. Max 20 chars"
          },
          {
            "name": "lastUpdatedDate",
            "kind": "optional",
            "type": "string",
            "description": "Timestamp of the inventory movement. ISO 8601 (e.g., 2026-08-14T10:30:00Z). Defaults to receipt time when omitted. An unparseable value rejects the whole message."
          },
          {
            "name": "manufacturingDate",
            "kind": "optional",
            "type": "string",
            "description": "YYYY-MM-DD format. An unparseable value rejects the whole message."
          },
          {
            "name": "expiryDate",
            "kind": "optional",
            "type": "string",
            "description": "YYYY-MM-DD format. An unparseable value rejects the whole message."
          },
          {
            "name": "materialType",
            "kind": "optional",
            "type": "string",
            "description": "For example \"FINISHED_GOODS\", \"RAW_MATERIAL\", \"WIP\". Not validated against a fixed list. Max 20 chars"
          },
          {
            "name": "unitCost",
            "kind": "optional",
            "type": "number",
            "description": "Cost per unit. Must be ≥ 0."
          },
          {
            "name": "currency",
            "kind": "optional",
            "type": "string",
            "description": "ISO 4217 code, e.g. \"USD\". Must be exactly 3 chars"
          },
          {
            "name": "totalValue",
            "kind": "optional",
            "type": "number",
            "description": "Total value of the position. Must be ≥ 0."
          },
          {
            "name": "productName",
            "kind": "optional",
            "type": "string",
            "description": "Display name of the product. Max 255 chars"
          },
          {
            "name": "productCategory",
            "kind": "optional",
            "type": "string",
            "description": "Product category. Max 100 chars"
          },
          {
            "name": "facilityName",
            "kind": "optional",
            "type": "string",
            "description": "Display name of the facility. Max 255 chars"
          },
          {
            "name": "facilityType",
            "kind": "optional",
            "type": "string",
            "description": "Type of facility. Max 100 chars"
          },
          {
            "name": "referenceAttributes",
            "kind": "optional",
            "type": "object",
            "description": "Flat key-value map for custom data (string to string). Stored as sent, not interpreted. No enforced limit on count or size."
          }
        ]
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "staging",
  "legacyHash": "BWW7O5bqtzPdkX7uX9df_"
}
```
:::

Staging requires its own API key. A production key returns 401 against staging. Request a staging key from your FourKites contact before testing here.

Request and body parameters are identical to Production.

### Query Parameters

| **Parameter** | **Type** | **Required** | **Default**  | **Description**                                                                                                                                                                       |
| ------------- | -------- | ------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `message_id`  | String   | Optional     | generated    | Correlation id returned to you as `request_id` — the value to log and to quote in support requests. When omitted, a `request_id` is generated as `evt_current_inventory_<timestamp>`. |
| `company_id`  | String   | Optional     | from API key | Resolved from the API key when omitted. Most callers should omit it.                                                                                                                  |

### Response

### 202 Accepted

```json
{
  "request_id": "MSG-CHI-2026-08-14-001"
}
```

`request_id` echoes `message_id` when supplied, otherwise a generated id. Use it to correlate with FourKites service logs.

202 means the payload was received and queued. It does not mean the payload was valid, that any position was stored, or that projections were updated. Processing completes asynchronously, typically within a few seconds. A malformed body also returns 202.

### 401 Unauthorized

```json
{
  "message": "Invalid authentication credentials"
}
```

Returned for a missing or invalid `apikey`.

### There are no error codes

Because validation runs after the response, no validation outcome is reported back. There is no error taxonomy to code against, no error callback, no dead-letter feed and no status endpoint. If a snapshot does not appear as expected, raise it with your FourKites contact quoting the `request_id`.

### Repeat sends

The upsert grain is:

`(company_id, facility_id, product_id, batch_number)`

Re-sending a position with the same four values overwrites the stored quantities rather than adding to them, so re-sending a full snapshot is safe.

This is why `batchNumber` is mandatory: without it the key is incomplete and repeat sends accumulate as separate positions instead of replacing one another, inflating reported inventory.

### How quantities reach projections

Only the `OnHand` category contributes to projected on-hand inventory.

`QualityHold`, `Reserved`, `Blocked` and `InTransit` are stored against the snapshot and returned by inventory queries, but are excluded from projections and from stock-risk calculations.
