> For the complete documentation index, see [llms.txt](https://developer.esw.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.esw.com/fulfillment-api/resources/first-successful-requests/retailer-inventory.md).

# Retailer Inventory

### Goal

Send the first successful inventory availability update into Fulfillment using `POST /v1/Inventory/Sync`. This endpoint is used by retailers or 3PL providers to synchronize inventory quantities for one or more SKUs at a specific fulfillment center.

### When to use it

Use this when the retailer is the system of record for stock, or when the retailer needs to publish inventory snapshots or changes per fulfillment center. The request body requires `tenantCode`, `fulfillmentCentreId`, `provider`, and `items`; each inventory item requires `sku` and `articleStatus`, while `quantity` is present but not marked required in the schema. `ArticleStatus` supports `Expected`, `Active`, `Quarantine`, and `Suspended`.

### What first <mark style="color:$success;">`success`</mark> looks like

Your first success is a <mark style="color:$success;">`202 Accepted`</mark> from `POST /v1/Inventory/Sync`. A validation failure returns `400` with `ValidationProblemDetails`; the example shows missing `FulfillmentCentreId` and `Provider` as concrete validation failures.

### Smallest useful payload

This is the smallest practical payload that satisfies the declared required fields and sends one active SKU.

{% code expandable="true" %}

```json
curl -X POST "https://api.test.esw.com/v1/Inventory/Sync" \
  -H "Authorization: Bearer <JWT>" \
  -H "Content-Type: application/json" \
  -d '{
    "tenantCode": "RETAILER_01",
    "fulfillmentCentreId": "FC-DUB-01",
    "provider": "RetailerWMS",
    "items": [
      {
        "sku": "SKU-10001",
        "articleStatus": "Active",
        "quantity": 25
      }
    ]
  }'
```

{% endcode %}

It includes every top-level field the schema marks as required, and each item includes the required `sku` and `articleStatus`. It also uses `quantity`, which is optional in the schema but operationally useful for an inventory sync.

### Immediate checks after the call

If you receive `202`, you have proven:

* network reachability to the test host
* Bearer token formatting
* JSON structure accepted by validation
* the basic retailer-to-fulfillment inventory path is open

### First <mark style="color:$danger;">`failure`</mark> to expect

A malformed or incomplete payload should return <mark style="color:$danger;">`400`</mark> in `ValidationProblemDetails` format, with field-level errors under `errors`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.esw.com/fulfillment-api/resources/first-successful-requests/retailer-inventory.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
