Inventory

List stock discrepancies

Lists where the published stock and the marketplace stock do not match.

GET
/v1/inventory-discrepancies

Shows the account's discrepancies, newest first. Use it to see what is open and to check what was already closed.

curl "$BACKEND_URL/v1/inventory-discrepancies?status=open" \
  -H "Authorization: Bearer mk_your_api_key"

Filter by sellerId, connectionId, variantId (the measured Variant: the one the target sold when the discrepancy opened, not the one the line sells now) or status (open or resolved). Without status, both come back. Each item has publishedQuantity, observedAvailable, observedReserved and difference, which is (observedAvailable + observedReserved) − publishedQuantity.

You are also told by the inventory.discrepancy_detected and inventory.discrepancy_resolved events. To close one, use Resolve discrepancy.

Authorization

api_key
headerAuthorizationBearer <token>

API key (mk_...)

Query Parameters

page?integer

Page number, starting at 1. Defaults to 1. A page beyond pagination.totalPages is not an error: it returns empty data.

Range1 <= value <= 9007199254740991
Default1
pageSize?integer

Items per page, from 1 to 100. Defaults to 20.

Range1 <= value <= 100
Default20
sellerId?string

Only the discrepancies of this seller.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
connectionId?string

Only the discrepancies of this connection.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
variantId?string

Only the discrepancies of this Variant: the one recorded when each discrepancy opened, not the one the line sells now.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
status?string

Only discrepancies in this state. Omit it to list both.

Value in"open""resolved"

Response Body

Inventory discrepancies, newest detected first.

application/json
  1. response

One page of inventory discrepancies.

data*array<>

The discrepancies of this page, newest detected first.

pagination*

Where this page sits in the whole listing: the totals and whether there are pages before and after it.

curl -X GET "https://example.com/v1/inventory-discrepancies"
{  "data": [    {      "id": "3b7d1c4e-5a2f-4d86-9e10-7f8a9b0c1d2e",      "sellerId": "3d1c8a52-7f0e-4b0a-8a65-9c1b2f6d7e01",      "connectionId": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",      "marketplace": "mock",      "locationId": "5d0c8e2a-7b41-4f36-9a58-1c2e3f4a5b6c",      "variantId": "47c9f819-fcf6-4478-b21a-678ecc594a11",      "listingId": "0e2ce906-a6ab-4101-9461-4168c8b6b902",      "bindingId": "cb064b64-2f63-4c3e-aa42-f11ea0f82b17",      "marketplaceProductVariantId": null,      "publishedQuantity": 7,      "observedAvailable": 5,      "observedReserved": 0,      "difference": -2,      "status": "open",      "resolution": null,      "movementId": null,      "publicationJobId": null,      "detectedAt": "2026-10-12T06:05:00.000Z",      "resolvedAt": null,      "updatedAt": "2026-10-12T06:05:00.000Z"    },    {      "id": "8e5c2a9f-61b3-4f07-a4d8-0b9c7e3d1f52",      "sellerId": "3d1c8a52-7f0e-4b0a-8a65-9c1b2f6d7e01",      "connectionId": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",      "marketplace": "mock",      "locationId": "5d0c8e2a-7b41-4f36-9a58-1c2e3f4a5b6c",      "variantId": "47c9f819-fcf6-4478-b21a-678ecc594a11",      "listingId": "0e2ce906-a6ab-4101-9461-4168c8b6b902",      "bindingId": "cb064b64-2f63-4c3e-aa42-f11ea0f82b17",      "marketplaceProductVariantId": null,      "publishedQuantity": 7,      "observedAvailable": 5,      "observedReserved": 0,      "difference": -2,      "status": "resolved",      "resolution": "dismissed",      "movementId": null,      "publicationJobId": null,      "detectedAt": "2026-10-12T06:05:00.000Z",      "resolvedAt": "2026-10-12T07:00:00.000Z",      "updatedAt": "2026-10-12T07:00:00.000Z"    }  ],  "pagination": {    "page": 1,    "pageSize": 20,    "totalItems": 2,    "totalPages": 1,    "hasNext": false,    "hasPrev": false  }}