{"info":{"title":"OneCart API","description":"The OneCart API lets you manage your products, orders, listings, and\nsales analytics across every channel you sell on — Shopee, Lazada,\nShopify, TikTok, and more — from one place.\n\n\u003e **Using API v1?** Version 1 is deprecated and at end of life. It will\n\u003e keep running **without support until 31 January 2027**, after which it\n\u003e will be shut down. Please migrate to v2 (documented here) in good time\n\u003e — see [Versioning](#versioning).\n\n- **Base URL:** `https://app.getonecart.com/api/v2`\n- All responses are JSON. Request parameters can be sent as query\n  strings, form fields, or a JSON body.\n\n## Authentication\n\nEvery request must include your API key in the `Authorization` header:\n\n```\nAuthorization: YOUR_API_KEY\n```\n\nCreate and manage keys in **Settings → API Keys** in your OneCart\ndashboard. Each key belongs to one company and only ever sees that\ncompany's data.\n\nAccess within v2 is controlled one of two ways.\n\n**1. Access level (default).** Every key is either:\n\n- **Full access** — read and write.\n- **Read-only** — `GET` requests only. Any write returns `403 FORBIDDEN`.\n\nExisting keys use this model and need no change.\n\n**2. Granular scopes (optional).** A key can instead be limited\nto specific resources and actions with `resource:action` scopes. Each\nrequest is checked against the resource in the URL path and the HTTP\nmethod — safe methods (`GET`, `HEAD`, `OPTIONS`) count as `read`,\neverything else as `write`.\n\n| Scope | Grants |\n| --- | --- |\n| `orders:read` | read the `orders` resource |\n| `orders:write` | write `orders` (does **not** include read) |\n| `orders:*` | read and write `orders` |\n| `*:read` | read every resource |\n| `*` | full access — every resource, both actions |\n\nA key can hold several scopes (e.g. `orders:read` and `shops:read`). A\nrequest its scopes don't cover returns `403 FORBIDDEN` with\n`details: [{ \"field\": \"scope\", \"message\": \"requires \u003cresource\u003e:\u003caction\u003e\" }]`.\nKeys created with granular scopes are **v2-only**: API v1 rejects them\nwith `403`. Keys created before scopes existed keep working on v1 until\nit shuts down (see Versioning).\n\nA missing or invalid key returns `401 UNAUTHORIZED`.\n\n## Connect from an AI agent (MCP)\n\nYou can connect an AI assistant such as Claude Code to this API through a\nsingle Model Context Protocol (MCP) endpoint, and every operation below\nbecomes a callable tool with no per-endpoint wiring:\n\n```\nhttps://app.getonecart.com/mcp\n```\n\n**Connect with OAuth.** Point your MCP client at that URL and it runs a\nstandard browser sign-in: you pick the company and the scopes to grant\n(reads are pre-selected, writes are off by default), and the client\nreceives a token bound to that company. In Claude Code:\n\n```\nclaude mcp add --transport http onecart https://app.getonecart.com/mcp\n```\n\n**Connect with an API key.** For a script, or a client that does not use\nOAuth, send an existing API key (Settings, API Keys) in the\n`Authorization` header instead, the same key you use for REST.\n\nTools map one to one to the operations documented here (`get_orders`,\n`put_variants_bulk_update`, and so on). Authentication, company isolation,\nscopes, and rate limits are identical to the REST API, because each tool\ncall runs through the same v2 stack. Read tools are marked read-only and\ncancel or delete tools are marked destructive, so a client can warn\nbefore a write.\n\n## Rate limits\n\nRequests are limited to **300 per 60 seconds, per API key**. Every\nresponse to a rate-limited endpoint carries:\n\n| Header | Meaning |\n| --- | --- |\n| `X-RateLimit-Limit` | Requests allowed in the window |\n| `X-RateLimit-Remaining` | Requests left in the current window |\n| `X-RateLimit-Reset` | Unix time when the window resets |\n\nOver the limit returns `429 RATE_LIMITED` with a `Retry-After` header\n(seconds to wait). Back off and retry after that interval.\n\n## Response format\n\nEvery successful response is wrapped in a consistent envelope:\n\n```json\n{\n  \"data\": { },\n  \"meta\": { },\n  \"links\": { },\n  \"errors\": [],\n  \"warnings\": []\n}\n```\n\n- `data` — the resource or list of resources you requested.\n- `meta` — pagination and context (see below).\n- `links` — pagination links; present on list endpoints only.\n- `errors` — always empty (`[]`) on a successful response. When a request\n  fails you get a different shape instead — see [Errors](#errors).\n- `warnings`: non-fatal notices that never change the status code, such\n  as deprecations and \"did you mean\" hints for an unknown parameter or\n  field name. Usually empty. Each entry is\n  `{ \"code\": \"...\", \"field\": \"...\", \"message\": \"...\" }`.\n\n## Pagination\n\nList endpoints accept `page` (default `1`) and `per_page`\n(default `25`, max `100`). `meta` reports where you are:\n\n```json\n\"meta\": {\n  \"current_page\": 2,\n  \"per_page\": 25,\n  \"total_items\": 342,\n  \"total_pages\": 14,\n  \"has_next_page\": true,\n  \"has_previous_page\": true\n}\n```\n\n`links` gives ready-made URLs for `self`, `first`, `prev`, `next`,\nand `last` — follow `next` until it is `null`.\n\n## How the catalog fits together\n\nThe API has one resource per object in the app:\n\n```\nProduct ──\u003c Variant (SKU)                          your item master\nProduct ──\u003c Image\nShop ──\u003c Import ──matched──\u003e Listing ──\u003c Link \u003e── Variant\n```\n\n- `/products` and `/variants` are your item master.\n- `/imports` are products as they exist on each shop. Every import can be\n  matched; only a manual shop's imports can be created or edited, since\n  the next pull from a connected shop would overwrite an edit.\n- `POST /listings` matches an import to your SKUs, which creates a listing.\n- `POST /cross_posts` publishes a product or an import to other platforms.\n\n## Keeping stock in sync\n\nOneCart holds the stock. To keep another system (your own e-shop, an\nERP) in step, read the absolute quantity from OneCart. Don't rebuild it\nfrom orders: stock also changes through returns, edits, uploads and\nother channels.\n\n- Poll `GET /variants?updated_start=\u003cunix time\u003e`. Every stock or detail\n  change updates a variant's `updated_at`. Set `updated_start` to your\n  last poll time minus 2 minutes. Reading a SKU twice is harmless, and\n  it catches changes saved while you were polling.\n- Send your own sales to OneCart as soon as they happen\n  (`POST /orders/manual` for a manual channel), so the stock you read\n  back already includes them.\n- Once a day, page through all of `GET /variants` as a safety net.\n\n## Webhooks\n\nOutbound webhooks are coming as a **paid add-on**, starting with stock\nchanges (absolute quantities). Email hello@getonecart.com to register\ninterest. Until then, poll as described above.\n\n## Choosing fields\n\nMost endpoints support a `_fields` query parameter so you only fetch\nwhat you need:\n\n- Omit it for the resource's default fields.\n- Pass a bare list — `?_fields=id,order_no,status` — to get exactly\n  those fields (`id` is always included).\n- Adjust the defaults with `+`/`-` — `?_fields=+order_items,-tracking_no`.\n\nUnknown field names are ignored, and a `warnings` entry tells you which\none and suggests the closest real field. Mixing a bare list with `+`/`-`\nadjustments in the same request returns a `400`.\n\n## Warnings\n\nA successful response can carry non-fatal `warnings` alongside its\n`data`. A warning **never changes the status code** and never drops a\nresult. It points out something that was silently ignored, so an\nexisting client keeps working unchanged. Each entry is:\n\n```json\n{ \"code\": \"UNKNOWN_PARAM\", \"field\": \"updated_at\",\n  \"message\": \"Unknown parameter 'updated_at'. Did you mean 'updated_start'?\" }\n```\n\n| Code | Meaning |\n| --- | --- |\n| `UNKNOWN_PARAM` | A query or body parameter is not one this endpoint accepts |\n| `UNKNOWN_FIELD` | A name in `_fields` is not a field of this resource |\n| `FIELD_NOT_ENABLED` | A field was requested that your account is not permitted to receive |\n| `IMAGE_NOT_ADDED` | One file or URL of a `POST /products/{id}/images` was refused; the others were added |\n\nFor example, requesting `raw_data` without raw-data access returns the\ndefault fields plus:\n\n```json\n{ \"code\": \"FIELD_NOT_ENABLED\", \"field\": \"raw_data\",\n  \"message\": \"Field 'raw_data' is not enabled for this account. Ask OneCart support to enable raw data access.\" }\n```\n\nA `404` for an unknown path is not a warning (there is no success\nenvelope), but its error `details` carry the same kind of hint:\n`{ \"field\": \"route\", \"message\": \"Did you mean GET /api/v2/orders?\" }`.\n\n## Errors\n\nWhen a request fails, the body is a single `error` object — not the empty\n`errors` array from the success envelope:\n\n```json\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Validation failed\",\n    \"details\": [{ \"field\": \"quantity\", \"message\": \"must be an integer\" }],\n    \"request_id\": \"b1f2…\"\n  }\n}\n```\n\n`request_id` matches the `X-Request-Id` response header — include it when\ncontacting support.\n\nA `400 VALIDATION_ERROR` explains itself. Each failing field says what\nthe endpoint expects, the shape you sent (never your values), a `hint`\nwhen the cause is a common one, and a link to the endpoint's reference.\nThe error also carries a minimal valid `example` request. For\nexample, a form-encoded `PUT /variants/bulk_update` sent as separate\nlists (`updates[id][]=…\u0026updates[quantity][]=…`) returns:\n\n```json\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Validation failed: Send the body as JSON with Content-Type: application/json. Send one object per row: [{\"id\":\"123\",\"quantity\":5}], not separate lists per field (updates[id][], updates[quantity][]). updates is invalid: expected array of objects {id: string (required), quantity: integer, custom_attributes: object}, received object with keys id, quantity (each an array)\",\n    \"details\": [{\n      \"field\": \"updates\",\n      \"message\": \"updates is invalid: expected array of objects {…}, received object with keys id, quantity (each an array)\",\n      \"path\": \"updates\",\n      \"expected\": \"array of objects {id: string (required), quantity: integer, custom_attributes: object}\",\n      \"received\": \"object with keys id, quantity (each an array)\",\n      \"hint\": \"Send the body as JSON with Content-Type: application/json. Send one object per row: [{\"id\":\"123\",\"quantity\":5}], not separate lists per field (updates[id][], updates[quantity][]).\",\n      \"docs_url\": \"https://developers.getonecart.com/reference#tag/variants/PUT/api/v2/variants/bulk_update\"\n    }],\n    \"example\": { \"updates\": [{ \"id\": \"123\", \"quantity\": 5 }] },\n    \"docs_url\": \"https://developers.getonecart.com/reference#tag/variants/PUT/api/v2/variants/bulk_update\",\n    \"request_id\": \"b1f2…\"\n  }\n}\n```\n\n`field` names the parameter as before (`updates[0][quantity]` for a\nnested one); `path` gives the same as a dotted path\n(`updates[0].quantity`). A misspelled\nparameter gets a did-you-mean detail (`Unknown parameter 'orders'. Did\nyou mean 'order_ids'?`). Endpoints that take arrays of objects need a\nJSON body: send it with `Content-Type: application/json`.\n\n| Code | Status | Meaning |\n| --- | --- | --- |\n| `UNAUTHORIZED` | 401 | Missing or invalid API key |\n| `FORBIDDEN` | 403 | Key lacks access (e.g. read-only key on a write) |\n| `NOT_FOUND` | 404 | Resource does not exist or isn't yours |\n| `VALIDATION_ERROR` | 400 / 422 | Request parameters were invalid |\n| `CONFLICT` | 409 | The record already exists; the error names its id |\n| `RATE_LIMITED` | 429 | Too many requests — see Rate limits |\n\n## Versioning\n\nThis is version 2 of the OneCart API — the current, actively supported\nversion. We add fields without notice, so build clients that ignore\nunrecognized fields; breaking changes ship as a new version.\n\n**Version 1 is deprecated and at end of life.** It remains available but\n**unsupported until 31 January 2027**, after which it will be shut down\npermanently. All v1 users are strongly encouraged to migrate to v2 well\nbefore that date.\n","contact":{"name":"OneCart Developer Support","email":"hello@getonecart.com"},"version":"2.0"},"swagger":"2.0","produces":["application/json"],"securityDefinitions":{"api_key":{"type":"apiKey","name":"Authorization","in":"header","description":"Your OneCart API key, sent in the Authorization header. Create and manage keys in Settings \u003e API Keys. A read-only key may call GET endpoints only; a key with granular resource:action scopes may call only the resources and actions it was granted."}},"security":[{"api_key":[]}],"host":"app.getonecart.com","tags":[{"name":"Products","description":"Your parent products and their images. A product has many variants (SKUs)."},{"name":"Variants","description":"Your variants (SKUs): stock levels, prices, and the item details of the variant form."},{"name":"Imports","description":"Products as they exist on each shop, before they are matched to your SKUs. Every import can be matched; only a manual shop's imports can be created or edited."},{"name":"Listings","description":"Your product listings on each sales channel. Matching an import to your SKUs creates a listing."},{"name":"Channel prices","description":"The price of each SKU on each channel (a channel link), and updating it."},{"name":"Orders","description":"Read orders from every connected channel. To ship them, follow Fulfilment 1, 2 and 3 below."},{"name":"Fulfilment 1: Orders to ship","description":"The Order Processing queue: unshipped orders with the items to pick and pack, and marking them picked."},{"name":"Fulfilment 2: Arrange shipment","description":"Tell the marketplace how the parcel leaves you, with the same options as Order Processing: Shopee pickup time or dropoff (per order or per package, and splitting), Lazada and Zalora pack and ready to ship, TikTok ready to ship or your own tracking, Qoo10 confirm with a pickup date, Temu buy shipping, Shopify and WooCommerce fulfil. Read the options, arrange one order or up to 50 at once, or let OneCart choose automatically. The marketplace then assigns a tracking number."},{"name":"Ship with your logistics provider","description":"Book Shopify, WooCommerce and Magento orders with your own SPX or SingPost account: pickup slots, parcels, tracking numbers, labels and cancellation."},{"name":"Fulfilment 3: Print labels \u0026 documents","description":"Print shipping labels once the order has a tracking number, plus the other documents Order Processing prints: invoices, carrier manifests, receipts, packing slips, picking lists. Orders that cannot have a document yet are listed in `skipped_orders` with the reason, and nothing is sent to the marketplace for them."},{"name":"Own delivery (seller-own-fleet)","description":"For orders you deliver yourself or with your own courier: ready to ship, tracking numbers and delivery, in bulk."},{"name":"Cancellations","description":"Cancel orders and list cancelled ones."},{"name":"Brands","description":"The brands in your catalog."},{"name":"Categories","description":"Buyer categories and the SKUs assigned to them."},{"name":"Shops","description":"The sales channels connected to your account."},{"name":"Locations","description":"Stock levels at your Shopify store locations."},{"name":"Coverage","description":"Which SKUs are listed on which channels."},{"name":"Account Health","description":"Account setup and data-quality completeness for the AI agent."},{"name":"Bundle Uploads","description":"Bulk-create product bundles from a list."},{"name":"Insights","description":"Sales, inventory, and performance analytics."},{"name":"Reviews","description":"Marketplace reviews inbox: read reviews and KPIs, and post seller replies."},{"name":"Backfills","description":"Get an account report-ready: create brands and categories from every connected channel, and link past order lines to products. Background jobs, safe to repeat."},{"name":"Cross-posting","description":"Copy a product listing onto your other sales channels in two steps: prepare an AI-built draft, then publish it live."},{"name":"AI","description":"AI content tools: enhance a listing title or description. Metered against your AI credits."},{"name":"Fees","description":"Marketplace fee breakdowns by brand, category, shop, and SKU."},{"name":"Utilities","description":"Connection and credential checks."}],"paths":{"/api/v2/brands/{id}/skus":{"get":{"summary":"List a brand's SKUs","description":"Returns every SKU under a single brand, ordered by SKU, each with its product, on-hand quantity, and price. Use `page` and `per_page` to page through brands with large catalogs.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"Brand ID","type":"integer","format":"int32","required":true},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List a brand's SKUs","schema":{"$ref":"#/definitions/API_V2_Entities_BrandSkusEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Brand not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Brands"],"operationId":"getApiV2BrandsIdSkus"}},"/api/v2/brands":{"get":{"summary":"List brands","description":"Returns every brand in your catalog with its SKU count, ordered by name. Use `page` and `per_page` to page through large catalogs, and `_fields` to select which fields you receive.","produces":["application/json"],"parameters":[{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List brands","schema":{"$ref":"#/definitions/API_V2_Entities_BrandsCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Brands"],"operationId":"getApiV2Brands"}},"/api/v2/shops/{id}/import_listings":{"post":{"summary":"Import a shop's listings","description":"Queues a full import of every listing on this shop, the same job the Imports page runs, and returns at once. Poll GET /shops/{id} (`last_imported_at`) or GET /listings?shop_id={id} a few minutes later. If an import is already in flight, nothing new is queued (`already_queued: true`).","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the shop to import. It must be active and on a platform whose listings can be imported.","type":"integer","format":"int32","required":true}],"responses":{"201":{"description":"Import a shop's listings","schema":{"$ref":"#/definitions/API_V2_Entities_ImportListingsEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Shop not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Shop is inactive; its platform does not support listing import","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Shops"],"operationId":"postApiV2ShopsIdImportListings"}},"/api/v2/shops/{id}":{"get":{"summary":"Get a shop","description":"Returns a single connected shop by its OneCart ID, including its platform, connection status, and `last_imported_at` (when its listings were last imported). Poll it after triggering an import to see the import land.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the shop.","type":"integer","format":"int32","required":true},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Get a shop","schema":{"$ref":"#/definitions/API_V2_Entities_ShopEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Shop not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Shops"],"operationId":"getApiV2ShopsId"}},"/api/v2/shops/{id}/manual":{"patch":{"summary":"Update an offline / manual channel","description":"Renames a manual shop, changes its colour, or deactivates it (an inactive manual shop is hidden from the manual order form; its past orders stay in reports). Only manual shops can be changed here: a connected shop returns 404.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the manual shop.","type":"integer","format":"int32","required":true},{"in":"formData","name":"shop_platform","description":"New channel name.","type":"string","required":false},{"in":"formData","name":"shop_name","description":"New shop name.","type":"string","required":false},{"in":"formData","name":"colour","description":"New chart colour, `#rrggbb`. Send an empty string to clear it.","type":"string","required":false},{"in":"formData","name":"active","description":"false to deactivate the channel, true to reactivate it.","type":"boolean","required":false}],"responses":{"200":{"description":"Update an offline / manual channel","schema":{"$ref":"#/definitions/API_V2_Entities_ShopEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Manual shop not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Invalid channel name, duplicate, or bad colour","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Shops"],"operationId":"patchApiV2ShopsIdManual"}},"/api/v2/shops/manual":{"post":{"summary":"Create an offline / manual channel","description":"Creates a manual shop: a sales channel with no integration, such as walk-in, Instagram or corporate orders, as Connect → \"Offline / manual channel\" does in the app. Record its sales with POST /orders/manual and add its products with POST /imports; nothing is ever pulled from or pushed to it.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"shop_platform","description":"Channel name, e.g. `Walk-in`, `Instagram`. Up to 30 characters; becomes the order platform in reports and filters. Cannot be a connected platform (Shopee, Lazada, ...).","type":"string","required":true},{"in":"formData","name":"shop_name","description":"Shop name within the channel, e.g. `Orchard Road store`. `shop_platform` + `shop_name` must be unique in your account (case-insensitive).","type":"string","required":true},{"in":"formData","name":"colour","description":"Chart colour for this channel, `#rrggbb`.","type":"string","required":false}],"responses":{"201":{"description":"Create an offline / manual channel","schema":{"$ref":"#/definitions/API_V2_Entities_ShopEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Channel name is a connected platform or too long; channel + shop name already exist; colour is not `#rrggbb`","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Shops"],"operationId":"postApiV2ShopsManual"}},"/api/v2/shops":{"get":{"summary":"List shops","description":"Returns every shop across your sales channels, newest first, with its platform and connection status. Offline / manual channels have `is_manual: true`: OneCart never imports, matches or pushes to them; you add their products with POST /imports. Page with `page` and `per_page`; choose fields with `_fields`.","produces":["application/json"],"parameters":[{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List shops","schema":{"$ref":"#/definitions/API_V2_Entities_ShopsCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Shops"],"operationId":"getApiV2Shops"}},"/api/v2/orders/{id}":{"put":{"summary":"Arrange shipment automatically (mark_as_shipped)","description":"Arranges shipment with OneCart choosing the method (e.g. Lazada's \"Set as Ready to Ship\" button), so the marketplace assigns tracking. Despite the name, the parcel has NOT left. Runs in the background: poll `GET /orders/{id}` until `tracking_no` is set, then `POST /orders/print_awbs`; if nothing is queued, `warnings` says why.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the order.","type":"string","required":true},{"in":"formData","name":"mark_as_shipped","description":"`true` (default). Shopee: pickup at the default address 12PM - 3PM, else dropoff; Lazada/Zalora: Ready to Ship; TikTok: ship packages; Shopify/WooCommerce: fulfil; Qoo10: next-day pickup.","type":"boolean","default":true,"required":true}],"responses":{"200":{"description":"Arrange shipment automatically (mark_as_shipped)","schema":{"$ref":"#/definitions/API_V2_Entities_Order"}},"400":{"description":"`mark_as_shipped` missing or not a boolean","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Order not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 2: Arrange shipment"],"operationId":"putApiV2OrdersId"},"get":{"summary":"Get an order","description":"Returns a single order by its OneCart ID, including its status, totals, and shipping details. Add `_fields` to include heavier fields such as the order line items.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the order.","type":"integer","format":"int32","required":true},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Get an order","schema":{"$ref":"#/definitions/API_V2_Entities_Order"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Order not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Orders"],"operationId":"getApiV2OrdersId"}},"/api/v2/orders/documents/{job_id}":{"get":{"summary":"Get a background document","description":"Returns a document started by `POST /orders/documents` (or a Zalora label from `POST /orders/print_awbs`). Poll every few seconds until `status` is `completed` (the PDF is in `pdf_data_base64`) or `failed`. Documents are kept for about 30 minutes.","produces":["application/json"],"parameters":[{"in":"path","name":"job_id","description":"The `job_id` from `POST /orders/documents` or a Zalora `POST /orders/print_awbs` entry.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get a background document","schema":{"$ref":"#/definitions/API_V2_Entities_DocumentJobEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Document not found (another company's, or cleaned up after about 30 minutes)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 3: Print labels \u0026 documents"],"operationId":"getApiV2OrdersDocumentsJobId"}},"/api/v2/orders/documents":{"post":{"summary":"Print invoices, receipts, picking lists and other documents","description":"Generates the documents Order Processing prints. As in the app, Lazada invoices and manifests PACK pending orders first, a picking list marks its orders picked and labels mark orders printed. Unready orders are in `skipped_orders`; background documents return a `job_id` to poll at `GET /orders/documents/{job_id}`.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"order_ids","description":"1 to 50 order IDs, or up to 200 for the background documents (`lazada_label_and_invoice`, `shopee_label_and_receipt`, `zalora_*`).","type":"array","items":{"type":"integer","format":"int32"},"required":true},{"in":"formData","name":"document","description":"Platform documents (`lazada_…`, `zalora_…`) skip other platforms' orders. `order_receipt`: Shopee, TikTok, Shopify. `order_pdf`, `custom_awb` (A6 label), `picking_list`: any.","type":"string","enum":["lazada_invoice","lazada_carrier_manifest","lazada_label_and_invoice","shopee_label_and_receipt","tiktok_label_and_packing_slip","zalora_label","zalora_invoice","zalora_shipping_docs","qoo10_waybill","order_receipt","order_pdf","custom_awb","picking_list"],"required":true},{"in":"formData","name":"with_sku_list","description":"`lazada_label_and_invoice` only: print the seller SKUs on the label.","type":"boolean","default":false,"required":false},{"in":"formData","name":"output","description":"`picking_list` only: `pdf` (default) or `json` (one row per SKU with total quantity, bin location and orders).","type":"string","default":"pdf","enum":["pdf","json"],"required":false},{"in":"formData","name":"images","description":"`picking_list` PDF only: `false` leaves out the product images.","type":"boolean","default":true,"required":false}],"responses":{"201":{"description":"Print invoices, receipts, picking lists and other documents","schema":{"$ref":"#/definitions/API_V2_Entities_DocumentsResult"}},"400":{"description":"`document` or `output` outside its values, or `order_ids` empty / over the limit","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"An order id is missing or another company's (nothing generated)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 3: Print labels \u0026 documents"],"operationId":"postApiV2OrdersDocuments"}},"/api/v2/orders/print_awbs":{"post":{"summary":"Print shipping labels","description":"Generates marketplace shipping labels (AWBs), one `print_jobs` entry per shop; Zalora prepares them in the background (poll its `poll` URL). Orders that cannot print yet are in `skipped_orders` and not sent to the marketplace. Arrange shipment first; for invoices and other documents use `POST /orders/documents`.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"order_ids","description":"The OneCart IDs of the orders to print labels for. Each needs shipment arranged (`PUT /orders/{id}` or `POST /orders/{id}/arrange_shipment`) first.","type":"array","items":{"type":"integer","format":"int32"},"required":true},{"in":"formData","name":"with_sku_list","description":"Lazada only: include a SKU picking list on the label (default false).","type":"boolean","default":false,"required":false},{"in":"formData","name":"document_type","description":"TikTok only: `SHIPPING_LABEL` (default) or `SHIPPING_LABEL_AND_PACKING_SLIP`.","type":"string","default":"SHIPPING_LABEL","required":false}],"responses":{"201":{"description":"Print shipping labels","schema":{"$ref":"#/definitions/API_V2_Entities_PrintAwbsResult"}},"400":{"description":"`order_ids` missing or not integers","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"An order id is missing or another company's (nothing printed)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 3: Print labels \u0026 documents"],"operationId":"postApiV2OrdersPrintAwbs"}},"/api/v2/orders/bulk_cancel":{"put":{"summary":"Cancel orders in bulk","description":"Cancels multiple orders in one request. Each order succeeds or fails on its own, and the response reports the outcome per order. Provide a `cancel_reason` per order, or let each fall back to its platform default.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"cancellations[id]","description":"The OneCart ID of the order.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"cancellations[cancel_reason]","description":"Reason sent to the platform for this order. Defaults to the platform standard out-of-stock reason when omitted.","type":"array","required":false,"items":{"type":"string"}}],"responses":{"200":{"description":"Cancel orders in bulk","schema":{"$ref":"#/definitions/API_V2_Entities_BulkCancelResult"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Cancellations"],"operationId":"putApiV2OrdersBulkCancel"}},"/api/v2/orders/{id}/cancel":{"put":{"summary":"Cancel an order","description":"Cancels an order on its sales channel and returns the response from the platform. When `cancel_reason` is omitted, a platform-appropriate default is used.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the order.","type":"string","required":true},{"in":"formData","name":"cancel_reason","description":"Reason sent to the platform. Defaults to the platform standard out-of-stock reason when omitted.","type":"string","required":false}],"responses":{"200":{"description":"Cancel an order","schema":{"$ref":"#/definitions/API_V2_Entities_OrderCancelResult"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Order not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Cancellations"],"operationId":"putApiV2OrdersIdCancel"}},"/api/v2/orders/{id}/manual":{"patch":{"summary":"Update a manual order (status, customer and address data)","description":"Switches a manual order between `pending` and `completed`, replaces its `raw_data`, or both (send at least one). `raw_data` keys shown in the app: `customer` {name,email,phone}, `shipping_address`/`billing_address` {name,phone,address1,address2,city,state,postcode,country}. Stock is never touched.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the manual order.","type":"integer","format":"int32","required":true},{"in":"formData","name":"status","description":"`pending` (recorded, not handed over) or `completed` (fulfilled); both count in sales reports. A Cancelled order's status cannot change (422).","type":"string","enum":["pending","completed"],"required":false},{"in":"formData","name":"raw_data","description":"Replaces your data on the order: send the whole object, keys left out are removed (OneCart's own kept). Same format as POST /orders/manual: ≤ 64 KB, reserved keys 422.","type":"object","required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Order status updated","schema":{"$ref":"#/definitions/API_V2_Entities_OrderEnvelope"}},"400":{"description":"Neither `status` nor `raw_data` sent, `status` outside its values, or `raw_data` not an object","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Manual order not found (a connected-shop order is also 404)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"`status` sent for a Cancelled order; `raw_data` has a reserved key or is over 64 KB","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Orders"],"operationId":"patchApiV2OrdersIdManual"}},"/api/v2/orders/{id}/reverse":{"post":{"summary":"Reverse a manual order","description":"Cancels a manual order and puts its stock back (the opposite of POST /orders/manual with `deduct_inventory`). Only for manual-shop orders whose stock was deducted and not yet put back; anything else returns 422 and changes nothing, so a retry never puts stock back twice.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the manual order.","type":"integer","format":"int32","required":true},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Order reversed, stock put back","schema":{"$ref":"#/definitions/API_V2_Entities_OrderEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Order not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"A connected-shop order (use PUT /orders/{id}/cancel); stock never deducted or already put back","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Orders"],"operationId":"postApiV2OrdersIdReverse"}},"/api/v2/orders/manual":{"post":{"summary":"Record a manual order","description":"Records a sale on one of your manual channels (`is_manual: true` shops), as \"Add manual order\" in the app; it shows in reports under the channel name. Stock is taken off and synced unless `deduct_inventory` is false. Optional `raw_data` holds your own data (customer, addresses, ERP refs). Undo with POST /orders/{id}/reverse.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"shop_id","description":"ID of one of your manual shops (`is_manual: true` in GET /shops). Any other shop is a 404.","type":"integer","format":"int32","required":true},{"in":"formData","name":"order_no","description":"Your order number, unique in your account (a duplicate is a 422). Generated when omitted.","type":"string","required":false},{"in":"formData","name":"order_date","description":"When the sale happened, e.g. `2026-10-14T15:30:00+08:00`; no offset = Singapore time. Defaults to now; an invalid date is a 422.","type":"string","required":false},{"in":"formData","name":"status","description":"`completed` (default, fulfilled) or `pending` (recorded, not yet handed over).","type":"string","default":"completed","enum":["pending","completed"],"required":false},{"in":"formData","name":"deduct_inventory","description":"Take the quantities off stock and sync them to your channels, as in the app (default true).","type":"boolean","default":true,"required":false},{"in":"formData","name":"items[sku]","description":"SKU from your catalogue.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"items[qty]","description":"Quantity sold, at least 1 (422 otherwise).","type":"array","required":true,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"items[sold_price]","description":"Unit price charged, not negative (422 otherwise).","type":"array","required":true,"items":{"type":"number","format":"float"}},{"in":"formData","name":"expenses[fee_type]","description":"`shipping_seller_paid` (delivery cost), `transaction` (payment fee), `voucher_seller_funded` (discount given) or `other`.","type":"array","required":true,"items":{"type":"string","enum":["shipping_seller_paid","transaction","voucher_seller_funded","other"]}},{"in":"formData","name":"expenses[amount]","description":"Amount in your base currency, greater than 0 (422 otherwise).","type":"array","required":true,"items":{"type":"number","format":"float"}},{"in":"formData","name":"expenses[note]","description":"Optional note (e.g. the courier), up to 100 characters; longer is a 422.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"raw_data","description":"JSON object ≤ 64 KB. Shown in the app: `customer` {name, email, phone}, `shipping_address` / `billing_address` {name, phone, address1, address2, city, state, postcode, country}. `items`, `source`, `created_by_user_id` are reserved (422).","type":"object","required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"201":{"description":"Record a manual order","schema":{"$ref":"#/definitions/API_V2_Entities_OrderEnvelope"}},"400":{"description":"`status` or `fee_type` outside its values, or `raw_data` not an object","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Manual shop not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Unknown SKUs (nothing written); duplicate order_no; bad order_date, qty or sold_price; bad expense or above items total; reserved raw_data key or \u003e 64 KB","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Orders"],"operationId":"postApiV2OrdersManual"}},"/api/v2/orders/{id}/shippable_items":{"get":{"summary":"Get the items left to ship","description":"The order's line items still to ship with your own logistics provider, as Order Processing's Parcels section shows them. Use each `ref` and up to its `unshipped_qty` in `parcels[].line_items` of `POST /shipments`. An empty list means nothing is left to ship, or the order has no item breakdown (ship it whole with `order_ids`).","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the order.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get the items left to ship","schema":{"$ref":"#/definitions/API_V2_Entities_ShippableItemsEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Order not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Ship with your logistics provider"],"operationId":"getApiV2OrdersIdShippableItems"}},"/api/v2/orders/{id}/picking":{"put":{"summary":"Mark an order picked or not picked","description":"Marks one order as picked (`picked: true`) or back to not picked (`picked: false`), the same as the \"Mark as picked\" button on the picking list in the app. Only changes OneCart; nothing is sent to the marketplace.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the order.","type":"integer","format":"int32","required":true},{"in":"formData","name":"picked","description":"`true` to mark the order picked, `false` to mark it not picked.","type":"boolean","required":true}],"responses":{"200":{"description":"Mark an order picked or not picked","schema":{"$ref":"#/definitions/API_V2_Entities_PickingOrderEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Order not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 1: Orders to ship"],"operationId":"putApiV2OrdersIdPicking"}},"/api/v2/orders/picking":{"put":{"summary":"Mark orders picked or not picked","description":"Marks several orders picked (`picked: true`) or not picked (`picked: false`), the same flag as the picking list and Order Processing in the app, where picked orders show green. Only changes OneCart; nothing is sent to the marketplace. Read the flag back with `GET /delivery_orders?_fields=%2Bpicked`.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"order_ids","description":"The OneCart IDs of the orders, 1 to 500. An id that is not one of your orders gets a `NOT_FOUND` row in `results`; the others still update.","type":"array","items":{"type":"integer","format":"int32"},"required":true},{"in":"formData","name":"picked","description":"`true` to mark the orders picked, `false` to mark them not picked.","type":"boolean","required":true}],"responses":{"200":{"description":"Mark orders picked or not picked","schema":{"$ref":"#/definitions/API_V2_Entities_PickingResultEnvelope"}},"400":{"description":"`order_ids` empty or over 500 ids","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 1: Orders to ship"],"operationId":"putApiV2OrdersPicking"}},"/api/v2/orders/{id}/split":{"post":{"summary":"Split a Shopee order into packages","description":"Splits a Shopee order into two or more packages before shipment is arranged, the same call as the app's Split Order page. Nothing is sent to Shopee until the split passes checks, and it cannot be undone through the API. Then arrange each new package with `POST /orders/{id}/arrange_shipment` and `packages`.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the order.","type":"integer","format":"int32","required":true},{"in":"formData","name":"package_list[item_list][item_id]","description":"Shopee item_id.","type":"array","required":true,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"package_list[item_list][model_id]","description":"Shopee model_id (0 when the item has no variations).","type":"array","required":true,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"package_list[item_list][order_item_id]","description":"Shopee order_item_id.","type":"array","required":true,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"package_list[item_list][model_quantity]","description":"Units of this item in this package.","type":"array","required":true,"items":{"type":"integer","format":"int32"}}],"responses":{"201":{"description":"Split a Shopee order into packages","schema":{"$ref":"#/definitions/API_V2_Entities_SplitOrderEnvelope"}},"400":{"description":"Fewer than 2 packages, an item not on the order, or a unit placed 0 or 2+ times","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Order not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Not a Shopee order (UNSUPPORTED_PLATFORM); already arranged/shipped/cancelled; already split or one unit (ORDER_NOT_SPLITTABLE); Shopee refused (PLATFORM_ERROR)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 2: Arrange shipment"],"operationId":"postApiV2OrdersIdSplit"}},"/api/v2/orders/arrange_shipment/{id}":{"get":{"summary":"Get a bulk arrange-shipment result","description":"One `POST /orders/arrange_shipment` request with its per-order rows. Rows start `queued` and change to their real outcome as each order is arranged; `status` becomes `completed` when none are left.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The ID returned by `POST /orders/arrange_shipment`.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get a bulk arrange-shipment result","schema":{"$ref":"#/definitions/API_V2_Entities_ArrangeShipmentBatchEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 2: Arrange shipment"],"operationId":"getApiV2OrdersArrangeShipmentId"}},"/api/v2/orders/arrange_shipment":{"post":{"summary":"Arrange shipment for many orders","description":"Arranges up to 50 orders, each with its own `method` and inputs as in `POST /orders/{id}/arrange_shipment`. Entries that fail the checks get a `failed` row at once; the rest are `queued` and arranged in the background (poll `GET /orders/arrange_shipment/{id}` until `completed`). Temu `buy_shipping` rows buy labels.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"orders[id]","description":"The OneCart ID of the order.","type":"array","required":true,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"orders[method]","description":"Shopee pickup/dropoff/non_integrated; Lazada/Zalora pack/ready_to_ship; TikTok ready_to_ship/own_tracking; Qoo10 confirm; Temu buy_shipping/own_tracking; Shopify/WooCommerce fulfil. Pick one of the `methods` from shipping_options.","type":"array","required":true,"items":{"type":"string","enum":["pickup","dropoff","non_integrated","pack","ready_to_ship","own_tracking","confirm","buy_shipping","fulfil"]}},{"in":"formData","name":"orders[address_id]","description":"Shopee pickup (required): an `address_id` from shipping_options.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"orders[pickup_time_id]","description":"Shopee pickup (required): a `pickup_time_id` from that address's `time_slots`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[tracking_number]","description":"Required for TikTok and Temu `own_tracking`. Optional for Shopee `non_integrated` (defaults to the order number, as in OneCart) and Shopify `fulfil`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[packages][package_number]","description":"Shopee: a `packages[].package_number` from shipping_options.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[packages][method]","description":"Shopee: `pickup` or `dropoff` for this package (defaults to the top-level method).","type":"array","required":false,"items":{"type":"string","enum":["pickup","dropoff"]}},{"in":"formData","name":"orders[packages][address_id]","description":"Shopee pickup: the address for this package.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"orders[packages][pickup_time_id]","description":"Shopee pickup: the slot for this package.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[packages][package_id]","description":"TikTok: a package id from shipping_options `packages`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[packages][tracking_number]","description":"TikTok: the tracking number for this package.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[shipping_provider_id]","description":"TikTok own_tracking (optional): a `shipping_providers[].id` from shipping_options. Defaults to the courier on the order.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[pickup_date]","description":"Qoo10 confirm (required): YYYYMMDD from `pickup_dates`, today to a week out.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[channel_id]","description":"Temu buy_shipping (required): `channelId` of a service from shipping_options.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"orders[ship_company_id]","description":"Temu (required): buy_shipping — the service's `shipCompanyId`; own_tracking — your courier from `ship_companies`.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"orders[weight]","description":"Temu: parcel weight, e.g. `1.5`. With `length`, `width`, `height`: required for buy_shipping; on shipping_options they list `services`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[weight_unit]","description":"Temu: `lb` (default, as in the app) or another unit Temu accepts.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[length]","description":"Temu: parcel length (buy_shipping: required).","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[width]","description":"Temu: parcel width (buy_shipping: required).","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[height]","description":"Temu: parcel height (buy_shipping: required).","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[dimension_unit]","description":"Temu: `in` (default, as in the app) or another unit Temu accepts.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[warehouse_id]","description":"Temu: ship-from warehouse. Defaults to the shop's default warehouse.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[package_sn]","description":"Temu own_tracking (required): the `package_sn_list` entry a buy_shipping returned.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[logistics_company]","description":"Shopify fulfil (optional): courier name shown to the buyer.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[tracking_url]","description":"Shopify fulfil (optional): tracking page URL.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[notify_customer]","description":"Shopify fulfil (optional): email the buyer a shipping confirmation. Default true, as in the app.","type":"array","required":false,"items":{"type":"boolean"}}],"responses":{"201":{"description":"Arrange shipment for many orders","schema":{"$ref":"#/definitions/API_V2_Entities_ArrangeShipmentBatchEnvelope"}},"400":{"description":"`orders` missing, over 50, or an entry without `id` or a valid `method`","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 2: Arrange shipment"],"operationId":"postApiV2OrdersArrangeShipment"}},"/api/v2/orders/{id}/arrange_shipment":{"post":{"summary":"Arrange shipment for an order","description":"Arranges shipment exactly as you choose, through the same code as the Order Processing buttons. Pick `method` and its inputs from `GET /orders/{id}/shipping_options`; nothing is sent until they pass checks, and it cannot be undone through the API. Temu `buy_shipping` buys a label charged to your Temu account.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the order.","type":"integer","format":"int32","required":true},{"in":"formData","name":"method","description":"Shopee pickup/dropoff/non_integrated; Lazada/Zalora pack/ready_to_ship; TikTok ready_to_ship/own_tracking; Qoo10 confirm; Temu buy_shipping/own_tracking; Shopify/WooCommerce fulfil. Pick one of the `methods` from shipping_options.","type":"string","enum":["pickup","dropoff","non_integrated","pack","ready_to_ship","own_tracking","confirm","buy_shipping","fulfil"],"required":true},{"in":"formData","name":"address_id","description":"Shopee pickup (required): an `address_id` from shipping_options.","type":"integer","format":"int32","required":false},{"in":"formData","name":"pickup_time_id","description":"Shopee pickup (required): a `pickup_time_id` from that address's `time_slots`.","type":"string","required":false},{"in":"formData","name":"tracking_number","description":"Required for TikTok and Temu `own_tracking`. Optional for Shopee `non_integrated` (defaults to the order number, as in OneCart) and Shopify `fulfil`.","type":"string","required":false},{"in":"formData","name":"packages[package_number]","description":"Shopee: a `packages[].package_number` from shipping_options.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"packages[method]","description":"Shopee: `pickup` or `dropoff` for this package (defaults to the top-level method).","type":"array","required":false,"items":{"type":"string","enum":["pickup","dropoff"]}},{"in":"formData","name":"packages[address_id]","description":"Shopee pickup: the address for this package.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"packages[pickup_time_id]","description":"Shopee pickup: the slot for this package.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"packages[package_id]","description":"TikTok: a package id from shipping_options `packages`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"packages[tracking_number]","description":"TikTok: the tracking number for this package.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"shipping_provider_id","description":"TikTok own_tracking (optional): a `shipping_providers[].id` from shipping_options. Defaults to the courier on the order.","type":"string","required":false},{"in":"formData","name":"pickup_date","description":"Qoo10 confirm (required): YYYYMMDD from `pickup_dates`, today to a week out.","type":"string","required":false},{"in":"formData","name":"channel_id","description":"Temu buy_shipping (required): `channelId` of a service from shipping_options.","type":"integer","format":"int32","required":false},{"in":"formData","name":"ship_company_id","description":"Temu (required): buy_shipping — the service's `shipCompanyId`; own_tracking — your courier from `ship_companies`.","type":"integer","format":"int32","required":false},{"in":"formData","name":"weight","description":"Temu: parcel weight, e.g. `1.5`. With `length`, `width`, `height`: required for buy_shipping; on shipping_options they list `services`.","type":"string","required":false},{"in":"formData","name":"weight_unit","description":"Temu: `lb` (default, as in the app) or another unit Temu accepts.","type":"string","required":false},{"in":"formData","name":"length","description":"Temu: parcel length (buy_shipping: required).","type":"string","required":false},{"in":"formData","name":"width","description":"Temu: parcel width (buy_shipping: required).","type":"string","required":false},{"in":"formData","name":"height","description":"Temu: parcel height (buy_shipping: required).","type":"string","required":false},{"in":"formData","name":"dimension_unit","description":"Temu: `in` (default, as in the app) or another unit Temu accepts.","type":"string","required":false},{"in":"formData","name":"warehouse_id","description":"Temu: ship-from warehouse. Defaults to the shop's default warehouse.","type":"string","required":false},{"in":"formData","name":"package_sn","description":"Temu own_tracking (required): the `package_sn_list` entry a buy_shipping returned.","type":"string","required":false},{"in":"formData","name":"logistics_company","description":"Shopify fulfil (optional): courier name shown to the buyer.","type":"string","required":false},{"in":"formData","name":"tracking_url","description":"Shopify fulfil (optional): tracking page URL.","type":"string","required":false},{"in":"formData","name":"notify_customer","description":"Shopify fulfil (optional): email the buyer a shipping confirmation. Default true, as in the app.","type":"boolean","required":false}],"responses":{"201":{"description":"Arrange shipment for an order","schema":{"$ref":"#/definitions/API_V2_Entities_ArrangeShipmentEnvelope"}},"400":{"description":"A required input missing or malformed (VALIDATION_ERROR)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Order not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"409":{"description":"Shopee dropoff for this order already queued (DUPLICATE_PENDING); Temu label already bought through OneCart (ALREADY_BOUGHT)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Already arranged/shipped/cancelled; method not available; Lazada own fleet (OWN_DELIVERY_ORDER); stale slot, date, service or provider; refused (PLATFORM_ERROR)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"502":{"description":"The marketplace could not be reached","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 2: Arrange shipment"],"operationId":"postApiV2OrdersIdArrangeShipment"}},"/api/v2/orders/shipping_options":{"get":{"summary":"Get shipping options for many orders","description":"Shipping options for up to 50 orders, like selecting orders in Order Processing. Shopee rows come per package with pickup addresses and slots, read as the app's pickup modal does. Other platforms answer from stored data with no call: use the single-order endpoint for TikTok providers or Temu services.","produces":["application/json"],"parameters":[{"in":"formData","name":"order_ids","description":"OneCart order IDs, comma-separated or repeated (1 to 50).","type":"array","items":{"type":"integer","format":"int32"},"required":true}],"responses":{"200":{"description":"Get shipping options for many orders","schema":{"$ref":"#/definitions/API_V2_Entities_ShippingOptionsBatchEnvelope"}},"400":{"description":"`order_ids` missing, empty or over 50","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 2: Arrange shipment"],"operationId":"getApiV2OrdersShippingOptions"}},"/api/v2/orders/{id}/shipping_options":{"get":{"summary":"Get shipping options for an order","description":"Returns how this order can be shipped right now, the choices Order Processing gives: `methods` available now and the inputs each needs. Pass one to `POST /orders/{id}/arrange_shipment`. Slots, dates and services change, so read them shortly before arranging.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the order.","type":"integer","format":"int32","required":true},{"in":"query","name":"weight","description":"Temu: parcel weight, e.g. `1.5`. With `length`, `width`, `height`: required for buy_shipping; on shipping_options they list `services`.","type":"string","required":false},{"in":"query","name":"weight_unit","description":"Temu: `lb` (default, as in the app) or another unit Temu accepts.","type":"string","required":false},{"in":"query","name":"length","description":"Temu: parcel length (buy_shipping: required).","type":"string","required":false},{"in":"query","name":"width","description":"Temu: parcel width (buy_shipping: required).","type":"string","required":false},{"in":"query","name":"height","description":"Temu: parcel height (buy_shipping: required).","type":"string","required":false},{"in":"query","name":"dimension_unit","description":"Temu: `in` (default, as in the app) or another unit Temu accepts.","type":"string","required":false},{"in":"query","name":"warehouse_id","description":"Temu: ship-from warehouse. Defaults to the shop's default warehouse.","type":"string","required":false}],"responses":{"200":{"description":"Get shipping options for an order","schema":{"$ref":"#/definitions/API_V2_Entities_ShippingOptionsEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Order not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Already arranged, shipped or cancelled (no marketplace call); platform not supported (UNSUPPORTED_PLATFORM); marketplace refused (PLATFORM_ERROR)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"502":{"description":"The marketplace could not be reached","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 2: Arrange shipment"],"operationId":"getApiV2OrdersIdShippingOptions"}},"/api/v2/orders/bulk_mark_shipped":{"post":{"summary":"Update own-delivery orders in bulk (ready to ship, tracking, delivered)","description":"Pushes seller-own-fleet lifecycle updates for a batch of Shopee, Lazada and TikTok orders: the API form of the Bulk Mark Shipped upload page. Never all-or-nothing: each order gets its own row in `results`, with its reason and no marketplace call if it cannot run. Poll the `poll` URL until queued rows are reconciled.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"action","description":"`ready_to_ship` (Shopee, Lazada), `attach_tracking` (Shopee, Lazada, TikTok) or `delivered` (Lazada, TikTok; Shopee has no delivered API).","type":"string","enum":["ready_to_ship","attach_tracking","delivered"],"required":true},{"in":"formData","name":"tracking_status","description":"Lazada `attach_tracking` only: the furthest status to post; every step up to it is sent in order. Default: out for delivery. The first step is irreversible: no cancelling after.","type":"string","enum":["info_cb_ib_success_in_sort_center","info_st_domestic_package_stationed_in","info_st_domestic_out_for_delivery"],"required":false},{"in":"formData","name":"orders[order_no]","description":"The platform order number.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"orders[tracking_number]","description":"Waybill / tracking number. Required for `attach_tracking`; optional for `ready_to_ship` (Shopee ships with it).","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[package_id]","description":"An EXISTING marketplace parcel id to attach this tracking number to (split orders: one entry per parcel).","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[parcel_number]","description":"An opaque label (e.g. an ERP delivery-order number) grouping entries into a NEW parcel to create. Wins over `package_id`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[sku]","description":"SKU going into the new parcel. Required with `parcel_number`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"orders[qty]","description":"Units of that SKU in the new parcel. Required with `parcel_number`.","type":"array","required":false,"items":{"type":"integer","format":"int32"}}],"responses":{"201":{"description":"Update own-delivery orders in bulk (ready to ship, tracking, delivered)","schema":{"$ref":"#/definitions/API_V2_Entities_BulkMarkShippedEnvelope"}},"400":{"description":"`action` or `tracking_status` outside its values; over 2000 orders, or none with an `order_no`","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Own delivery (seller-own-fleet)"],"operationId":"postApiV2OrdersBulkMarkShipped"},"get":{"summary":"List own-delivery bulk updates","description":"Returns your bulk mark-shipped uploads (from the API and the web upload page), newest first. Each entry carries its stage (`action`), status and the number of per-order result rows; fetch a single upload to read the rows themselves.","produces":["application/json"],"parameters":[{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List own-delivery bulk updates","schema":{"$ref":"#/definitions/API_V2_Entities_BulkMarkShippedCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Own delivery (seller-own-fleet)"],"operationId":"getApiV2OrdersBulkMarkShipped"}},"/api/v2/orders/bulk_mark_shipped/{id}":{"get":{"summary":"Get an own-delivery bulk update","description":"Returns one bulk mark-shipped upload with its per-order result rows. Poll it after submitting: rows start `queued` and change to their real `outcome` once the marketplace calls complete, then `status` becomes `completed`.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the bulk mark-shipped upload.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get an own-delivery bulk update","schema":{"$ref":"#/definitions/API_V2_Entities_BulkMarkShippedEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Upload not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Own delivery (seller-own-fleet)"],"operationId":"getApiV2OrdersBulkMarkShippedId"}},"/api/v2/orders/cancelled":{"get":{"summary":"List cancelled orders","description":"Returns only orders that have been cancelled, newest first. Filter by `platform` or `order_no`, and page through results with `page` and `per_page`.","produces":["application/json"],"parameters":[{"in":"query","name":"platform","description":"Return only cancelled orders from this platform.","type":"string","required":false},{"in":"query","name":"order_no","description":"Return only the cancelled order with this order number.","type":"string","required":false},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List cancelled orders","schema":{"$ref":"#/definitions/API_V2_Entities_OrdersCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Cancellations"],"operationId":"getApiV2OrdersCancelled"}},"/api/v2/orders":{"get":{"summary":"List orders","description":"Returns your orders across every connected sales channel, newest first. Filter by `platform`, `shop_id`, `status`, or `order_no`, narrow to an `order_date` or `updated_at` time range, and page through results with `page` and `per_page`.","produces":["application/json"],"parameters":[{"in":"query","name":"order_date_start","description":"Return orders placed on or after this time (Unix timestamp, in seconds).","type":"string","required":false},{"in":"query","name":"order_date_end","description":"Return orders placed on or before this time (Unix timestamp, in seconds).","type":"string","required":false},{"in":"query","name":"updated_start","description":"Return orders last updated on or after this time (Unix timestamp, in seconds).","type":"string","required":false},{"in":"query","name":"updated_end","description":"Return orders last updated on or before this time (Unix timestamp, in seconds).","type":"string","required":false},{"in":"query","name":"shipped_start","description":"Return orders that shipped on or after this time (Unix timestamp, in seconds). Ship date comes from the order history, so orders that have never shipped are excluded.","type":"string","required":false},{"in":"query","name":"shipped_end","description":"Return orders that shipped on or before this time (Unix timestamp, in seconds).","type":"string","required":false},{"in":"query","name":"platform","description":"Return only orders from this platform, e.g. `Shopee`, `Lazada`, `TikTok`.","type":"string","required":false},{"in":"query","name":"shop_id","description":"Return only orders from this shop.","type":"integer","format":"int32","required":false},{"in":"query","name":"order_no","description":"Return only the order with this order number.","type":"string","required":false},{"in":"query","name":"status","description":"One status or a comma-separated list (`pending,shipped`), case-insensitive. Common values: `pending`, `ready_to_ship`, `shipped`, `completed`, `cancelled`; they vary by channel.","type":"string","required":false},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List orders","schema":{"$ref":"#/definitions/API_V2_Entities_OrdersCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Orders"],"operationId":"getApiV2Orders"}},"/api/v2/products/{id}/video":{"delete":{"summary":"Delete a product's video","description":"Removes the video from OneCart. This cannot be undone. Listings that already have it on a sales channel keep it there: nothing is pushed.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the product.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Delete a product's video","schema":{"$ref":"#/definitions/API_V2_Entities_ProductVideoDeletedEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Product not found, or it has no video","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"deleteApiV2ProductsIdVideo"},"post":{"summary":"Set a product video","description":"Adds the product's video, or replaces the one it has: upload `file` as multipart/form-data, or send `{\"url\": \"...\"}` as JSON for OneCart to download (the only way through MCP, which cannot send files). MP4, up to 100 MB. Shopee takes up to 30 MB and 10-60 seconds; TikTok recommends 20-60 seconds. The video stays in OneCart: push it to a listing with `POST /listings/{id}/video/push`.","produces":["application/json"],"consumes":["application/json","multipart/form-data"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the product.","type":"integer","format":"int32","required":true},{"in":"formData","name":"file","description":"The video file, as multipart/form-data. MP4, up to 100 MB. Shopee takes up to 30 MB and 10-60 seconds; TikTok recommends 20-60 seconds.","type":"file","required":false},{"in":"formData","name":"url","description":"A public http/https URL of the video to download (private addresses refused). MP4, up to 100 MB. Shopee takes up to 30 MB and 10-60 seconds; TikTok recommends 20-60 seconds.","type":"string","required":false}],"responses":{"201":{"description":"Video set","schema":{"$ref":"#/definitions/API_V2_Entities_ProductVideoEnvelope"}},"400":{"description":"Validation error: send exactly one of file and url","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Product not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Not an MP4, over 100 MB, or the URL could not be downloaded","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"postApiV2ProductsIdVideo"},"get":{"summary":"Get a product's video","description":"Returns the product's video: OneCart's copy, which every push to a listing sends. 404 when the product has no video.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the product.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get a product's video","schema":{"$ref":"#/definitions/API_V2_Entities_ProductVideoEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Product not found, or it has no video","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"getApiV2ProductsIdVideo"}},"/api/v2/products/{id}/images/{image_id}":{"delete":{"summary":"Delete a product image","description":"Removes one image from the product. This cannot be undone. The image stays on any sales-channel listing that already uses it: nothing is pushed to a channel.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the product.","type":"integer","format":"int32","required":true},{"in":"path","name":"image_id","description":"The image id, from `GET /products/{id}/images`.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Delete a product image","schema":{"$ref":"#/definitions/API_V2_Entities_ProductImageDeletedEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Product or image not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"deleteApiV2ProductsIdImagesImageId"}},"/api/v2/products/{id}/images":{"patch":{"summary":"Reorder a product's images","description":"Sets the display order: send `order` with image ids, first image first. Any image you leave out keeps its relative order after the ones you list. Images stay in OneCart: reordering does not change any listing on a sales channel.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the product.","type":"integer","format":"int32","required":true},{"in":"formData","name":"order","description":"Image ids in the order to show them.","type":"array","items":{"type":"integer","format":"int32"},"required":true}],"responses":{"200":{"description":"Reorder a product's images","schema":{"$ref":"#/definitions/API_V2_Entities_ProductImagesEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Product or image not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"patchApiV2ProductsIdImages"},"post":{"summary":"Add images to a product","description":"Adds images at the end of the product's list: upload `files` as multipart/form-data, or send `{\"urls\": [...]}` as JSON for OneCart to download. Each file or URL succeeds or fails on its own (`added` / `failed`, with the reason). Images stay in OneCart: no sales-channel listing changes.","produces":["application/json"],"consumes":["application/json","multipart/form-data"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the product.","type":"integer","format":"int32","required":true},{"in":"formData","name":"files","description":"Image files to upload, as multipart/form-data. JPEG, PNG, WebP or GIF, up to 10 MB each, up to 10 per request and 50 per product. WebP is converted to JPEG.","type":"array","items":{"type":"file"},"required":false},{"in":"formData","name":"urls","description":"Public http/https image URLs to download (private addresses refused). JPEG, PNG, WebP or GIF, up to 10 MB each, up to 10 per request and 50 per product. WebP is converted to JPEG.","type":"array","items":{"type":"string"},"required":false}],"responses":{"201":{"description":"Add images to a product","schema":{"$ref":"#/definitions/API_V2_Entities_ProductImagesAddedEnvelope"}},"400":{"description":"Validation error, or too many images in one request","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Product not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Nothing could be added (each reason is in `failed`), or the product is at its image limit","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"postApiV2ProductsIdImages"},"get":{"summary":"List a product's images","description":"Returns the images of a product in display order. The same list is on the product with `_fields=+images`.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the product.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"List a product's images","schema":{"$ref":"#/definitions/API_V2_Entities_ProductImagesEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Product not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"getApiV2ProductsIdImages"}},"/api/v2/products/{id}/merge":{"post":{"summary":"Merge products","description":"Folds other products into this one: every variant of each source product (inactive ones included) moves to this product, and the emptied source products are deleted. This cannot be undone (split the product again instead). The inverse of splitting a product. Variant ids, SKUs, stock and channel links do not change, so stock sync keeps working. This product keeps its name, SKU and categories. Listings already on a sales channel are not combined there: cross-post the merged product to publish it as one listing. `images`: `keep_target` (default) keeps only this product's images; `all` adds every image of the sources.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the product that is kept.","type":"integer","format":"int32","required":true},{"in":"formData","name":"source_product_ids","description":"The products to fold into this one. Each is deleted once its variants have moved.","type":"array","items":{"type":"integer","format":"int32"},"required":true},{"in":"formData","name":"option_name","description":"Variation name set on every variant of the merged product, e.g. `Size`.","type":"string","required":false},{"in":"formData","name":"variant_values","description":"Variation value per variant, as `{\"\u003cvariant id\u003e\": \"\u003cvalue\u003e\"}`, e.g. `{\"812\": \"S\", \"813\": \"M\"}`. Variants left out keep their current value.","type":"object","required":false},{"in":"formData","name":"images","description":"`keep_target` (default): only this product's images are kept. `all`: every image of this product and the sources.","type":"string","default":"keep_target","enum":["keep_target","all"],"required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Products merged","schema":{"$ref":"#/definitions/API_V2_Entities_ProductMergedEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"This product, or any source product, not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"No other product to merge, or variant_values names a variant outside the merge","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"postApiV2ProductsIdMerge"}},"/api/v2/products/{id}":{"patch":{"summary":"Update a product","description":"Changes the product `name` and `description`. `sku` cannot change (422). Images have their own endpoints under `/products/{id}/images`. `total_quantity` is worked out from the variants and cannot be set. OneCart catalogue only: nothing is pushed to a sales channel.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the product.","type":"integer","format":"int32","required":true},{"in":"formData","name":"name","description":"New name.","type":"string","required":false},{"in":"formData","name":"description","description":"New description.","type":"string","required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Update a product","schema":{"$ref":"#/definitions/API_V2_Entities_ProductEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Product not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"A blank name, or sku sent","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"patchApiV2ProductsId"},"get":{"summary":"Get a product","description":"Returns one parent product. Add `_fields=+description,+variants,+images` for the description, the variants and the images.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the product.","type":"integer","format":"int32","required":true},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Get a product","schema":{"$ref":"#/definitions/API_V2_Entities_ProductEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Product not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"getApiV2ProductsId"}},"/api/v2/products":{"post":{"summary":"Create a product with its variants","description":"Creates a parent product and its variants in one call, all or nothing. Each `variants` row takes the variant form fields and is created as `POST /variants` does; add images afterwards with `POST /products/{id}/images`. New variants have Inventory Update off, and nothing is pushed to any channel.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"name","description":"Parent name, e.g. `Comfortable regular fit shoes`.","type":"string","required":true},{"in":"formData","name":"sku","description":"Parent SKU, e.g. `P203-12345`. Unique in your account; cannot change later.","type":"string","required":true},{"in":"formData","name":"description","description":"Product description.","type":"string","required":false},{"in":"formData","name":"variants[sku]","description":"Unique SKU for the variant.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"variants[quantity]","description":"On-hand quantity for the variant.","type":"array","required":true,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"variants[price]","description":"Selling price (0 or more). OneCart catalogue only, not pushed to channels.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[unit_cost_price]","description":"Cost price per unit (0 or more).","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[reserve_qty]","description":"Low-stock alert level (0 or more).","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"variants[details]","description":"Custom details / notes: free text for your own use.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[option_name_1]","description":"Name of the first variant option, e.g. `Size`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[option_value_1]","description":"Value of the first variant option, e.g. `Large`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[bin_location]","description":"Where the item sits in your warehouse, e.g. `Aisle 5, Shelf C-2`. Send null to clear.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[expiry_date]","description":"Expiry date, `YYYY-MM-DD`. Send null to clear.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[weight]","description":"Weight in kg (0 or more). Send null to clear.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[package_length]","description":"Package length in cm (0 or more). Send null to clear.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[package_width]","description":"Package width in cm (0 or more). Send null to clear.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[package_height]","description":"Package height in cm (0 or more). Send null to clear.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[brand_id]","description":"ID of one of your brands (see `GET /brands`). Send null to clear.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"variants[buyer_category_id]","description":"ID of one of your product categories (see `GET /buyer_categories`). Send null to clear.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"variants[custom_attributes]","description":"Your custom fields, as key/value pairs (e.g. `{\"material\": \"Cotton\"}`). Merged per key; an empty string removes a key; it never replaces the whole set.","type":"array","required":false,"items":{"type":"object"}},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"201":{"description":"Create a product with its variants","schema":{"$ref":"#/definitions/API_V2_Entities_ProductEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Brand or product category not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Duplicate product SKU or variant SKU, or an invalid value","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"postApiV2Products"},"get":{"summary":"List products","description":"Returns your parent products, newest first; a product is what your variants (SKUs) belong to. Add `_fields=%2Bdescription,%2Bvariants,%2Bimages` for the description, variants and images. Products have no custom fields of their own: those are `custom_attributes` on each variant.","produces":["application/json"],"parameters":[{"in":"query","name":"sku","description":"Return products whose SKU, or any of whose variant SKUs, contains this text.","type":"string","required":false},{"in":"query","name":"name","description":"Return products whose name contains this text.","type":"string","required":false},{"in":"query","name":"active","description":"true: products with at least one active variant. false: products with none.","type":"boolean","required":false},{"in":"query","name":"updated_start","description":"Return products last updated on or after this time (Unix timestamp, in seconds).","type":"integer","format":"int32","required":false},{"in":"query","name":"updated_end","description":"Return products last updated on or before this time (Unix timestamp, in seconds).","type":"integer","format":"int32","required":false},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List products","schema":{"$ref":"#/definitions/API_V2_Entities_ProductsCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"getApiV2Products"}},"/api/v2/variants":{"post":{"summary":"Create variants","description":"Creates one variant (SKU) from top-level fields, or several from a `variants` array, as Create Single SKU in the app does. Each variant belongs to a product set by `product_id` or `product_sku`; a `product_sku` that matches no product creates one.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"variants[sku]","description":"Unique SKU for the variant.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"variants[quantity]","description":"On-hand quantity for the variant.","type":"array","required":true,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"variants[product_id]","description":"ID of the product this variant belongs to.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"variants[product_sku]","description":"SKU of the product to attach the variant to. A new product is created if none with this SKU exists.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[product_name]","description":"Name for the new product when `product_sku` creates one (defaults to the product SKU). Ignored when the product already exists: its name is left as it is.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[price]","description":"Selling price of the variant.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[option_name_1]","description":"Name of the first variant option, e.g. `Size`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[option_value_1]","description":"Value of the first variant option, e.g. `Large`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[update_listings]","description":"Set to `true` to update linked channel listings.","type":"array","default":false,"required":false,"items":{"type":"boolean"}},{"in":"formData","name":"variants[reserve_qty]","description":"Low-stock alert level.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"variants[unit_cost_price]","description":"Cost price per unit.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[details]","description":"Free-text notes for the variant.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[custom_attributes]","description":"String key/values, e.g. `{\"material\": \"Cotton\"}`. Keys normalised (`Safety Mark` → `safety_mark`); max 50 keys, key 64, value 500 chars.","type":"array","required":false,"items":{"type":"object"}},{"in":"formData","name":"variants[bin_location]","description":"Where the item sits in your warehouse.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[expiry_date]","description":"Expiry date, `YYYY-MM-DD`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"variants[weight]","description":"Weight in kg.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[package_length]","description":"Package length in cm.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[package_width]","description":"Package width in cm.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[package_height]","description":"Package height in cm.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"variants[brand_id]","description":"ID of one of your brands (see `GET /brands`).","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"variants[buyer_category_id]","description":"ID of one of your product categories (see `GET /buyer_categories`).","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"product_id","description":"ID of the product this variant belongs to (single variant).","type":"integer","format":"int32","required":false},{"in":"formData","name":"product_sku","description":"SKU of the product to attach the variant to; a new product is created if none exists (single variant).","type":"string","required":false},{"in":"formData","name":"product_name","description":"Name for the new product when `product_sku` creates one (defaults to the product SKU). Ignored when the product already exists: its name is left as it is. (single variant)","type":"string","required":false},{"in":"formData","name":"sku","description":"Unique SKU for the variant (single variant).","type":"string","required":false},{"in":"formData","name":"quantity","description":"On-hand quantity for the variant (single variant).","type":"integer","format":"int32","required":false},{"in":"formData","name":"price","description":"Selling price of the variant (single variant).","type":"number","format":"float","required":false},{"in":"formData","name":"option_name_1","description":"Name of the first variant option, e.g. `Size` (single variant).","type":"string","required":false},{"in":"formData","name":"option_value_1","description":"Value of the first variant option, e.g. `Large` (single variant).","type":"string","required":false},{"in":"formData","name":"update_listings","description":"Set to `true` to update linked channel listings (single variant).","type":"boolean","default":false,"required":false},{"in":"formData","name":"reserve_qty","description":"Low-stock alert level (single variant).","type":"integer","format":"int32","required":false},{"in":"formData","name":"unit_cost_price","description":"Cost price per unit (single variant).","type":"number","format":"float","required":false},{"in":"formData","name":"details","description":"Free-text notes for the variant (single variant).","type":"string","required":false},{"in":"formData","name":"custom_attributes","description":"String key/values, e.g. `{\"material\": \"Cotton\"}`. Keys normalised (`Safety Mark` → `safety_mark`); max 50 keys, key 64, value 500 chars (single variant).","type":"object","required":false},{"in":"formData","name":"bin_location","description":"Where the item sits in your warehouse (single variant).","type":"string","required":false},{"in":"formData","name":"expiry_date","description":"Expiry date, `YYYY-MM-DD` (single variant).","type":"string","required":false},{"in":"formData","name":"weight","description":"Weight in kg (single variant).","type":"number","format":"float","required":false},{"in":"formData","name":"package_length","description":"Package length in cm (single variant).","type":"number","format":"float","required":false},{"in":"formData","name":"package_width","description":"Package width in cm (single variant).","type":"number","format":"float","required":false},{"in":"formData","name":"package_height","description":"Package height in cm (single variant).","type":"number","format":"float","required":false},{"in":"formData","name":"brand_id","description":"ID of one of your brands, see `GET /brands` (single variant).","type":"integer","format":"int32","required":false},{"in":"formData","name":"buyer_category_id","description":"ID of one of your product categories, see `GET /buyer_categories` (single variant).","type":"integer","format":"int32","required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"201":{"description":"Create variants","schema":{"$ref":"#/definitions/API_V2_Entities_Variant"}},"400":{"description":"Single variant: neither `product_id` nor `product_sku` sent","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Product not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Single variant: SKU already exists; `custom_attributes` over a limit or a non-string value; validation failed","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Variants"],"operationId":"postApiV2Variants"},"get":{"summary":"List variants","description":"Returns your variants (SKUs) with their stock levels, newest first, as View/Edit Single SKUs in the app does. To keep another system in sync, poll with `updated_start` set to your last poll time: every stock change (orders, returns, uploads, edits) and detail change updates `updated_at`.","produces":["application/json"],"parameters":[{"in":"query","name":"sku","description":"Return variants whose SKU contains this text (`ABC` also returns `ABC-1`); when set, `sku_list` is ignored. For an exact SKU use `sku_list[]=ABC`.","type":"string","required":false},{"in":"formData","name":"sku_list","description":"Return variants matching any SKU in this list exactly.","type":"array","items":{"type":"string"},"required":false},{"in":"query","name":"name","description":"Return variants whose product name contains this text.","type":"string","required":false},{"in":"query","name":"custom_attribute_key","description":"Filter by this custom attribute key, normalised as on write (`Safety Mark` → `safety_mark`). Send with `custom_attribute_value`, else 400.","type":"string","required":false},{"in":"query","name":"custom_attribute_value","description":"The value the custom attribute must equal exactly. Send with `custom_attribute_key`, else 400.","type":"string","required":false},{"in":"query","name":"updated_start","description":"Return variants last updated on or after this time (Unix timestamp in seconds, inclusive). Use it to poll for stock changes.","type":"integer","format":"int32","required":false},{"in":"query","name":"updated_end","description":"Return variants last updated on or before this time (Unix timestamp in seconds, inclusive).","type":"integer","format":"int32","required":false},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List variants","schema":{"$ref":"#/definitions/API_V2_Entities_VariantsCollection"}},"400":{"description":"Only one of `custom_attribute_key` / `custom_attribute_value` sent; `updated_start` / `updated_end` not an integer","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Variants"],"operationId":"getApiV2Variants"}},"/api/v2/variants/{id}":{"put":{"summary":"Update a variant","description":"Updates one variant, as editing it in View/Edit Single SKUs in the app does. A changed `quantity` is synced to your connected channels; detail fields update your OneCart catalogue only and are never pushed. A bundle's quantity cannot be set (it comes from its components). `update_listings` switches Inventory Update (stock sync to the SKU's linked listings) on or off, as the per-SKU toggle in the app does. Every detail change and every switch is logged in the variant's Tracking history.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the variant.","type":"string","required":true},{"in":"formData","name":"quantity","description":"New on-hand quantity, pushed to channels when it changes. Not allowed on a bundle (422): its quantity is derived from its components.","type":"integer","format":"int32","required":false},{"in":"formData","name":"price","description":"Selling price (0 or more). OneCart catalogue only, not pushed to channels.","type":"number","format":"float","required":false},{"in":"formData","name":"unit_cost_price","description":"Cost price per unit (0 or more).","type":"number","format":"float","required":false},{"in":"formData","name":"reserve_qty","description":"Low-stock alert level (0 or more).","type":"integer","format":"int32","required":false},{"in":"formData","name":"details","description":"Custom details / notes: free text for your own use.","type":"string","required":false},{"in":"formData","name":"option_name_1","description":"Name of the first variant option, e.g. `Size`.","type":"string","required":false},{"in":"formData","name":"option_value_1","description":"Value of the first variant option, e.g. `Large`.","type":"string","required":false},{"in":"formData","name":"bin_location","description":"Where the item sits in your warehouse, e.g. `Aisle 5, Shelf C-2`. Send null to clear.","type":"string","required":false},{"in":"formData","name":"expiry_date","description":"Expiry date, `YYYY-MM-DD`. Send null to clear.","type":"string","required":false},{"in":"formData","name":"weight","description":"Weight in kg (0 or more). Send null to clear.","type":"number","format":"float","required":false},{"in":"formData","name":"package_length","description":"Package length in cm (0 or more). Send null to clear.","type":"number","format":"float","required":false},{"in":"formData","name":"package_width","description":"Package width in cm (0 or more). Send null to clear.","type":"number","format":"float","required":false},{"in":"formData","name":"package_height","description":"Package height in cm (0 or more). Send null to clear.","type":"number","format":"float","required":false},{"in":"formData","name":"brand_id","description":"ID of one of your brands (see `GET /brands`). Send null to clear.","type":"integer","format":"int32","required":false},{"in":"formData","name":"buyer_category_id","description":"ID of one of your product categories (see `GET /buyer_categories`). Send null to clear.","type":"integer","format":"int32","required":false},{"in":"formData","name":"custom_attributes","description":"Your custom fields, as key/value pairs (e.g. `{\"material\": \"Cotton\"}`). Merged per key; an empty string removes a key; it never replaces the whole set.","type":"object","required":false},{"in":"formData","name":"product_name","description":"Renames the parent product (must not be blank). Every variant of that product shows the new name.","type":"string","required":false},{"in":"formData","name":"update_quantity","description":"Default `true`: recalculate the variant and product quantity and push a changed `quantity` to channels. `false` saves it without a push.","type":"boolean","default":true,"required":false},{"in":"formData","name":"update_listings","description":"Inventory Update switch. `true`: from now on every quantity change of this SKU is pushed to its linked listings (the merchant's go-live step; new SKUs start `false`). `false`: quantity changes stay in OneCart only. Unchanged values are ignored. Read it back with `_fields=%2Bupdate_listings`.","type":"boolean","required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Update a variant","schema":{"$ref":"#/definitions/API_V2_Entities_Variant"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Variant, brand or product category not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"`sku`/`product_id`/`product_sku` sent; `quantity` on a bundle; negative price/cost/reserve/weight/dimension; bad `expiry_date`; blank `product_name`; a `custom_attributes` rule broken","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Variants"],"operationId":"putApiV2VariantsId"},"get":{"summary":"Get a variant","description":"Returns one variant (SKU) by its OneCart ID, with the same fields as the list. Add `_fields=%2Bbundle_components` to include a bundle's components. To look a SKU up by its code instead, use `GET /variants?sku_list[]=\u003cSKU\u003e`.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the variant.","type":"integer","format":"int32","required":true},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Get a variant","schema":{"$ref":"#/definitions/API_V2_Entities_VariantEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Variant not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"getApiV2VariantsId"}},"/api/v2/variants/force_push":{"post":{"summary":"Resync stock to channels","description":"Re-pushes the current stock level for up to 10 variants to every connected sales channel. Use it to force channels back into sync when their quantities have drifted. Pass the variant IDs in `variant_ids`.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"variant_ids","description":"The OneCart IDs of the variants to resync (maximum 10 per request).","type":"array","items":{"type":"integer","format":"int32"},"required":true}],"responses":{"201":{"description":"Resync stock to channels","schema":{"$ref":"#/definitions/API_V2_Entities_ForcePushEnvelope"}},"400":{"description":"Too many variants","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Variants"],"operationId":"postApiV2VariantsForcePush"}},"/api/v2/variants/bulk_update":{"put":{"summary":"Update stock in bulk","description":"Updates several variants in one request, each row taking the same fields as `PUT /variants/{id}`. A new `quantity` is synced to your connected channels; detail fields update your OneCart catalogue only and are never pushed. Each row succeeds or fails on its own; a bundle's quantity cannot be set and `sku` and the product cannot change.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"updates[id]","description":"The OneCart ID of the variant.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"updates[quantity]","description":"New on-hand quantity, pushed to channels in the background. Not allowed on a bundle (derived from its components): the row fails.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"updates[update_listings]","description":"Inventory Update switch for this SKU (see `PUT /variants/{id}`): `true` pushes future quantity changes to its linked listings, `false` stops that.","type":"array","required":false,"items":{"type":"boolean"}},{"in":"formData","name":"updates[price]","description":"Selling price (0 or more). OneCart catalogue only, not pushed to channels.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"updates[unit_cost_price]","description":"Cost price per unit (0 or more).","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"updates[reserve_qty]","description":"Low-stock alert level (0 or more).","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"updates[details]","description":"Custom details / notes: free text for your own use.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"updates[option_name_1]","description":"Name of the first variant option, e.g. `Size`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"updates[option_value_1]","description":"Value of the first variant option, e.g. `Large`.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"updates[bin_location]","description":"Where the item sits in your warehouse, e.g. `Aisle 5, Shelf C-2`. Send null to clear.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"updates[expiry_date]","description":"Expiry date, `YYYY-MM-DD`. Send null to clear.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"updates[weight]","description":"Weight in kg (0 or more). Send null to clear.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"updates[package_length]","description":"Package length in cm (0 or more). Send null to clear.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"updates[package_width]","description":"Package width in cm (0 or more). Send null to clear.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"updates[package_height]","description":"Package height in cm (0 or more). Send null to clear.","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"updates[brand_id]","description":"ID of one of your brands (see `GET /brands`). Send null to clear.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"updates[buyer_category_id]","description":"ID of one of your product categories (see `GET /buyer_categories`). Send null to clear.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"updates[custom_attributes]","description":"Your custom fields, as key/value pairs (e.g. `{\"material\": \"Cotton\"}`). Merged per key; an empty string removes a key; it never replaces the whole set.","type":"array","required":false,"items":{"type":"object"}},{"in":"formData","name":"updates[product_name]","description":"Renames the parent product (must not be blank). Every variant of that product shows the new name.","type":"array","required":false,"items":{"type":"string"}}],"responses":{"200":{"description":"Update stock in bulk","schema":{"$ref":"#/definitions/API_V2_Entities_BulkUpdateEnvelope"}},"400":{"description":"`updates` missing or not an array of objects","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Variants"],"operationId":"putApiV2VariantsBulkUpdate"}},"/api/v2/variants/count":{"get":{"summary":"Count variants","description":"Returns the total number of variants in your catalogue. Pass `sku` to count only variants whose SKU contains that text. Useful for pagination or reporting without fetching every record.","produces":["application/json"],"parameters":[{"in":"query","name":"sku","description":"Count only variants whose SKU contains this text.","type":"string","required":false}],"responses":{"200":{"description":"Count variants","schema":{"$ref":"#/definitions/API_V2_Entities_CountEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Variants"],"operationId":"getApiV2VariantsCount"}},"/api/v2/imports/{id}":{"patch":{"summary":"Update an import on a manual shop","description":"Changes `title`, `skus`, `raw_data` or `active` of a manual shop's import. If the import is matched, its listing follows at once, as when a platform import is re-pulled: title, description, url and main image update, a new SKU in your catalogue gains a link, a link whose SKU is gone is removed. Nothing is pushed anywhere.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the import.","type":"integer","format":"int32","required":true},{"in":"formData","name":"title","description":"New title.","type":"string","required":false},{"in":"formData","name":"skus","description":"The SKUs of this product. Must match `raw_data.variations` when the import has priced variations.","type":"array","items":{"type":"string"},"required":false},{"in":"formData","name":"raw_data","description":"Replaces the stored data. JSON object ≤ 64 KB. Keys OneCart reads (all optional): `title`, `description` (HTML), `images` (public URLs, max 20), `url`, `brand`, `category`, `weight` (kg), `package_length`/`package_width`/`package_height` (cm), `variations` (`{sku*, option_name_1, option_value_1, price*, quantity*, barcode}`, * required). Other keys are stored as sent; `source`, `platform`, `onecart_shop_id`, `item_code` are reserved (422).","type":"object","required":false},{"in":"formData","name":"active","description":"false to make it inactive, true to make it active.","type":"boolean","required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Update an import on a manual shop","schema":{"$ref":"#/definitions/API_V2_Entities_ImportEnvelope"}},"400":{"description":"Nothing to change","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Import not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"A connected shop's import (the next pull would overwrite it); `item_code` or `shop_id` sent; or an invalid field (named in the error)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Imports"],"operationId":"patchApiV2ImportsId"},"get":{"summary":"Get an import","description":"Returns one import, on any shop. Add `_fields=+raw_data` for the full data: a manual shop's is always returned; a connected shop's needs raw-data access on your account.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the import.","type":"integer","format":"int32","required":true},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Get an import","schema":{"$ref":"#/definitions/API_V2_Entities_ImportEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Import not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Imports"],"operationId":"getApiV2ImportsId"}},"/api/v2/imports/relist":{"post":{"summary":"Relist imports on their platforms","description":"Makes delisted listings visible to buyers again on Shopee, Lazada, Qoo10, Shopify, TikTok, WooCommerce, Zalora, Magento, NTUC: the same \"Relist Selected\" as the Imports page. Returns 202 at once: one background job per import (NTUC: one per shop) sends the change and marks the import `active: true` once the platform accepted it; re-read `GET /imports/{id}` a few minutes later. Same `skipped` / `not_found` rules as `POST /imports/delist`.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"ids","description":"The OneCart ids of the imports to relist, 1 to 100.","type":"array","items":{"type":"integer","format":"int32"},"required":true}],"responses":{"202":{"description":"Relist queued","schema":{"$ref":"#/definitions/API_V2_Entities_ImportAvailabilityEnvelope"}},"400":{"description":"No ids, or more than 100","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Imports"],"operationId":"postApiV2ImportsRelist"}},"/api/v2/imports/delist":{"post":{"summary":"Delist imports on their platforms","description":"Hides the listings from buyers on Shopee, Lazada, Qoo10, Shopify, TikTok, WooCommerce, Zalora, Magento, NTUC: the same \"Delist Selected\" as the Imports page. Nothing is ever deleted on a platform: OneCart has no operation that deletes a platform listing, by design. Returns 202 at once: one background job per import (NTUC: one per shop) sends the change to the platform and marks the import `active: false` once it is accepted; re-read `GET /imports/{id}` a few minutes later. Imports on other platforms or on a manual shop are listed in `skipped` with the reason; ids that are not your imports in `not_found`. Neither is acted on. Bring a listing back with `POST /imports/relist`.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"ids","description":"The OneCart ids of the imports to delist, 1 to 100 (from `GET /imports`, or `import_id` on a listing).","type":"array","items":{"type":"integer","format":"int32"},"required":true}],"responses":{"202":{"description":"Delist queued","schema":{"$ref":"#/definitions/API_V2_Entities_ImportAvailabilityEnvelope"}},"400":{"description":"No ids, or more than 100","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Imports"],"operationId":"postApiV2ImportsDelist"}},"/api/v2/imports":{"post":{"summary":"Create an import on a manual shop","description":"Puts one of your own products (say, from your e-shop) into Imports on a manual shop (`POST /shops/manual`). It then works like any other import: match it to your SKUs with `POST /listings`, or use it as the source of `POST /cross_posts`. Send `skus` for matching only, or `raw_data.variations` with prices and images to cross-post.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"shop_id","description":"A manual shop of yours (`is_manual: true` on `GET /shops`).","type":"integer","format":"int32","required":true},{"in":"formData","name":"item_code","description":"Your own product id, unique per shop.","type":"string","required":true},{"in":"formData","name":"title","description":"The product title. Required unless `raw_data.title` is sent.","type":"string","required":false},{"in":"formData","name":"skus","description":"The SKUs of this product (blanks refused). Required unless `raw_data.variations` is sent; when both are sent they must name the same SKUs.","type":"array","items":{"type":"string"},"required":false},{"in":"formData","name":"raw_data","description":"JSON object ≤ 64 KB. Keys OneCart reads (all optional): `title`, `description` (HTML), `images` (public URLs, max 20), `url`, `brand`, `category`, `weight` (kg), `package_length`/`package_width`/`package_height` (cm), `variations` (`{sku*, option_name_1, option_value_1, price*, quantity*, barcode}`, * required). Other keys are stored as sent; `source`, `platform`, `onecart_shop_id`, `item_code` are reserved (422).","type":"object","required":false},{"in":"formData","name":"active","description":"false to create it inactive.","type":"boolean","default":true,"required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"201":{"description":"Create an import on a manual shop","schema":{"$ref":"#/definitions/API_V2_Entities_ImportEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Shop not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"409":{"description":"This shop already has an import with this `item_code` (its `import_id` is in details)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"A connected shop (its imports come from its platform), or an invalid field (named in the error)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Imports"],"operationId":"postApiV2Imports"},"get":{"summary":"List imports","description":"Returns the products on your shops, every shop, newest first: the same list as the Imports page. Matching an import to your SKUs creates a listing (`POST /listings`). `_fields=%2Braw_data` adds the full data: a manual shop's always, a connected shop's only with raw-data access on your account.","produces":["application/json"],"parameters":[{"in":"query","name":"shop_id","description":"Return only imports on this shop.","type":"integer","format":"int32","required":false},{"in":"query","name":"matched","description":"`yes`: matched to a listing. `no`: not matched yet.","type":"string","enum":["yes","no"],"required":false},{"in":"query","name":"sku","description":"Return imports with a SKU containing this text. Several SKUs can be separated by commas.","type":"string","required":false},{"in":"query","name":"item_code","description":"Return the import with this exact item code.","type":"string","required":false},{"in":"query","name":"active","description":"Return only active (true) or inactive (false) imports.","type":"boolean","required":false},{"in":"query","name":"updated_start","description":"Return imports last updated on or after this time (Unix timestamp, in seconds).","type":"integer","format":"int32","required":false},{"in":"query","name":"updated_end","description":"Return imports last updated on or before this time (Unix timestamp, in seconds).","type":"integer","format":"int32","required":false},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List imports","schema":{"$ref":"#/definitions/API_V2_Entities_ImportsCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Imports"],"operationId":"getApiV2Imports"}},"/api/v2/listings/{id}/refresh":{"post":{"summary":"Refresh a listing from its platform","description":"Re-pulls this listing from its sales channel and re-matches it to your catalogue, the same \"Refresh \u0026 match\" the Imports page runs, and returns at once. Re-read GET /listings/{id} a few minutes later. If a refresh is already in flight, nothing new is queued (`already_queued: true`).","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the listing to refresh. It must have an import on a platform that can be re-pulled.","type":"integer","format":"int32","required":true}],"responses":{"201":{"description":"Refresh a listing from its platform","schema":{"$ref":"#/definitions/API_V2_Entities_RefreshListingEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Listing not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Listing has no import to refresh from; its platform cannot be re-pulled","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"postApiV2ListingsIdRefresh"}},"/api/v2/listings/{id}/video/push":{"post":{"summary":"Push a product video to a listing","description":"Sends a linked product's video to this Shopee, TikTok, Lazada or Shopify listing, in the format that platform needs, replacing the video the listing has there. Returns 202 with the push at once; it runs in the background (Shopee, Lazada and Shopify process the video first, which can take minutes). Follow it with `GET /listings/{id}/video`. Set the video first with `POST /products/{id}/video`.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the listing.","type":"integer","format":"int32","required":true},{"in":"formData","name":"product_id","description":"Which linked product's video to send, when several products are linked. Default: the first linked product with a video.","type":"integer","format":"int32","required":false}],"responses":{"202":{"description":"Push started","schema":{"$ref":"#/definitions/API_V2_Entities_ListingVideoPushEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Listing or product not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Platform without video push, no linked product with a video, product not linked, or a push already running","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"postApiV2ListingsIdVideoPush"}},"/api/v2/listings/{id}/video":{"get":{"summary":"Get a listing's video pushes","description":"Returns whether a video can be pushed to this listing, which linked product's video a push sends by default, and the newest pushes with their status. A push moves `queued` -\u003e `uploading` -\u003e `processing` (the platform transcodes or reviews it) -\u003e `attached`, or `failed` with the reason.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the listing.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get a listing's video pushes","schema":{"$ref":"#/definitions/API_V2_Entities_ListingVideoEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Listing not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"getApiV2ListingsIdVideo"}},"/api/v2/listings/{id}":{"delete":{"summary":"Delete a listing (unmatch)","description":"Unmatches: removes the listing and its links from OneCart only, the same as Delete on OneCart only in the app. Nothing changes on the sales channel. Its import goes back to unmatched, so it can be matched again with `POST /listings`. Stock and price stop syncing to this listing.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the listing.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Delete a listing (unmatch)","schema":{"$ref":"#/definitions/API_V2_Entities_ListingDeletedEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Listing not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"deleteApiV2ListingsId"},"put":{"summary":"Update a listing","description":"Updates the `title` and/or `description` of a listing. Set `update_on_platform` to `true` to push those changes to the live listing on its channel as well.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the listing.","type":"integer","format":"int32","required":true},{"in":"formData","name":"title","description":"New title for the listing.","type":"string","required":false},{"in":"formData","name":"description","description":"New description for the listing.","type":"string","required":false},{"in":"formData","name":"update_on_platform","description":"Set to `true` to push the changes to the live listing on its platform.","type":"boolean","default":false,"required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Update a listing","schema":{"$ref":"#/definitions/API_V2_Entities_Listing"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Listing not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"putApiV2ListingsId"},"get":{"summary":"Get a listing","description":"Returns a single listing by its OneCart ID, including its title, platform, and primary image. Add `_fields` to adjust which fields are returned.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the listing.","type":"integer","format":"int32","required":true},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Get a listing","schema":{"$ref":"#/definitions/API_V2_Entities_Listing"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Listing not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"getApiV2ListingsId"}},"/api/v2/listings/{id}/quality":{"get":{"summary":"Check a listing against the marketplace listing rules","description":"Audits one Shopee, Lazada or TikTok listing against the marketplace listing rules, from data OneCart already holds (no marketplace call). Stages follow the buyer: Discovery (title), Decision (images, video, description, review replies), Demand (ads, once the first two pass).","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the listing.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Check a listing against the marketplace listing rules","schema":{"$ref":"#/definitions/API_V2_Entities_ListingQualityEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Listing not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"getApiV2ListingsIdQuality"}},"/api/v2/listings/{id}/skus":{"get":{"summary":"List a listing's SKUs","description":"Returns the SKUs linked to a listing, each with its product, current stock, and price. Use it to see which of your variants fulfill a given channel listing.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the listing.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"List a listing's SKUs","schema":{"$ref":"#/definitions/API_V2_Entities_ListingSkusEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Listing not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"getApiV2ListingsIdSkus"}},"/api/v2/listings/count":{"get":{"summary":"Count listings","description":"Returns the total number of listings, optionally narrowed by `platform`, `title`, or `shop_id`. Useful for pagination or reporting without fetching every listing.","produces":["application/json"],"parameters":[{"in":"query","name":"platform","description":"Count only listings from this platform.","type":"string","required":false},{"in":"query","name":"title","description":"Count only listings whose title contains this text.","type":"string","required":false},{"in":"query","name":"shop_id","description":"Count only listings from this shop.","type":"integer","format":"int32","required":false}],"responses":{"200":{"description":"Count listings","schema":{"$ref":"#/definitions/API_V2_Entities_CountEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"getApiV2ListingsCount"}},"/api/v2/listings":{"post":{"summary":"Match an import to your SKUs (creates a listing)","description":"Creates a listing from an import, as Save on the Imports page does, on any shop. Send `links` (which variant each import SKU is) or `auto: true` (identical SKUs only). On a connected shop, stock and price then push to this listing when the variant has Inventory Update on; a manual shop never pushes.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"import_id","description":"The import to match (from `GET /imports`).","type":"integer","format":"int32","required":true},{"in":"formData","name":"links[sku]","description":"A SKU on the import. Required in each row.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"links[variant_id]","description":"The OneCart ID of your variant. Required in each row.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"auto","description":"`true` to match by identical SKU instead of sending `links`: every import SKU must exist in your catalogue, or nothing is created.","type":"boolean","required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"201":{"description":"Match an import to your SKUs (creates a listing)","schema":{"$ref":"#/definitions/API_V2_Entities_ListingMatchEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Import or variant not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"409":{"description":"The import is already matched (`listing_id` in details): delete that listing to match it differently","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"A SKU that is not on the import; or `auto` could not match every SKU (the missing ones are listed) and nothing was created","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"postApiV2Listings"},"get":{"summary":"List listings","description":"Returns your channel listings — the product pages published on each sales channel — newest first. Filter by `platform`, `title`, or `shop_id`, and page through results with `page` and `per_page`.","produces":["application/json"],"parameters":[{"in":"query","name":"platform","description":"Return only listings from this platform, e.g. `Shopee`, `Lazada`.","type":"string","required":false},{"in":"query","name":"title","description":"Return listings whose title contains this text.","type":"string","required":false},{"in":"query","name":"shop_id","description":"Return only listings from this shop.","type":"integer","format":"int32","required":false},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List listings","schema":{"$ref":"#/definitions/API_V2_Entities_ListingsCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Listings"],"operationId":"getApiV2Listings"}},"/api/v2/insights/fees_by_sku":{"get":{"summary":"Fees by SKU","description":"Ranks the SKUs that accounted for the most of a single fee type (for example commission) over a date range, each with the fee amount, the sales value it came from, and the effective rate. Use `fee_type` to choose the fee and `limit` to cap the number of SKUs. Amounts are in your base currency.","produces":["application/json"],"parameters":[{"in":"query","name":"start_date","description":"Start of date range (YYYY-MM-DD)","type":"string","required":true},{"in":"query","name":"end_date","description":"End of date range (YYYY-MM-DD)","type":"string","required":true},{"in":"query","name":"fee_type","description":"Fee type to rank by (one of: commission, transaction, shipping_buyer_paid, shipping_seller_paid, voucher_seller_funded, voucher_platform_funded, rebate, tax, other)","type":"string","required":true},{"in":"query","name":"limit","description":"Maximum SKUs to return","type":"integer","format":"int32","default":10,"required":false}],"responses":{"200":{"description":"Fees by SKU","schema":{"$ref":"#/definitions/API_V2_Entities_FeesBySkuEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fees"],"operationId":"getApiV2InsightsFeesBySku"}},"/api/v2/insights/fees_by_shop":{"get":{"summary":"Fees by shop","description":"Breaks down marketplace fees by shop for a date range, each with a total and a per-fee-type split, so you can compare fee load across your connected stores. Ranked by total fees; use `limit` to cap the number of shops. Amounts are in your base currency.","produces":["application/json"],"parameters":[{"in":"query","name":"start_date","description":"Start of date range (YYYY-MM-DD)","type":"string","required":true},{"in":"query","name":"end_date","description":"End of date range (YYYY-MM-DD)","type":"string","required":true},{"in":"query","name":"limit","description":"Maximum shops to return","type":"integer","format":"int32","default":20,"required":false}],"responses":{"200":{"description":"Fees by shop","schema":{"$ref":"#/definitions/API_V2_Entities_FeesByShopEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fees"],"operationId":"getApiV2InsightsFeesByShop"}},"/api/v2/insights/fees_by_category":{"get":{"summary":"Fees by category","description":"Breaks down marketplace fees by buyer category for a date range, each with a total and a per-fee-type split. Ranked by total fees; use `limit` to cap the number of categories. Amounts are in your base currency.","produces":["application/json"],"parameters":[{"in":"query","name":"start_date","description":"Start of date range (YYYY-MM-DD)","type":"string","required":true},{"in":"query","name":"end_date","description":"End of date range (YYYY-MM-DD)","type":"string","required":true},{"in":"query","name":"limit","description":"Maximum categories to return","type":"integer","format":"int32","default":20,"required":false}],"responses":{"200":{"description":"Fees by category","schema":{"$ref":"#/definitions/API_V2_Entities_FeesByCategoryEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fees"],"operationId":"getApiV2InsightsFeesByCategory"}},"/api/v2/insights/fees_by_brand":{"get":{"summary":"Fees by brand","description":"Breaks down marketplace fees by brand for a date range, each with a total and a per-fee-type split, so you can see which brands cost the most to sell. Ranked by total fees; use `limit` to cap the number of brands. Amounts are in your base currency.","produces":["application/json"],"parameters":[{"in":"query","name":"start_date","description":"Start of date range (YYYY-MM-DD)","type":"string","required":true},{"in":"query","name":"end_date","description":"End of date range (YYYY-MM-DD)","type":"string","required":true},{"in":"query","name":"limit","description":"Maximum brands to return","type":"integer","format":"int32","default":20,"required":false}],"responses":{"200":{"description":"Fees by brand","schema":{"$ref":"#/definitions/API_V2_Entities_FeesByBrandEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fees"],"operationId":"getApiV2InsightsFeesByBrand"}},"/api/v2/insights/fees_summary":{"get":{"summary":"Fee summary","description":"Returns the marketplace fees you were charged across all channels for a date range: a total, a breakdown by fee type (commission, transaction, shipping, and so on), a per-platform breakdown, and coverage showing how many of your orders have fee data. All amounts are in your base currency.","produces":["application/json"],"parameters":[{"in":"query","name":"start_date","description":"Start of date range (YYYY-MM-DD)","type":"string","required":true},{"in":"query","name":"end_date","description":"End of date range (YYYY-MM-DD)","type":"string","required":true}],"responses":{"200":{"description":"Fee summary","schema":{"$ref":"#/definitions/API_V2_Entities_FeesSummaryEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fees"],"operationId":"getApiV2InsightsFeesSummary"}},"/api/v2/insights/category_sales":{"get":{"summary":"Sales summary for a category","description":"Returns order count, units sold, revenue, and SKU count for a buyer category over an optional date range. Omit `start_date`/`end_date` for all-time totals. Returns 404 if the category name is not found.","produces":["application/json"],"parameters":[{"in":"query","name":"category","description":"Category name to summarise","type":"string","required":true},{"in":"query","name":"start_date","description":"Start of date range (YYYY-MM-DD)","type":"string","required":false},{"in":"query","name":"end_date","description":"End of date range (YYYY-MM-DD)","type":"string","required":false}],"responses":{"200":{"description":"Sales summary for a category","schema":{"$ref":"#/definitions/API_V2_Entities_CategorySalesEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Category not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsCategorySales"}},"/api/v2/insights/brand_sales":{"get":{"summary":"Sales summary for a brand","description":"Returns order count, units sold, revenue, and SKU count for a brand over an optional date range. Omit `start_date`/`end_date` for all-time totals. Returns 404 if the brand name is not found.","produces":["application/json"],"parameters":[{"in":"query","name":"brand","description":"Brand name to summarise","type":"string","required":true},{"in":"query","name":"start_date","description":"Start of date range (YYYY-MM-DD)","type":"string","required":false},{"in":"query","name":"end_date","description":"End of date range (YYYY-MM-DD)","type":"string","required":false}],"responses":{"200":{"description":"Sales summary for a brand","schema":{"$ref":"#/definitions/API_V2_Entities_BrandSalesEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Brand not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsBrandSales"}},"/api/v2/insights/sku_sales":{"get":{"summary":"Sales summary for a SKU","description":"Returns order count, units sold, and revenue for a single SKU over an optional date range. Omit `start_date`/`end_date` for all-time totals. Unknown SKUs return zeroed totals rather than a 404.","produces":["application/json"],"parameters":[{"in":"query","name":"sku","description":"SKU to summarise","type":"string","required":true},{"in":"query","name":"start_date","description":"Start of date range (YYYY-MM-DD)","type":"string","required":false},{"in":"query","name":"end_date","description":"End of date range (YYYY-MM-DD)","type":"string","required":false}],"responses":{"200":{"description":"Sales summary for a SKU","schema":{"$ref":"#/definitions/API_V2_Entities_SkuSalesEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsSkuSales"}},"/api/v2/insights/cancellations":{"get":{"summary":"Cancellation metrics","description":"Reports your order cancellation rate for a week against the week before, plus the most common cancellation reasons, so you can spot and fix rising cancellations. Defaults to last week; pass `week_start` (YYYY-MM-DD) for a specific week.","produces":["application/json"],"parameters":[{"in":"query","name":"week_start","description":"Week to analyse (YYYY-MM-DD); defaults to last week","type":"string","required":false}],"responses":{"200":{"description":"Cancellation metrics","schema":{"$ref":"#/definitions/API_V2_Entities_CancellationEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsCancellations"}},"/api/v2/insights/bundles":{"get":{"summary":"Bundle analysis","description":"Reports how your product bundles are selling over the last `days`, plus the products most often bought together that you could turn into new bundles. Returns bundle performance, frequently-bought-together combinations, and a comparison of average order value for bundle vs single-item orders.","produces":["application/json"],"parameters":[{"in":"query","name":"days","description":"Sales window in days to analyse","type":"integer","format":"int32","default":7,"required":false},{"in":"query","name":"min_sales","description":"Minimum sales for a bundle to be included (0 for all)","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"limit","description":"Maximum bundles to return","type":"integer","format":"int32","default":20,"required":false}],"responses":{"200":{"description":"Bundle analysis","schema":{"$ref":"#/definitions/API_V2_Entities_BundleAnalysisEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsBundles"}},"/api/v2/insights/sla_risks":{"get":{"summary":"Orders at risk of missing their ship-by deadline","description":"Lists unshipped orders whose platform ship-by deadline falls within the next 24 hours, so you can prioritise them before you incur late-shipment penalties. Each row includes the shop, ship-by time, hours remaining, order value, and item count.","produces":["application/json"],"parameters":[{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"Orders at risk of missing their ship-by deadline","schema":{"$ref":"#/definitions/API_V2_Entities_SlaRiskCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsSlaRisks"}},"/api/v2/insights/channels":{"get":{"summary":"Channel performance","description":"Compares every connected shop side by side over the last `days`: order count, revenue, average order value, cancellation rate, week-over-week growth, top-selling SKUs and connection health, so you can see which channels pull their weight.","produces":["application/json"],"parameters":[{"in":"query","name":"days","description":"Comparison window in days","type":"integer","format":"int32","default":7,"required":false},{"in":"query","name":"exclude_inactive","description":"Omit shops with no orders in the window (default `true`); `false` includes them.","type":"boolean","default":true,"required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"Channel performance","schema":{"$ref":"#/definitions/API_V2_Entities_ChannelCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsChannels"}},"/api/v2/insights/peak_hours":{"get":{"summary":"Peak shopping hours","description":"Returns the busiest hours of the day for orders in a given week (Singapore time), so you can time promotions, restocks, and support staffing. Each row is an hour with its order count and share of the day. Defaults to last week; pass `week_start` (YYYY-MM-DD) for a specific week.","produces":["application/json"],"parameters":[{"in":"query","name":"week_start","description":"Week to analyse (YYYY-MM-DD); defaults to last week","type":"string","required":false},{"in":"query","name":"platform","description":"Filter to one platform (e.g. Shopee, Lazada); omit for all platforms combined","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"Peak shopping hours","schema":{"$ref":"#/definitions/API_V2_Entities_PeakHourCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsPeakHours"}},"/api/v2/insights/hidden_winners":{"get":{"summary":"Hidden winners","description":"Surfaces high-margin SKUs whose sales are growing fast but that you may not be promoting yet — good candidates for more stock and marketing. Returns products above `min_margin` percent margin with strong week-over-week growth over the last `days`, with weekly units, revenue, profit, and growth.","produces":["application/json"],"parameters":[{"in":"query","name":"days","description":"Sales window in days to analyse","type":"integer","format":"int32","default":7,"required":false},{"in":"query","name":"min_margin","description":"Minimum profit margin percent to include","type":"integer","format":"int32","default":50,"required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"Hidden winners","schema":{"$ref":"#/definitions/API_V2_Entities_HiddenWinnerCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsHiddenWinners"}},"/api/v2/insights/out_of_stock_sellers":{"get":{"summary":"Out-of-stock sellers","description":"Lists SKUs that sold in the last `days` but are now at zero stock — lost sales you can recover by restocking. Each row includes units sold, revenue earned in the period, and a link to the product. Ranked by units sold.","produces":["application/json"],"parameters":[{"in":"query","name":"days","description":"How far back to look for sales","type":"integer","format":"int32","default":90,"required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"Out-of-stock sellers","schema":{"$ref":"#/definitions/API_V2_Entities_OutOfStockSellerCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsOutOfStockSellers"}},"/api/v2/insights/slow_movers":{"get":{"summary":"Slow-moving inventory","description":"Lists SKUs that are tying up capital: stock on hand that has barely sold over the last `days`. Each row includes current stock, units sold in the period, inventory value, estimated days of cover, and a suggested action (promote or clear). Ranked by inventory value.","produces":["application/json"],"parameters":[{"in":"query","name":"days","description":"Sales window in days used to judge slow movers","type":"integer","format":"int32","default":30,"required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"Slow-moving inventory","schema":{"$ref":"#/definitions/API_V2_Entities_SlowMoverCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsSlowMovers"}},"/api/v2/insights/stockout_risks":{"get":{"summary":"Products at risk of stocking out","description":"Flags SKUs that will run out within the next `days` based on recent sales velocity, so you can reorder before you lose sales. Each row includes available stock, daily velocity, estimated days until stockout, revenue at risk, and the platforms the SKU is listed on.","produces":["application/json"],"parameters":[{"in":"query","name":"days","description":"Look-ahead window in days for stockout risk","type":"integer","format":"int32","default":7,"required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"Products at risk of stocking out","schema":{"$ref":"#/definitions/API_V2_Entities_StockoutRiskCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Insights"],"operationId":"getApiV2InsightsStockoutRisks"}},"/api/v2/delivery_orders/{id}":{"get":{"summary":"Get an order waiting to ship","description":"One order from your Order Processing queue by its OneCart ID, in the same shape as the list. An order no longer in the queue (shipped or cancelled) is a 404: read it with `GET /orders/{id}`.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the order.","type":"integer","format":"int32","required":true},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400. Optional field: `picked`.","type":"string","required":false}],"responses":{"200":{"description":"Get an order waiting to ship","schema":{"$ref":"#/definitions/API_V2_Entities_DeliveryOrderEnvelope"}},"400":{"description":"`_fields` mixes a bare list with +/- names","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Not one of your orders, or no longer in the queue (NOT_FOUND)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 1: Orders to ship"],"operationId":"getApiV2DeliveryOrdersId"}},"/api/v2/delivery_orders":{"get":{"summary":"List orders waiting to ship","description":"Step 1 of fulfilment: the orders in your Order Processing queue across every connected sales channel, each with customer, shipping address and line items (bundles expanded). Without `stage`, the last 14 days; with it, exactly that tab. Next: mark picked, arrange shipment, print labels.","produces":["application/json"],"parameters":[{"in":"query","name":"stage","description":"`Check` (shipment still to arrange) or `Print` (label to print): exactly that Order Processing tab, no date window. Omit for both tabs, last 14 days, active shops only.","type":"string","enum":["Check","Print"],"required":false},{"in":"query","name":"platform","description":"Return only orders from this platform, e.g. `Shopee`, `Lazada`, `TikTok`, `Zalora`.","type":"string","required":false},{"in":"query","name":"shop_id","description":"Return only orders from this shop.","type":"integer","format":"int32","required":false},{"in":"query","name":"status","description":"Return only orders with this status, as the platform names it.","type":"string","required":false},{"in":"query","name":"search","description":"Return only orders whose platform data contains this text (any field, case-insensitive), like the Order Processing search box.","type":"string","required":false},{"in":"query","name":"shipping_provider","description":"Return only orders with this shipping provider name, e.g. `SPX Express`.","type":"string","required":false},{"in":"query","name":"order_nos","description":"Only these order numbers (up to 500), comma, space or newline separated. Results follow your order (overrides `sort`); `meta.order_nos_missing` lists any not in the queue.","type":"string","required":false},{"in":"query","name":"sort","description":"`order_date_desc` (default, newest first), `order_date_asc` (oldest first, like Order Processing) or `ship_by` (earliest ship-by date first).","type":"string","default":"order_date_desc","enum":["order_date_desc","order_date_asc","ship_by"],"required":false},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400. Optional field: `picked`.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List orders waiting to ship","schema":{"$ref":"#/definitions/API_V2_Entities_DeliveryOrdersCollection"}},"400":{"description":"`stage` or `sort` outside its values; `per_page` over 100; `_fields` mixes a bare list with +/- names","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Fulfilment 1: Orders to ship"],"operationId":"getApiV2DeliveryOrders"}},"/api/v2/shopify_locations/{id}":{"put":{"summary":"Update location stock","description":"Sets the on-hand quantity for one or more variants at a specific Shopify location. Pass an `updates` array of `{ id, quantity }` pairs. The response reports which updates succeeded and which failed. Requires a full-access API key.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the Shopify location to update.","type":"integer","format":"int32","required":true},{"in":"formData","name":"updates[id]","description":"The OneCart variant ID to update.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"updates[quantity]","description":"The new on-hand quantity to set for this variant at the location.","type":"array","required":true,"items":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Update location stock","schema":{"$ref":"#/definitions/API_V2_Entities_LocationStockUpdateEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Shopify location not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"500":{"description":"Stock update failed","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Locations"],"operationId":"putApiV2ShopifyLocationsId"}},"/api/v2/shopify_locations":{"get":{"summary":"List Shopify locations","description":"Returns the Shopify stock locations across your connected Shopify shops, each with its Shopify location ID, name, and shop. Use these IDs to target a location when pushing stock updates. Page through results with `page` and `per_page`.","produces":["application/json"],"parameters":[{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List Shopify locations","schema":{"$ref":"#/definitions/API_V2_Entities_ShopifyLocationsCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Locations"],"operationId":"getApiV2ShopifyLocations"}},"/api/v2/buyer_categories/{id}/skus":{"get":{"summary":"List SKUs in a category","description":"Returns the SKUs assigned to a single buyer category, ordered by SKU. Each row includes the product, on-hand quantity, and price. Page through results with `page` and `per_page`.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the category.","type":"integer","format":"int32","required":true},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List SKUs in a category","schema":{"$ref":"#/definitions/API_V2_Entities_CategorySkusEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Category not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Categories"],"operationId":"getApiV2BuyerCategoriesIdSkus"}},"/api/v2/buyer_categories":{"get":{"summary":"List buyer categories","description":"Returns every buyer category with the number of SKUs in it, ordered by name. Page through results with `page` and `per_page`.","produces":["application/json"],"parameters":[{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List buyer categories","schema":{"$ref":"#/definitions/API_V2_Entities_BuyerCategoriesCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Categories"],"operationId":"getApiV2BuyerCategories"}},"/api/v2/sku_channels":{"get":{"summary":"Look up channels for SKUs","description":"Returns the sales channels and listings each of the given SKUs appears on. Pass the SKUs you want to check in the `skus` array; you receive one result per SKU. Use this to confirm where a product is listed across your channels.","produces":["application/json"],"parameters":[{"in":"formData","name":"skus","description":"The SKUs to look up.","type":"array","items":{"type":"string"},"required":true}],"responses":{"200":{"description":"Look up channels for SKUs","schema":{"$ref":"#/definitions/API_V2_Entities_SkuChannelsEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Coverage"],"operationId":"getApiV2SkuChannels"}},"/api/v2/links/{id}":{"put":{"summary":"Update the price on one channel","description":"Sets the SKU's price on this one channel, as editing the link's price in the app does: the price is stored and its push queued to that channel only, leaving the SKU's other channels untouched. Safe to repeat: the same price is re-pushed. Channels with no price API (e.g. RedMart) store it only: `price_push: skipped`.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the channel link (from `GET /links`).","type":"integer","format":"int32","required":true},{"in":"formData","name":"price","description":"New price on this channel. Must be greater than 0.","type":"number","format":"float","required":true}],"responses":{"200":{"description":"Update the price on one channel","schema":{"$ref":"#/definitions/API_V2_Entities_LinkPriceUpdateEnvelope"}},"400":{"description":"`price` missing or not greater than 0","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Link not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Channel prices"],"operationId":"putApiV2LinksId"},"get":{"summary":"Get a channel link","description":"Returns one SKU-on-channel link with its current price on that channel.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the channel link.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get a channel link","schema":{"$ref":"#/definitions/API_V2_Entities_LinkEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Link not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Channel prices"],"operationId":"getApiV2LinksId"}},"/api/v2/links/bulk_update":{"put":{"summary":"Update channel prices in bulk","description":"Changes the price of up to 100 channel links in one request. Each row works like editing that link's price in the app: the price is stored and its push queued to that channel only, leaving the SKU's other channels untouched. A failed row reports an `error` and never stops the others.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"updates[id]","description":"ID of the channel link (from `GET /links`). Unknown or another company's: the row fails.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"updates[sku]","description":"SKU to price; send with `shop_id` instead of `id`. No link for it on that shop: the row fails.","type":"array","required":false,"items":{"type":"string"}},{"in":"formData","name":"updates[shop_id]","description":"Shop the SKU is listed on (ids from `GET /shops`); send with `sku` instead of `id`.","type":"array","required":false,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"updates[price]","description":"New price on this channel. Must be greater than 0, else the row fails.","type":"array","required":true,"items":{"type":"number","format":"float"}}],"responses":{"200":{"description":"Update channel prices in bulk","schema":{"$ref":"#/definitions/API_V2_Entities_LinkBulkPriceEnvelope"}},"400":{"description":"More than 100 rows; a row without `price`","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Channel prices"],"operationId":"putApiV2LinksBulkUpdate"}},"/api/v2/links":{"get":{"summary":"List channel links (per-channel prices)","description":"Returns one row per SKU-on-channel link, each with its own `price`. This is how to see what a SKU sells for on each channel, and how to find the `id` to change one channel's price with `PUT /links/{id}`. Filter by `sku` (exact), `skus` (several), `shop_id`, or `platform`. Newest first; paginated.","produces":["application/json"],"parameters":[{"in":"query","name":"sku","description":"Return only links for this exact SKU.","type":"string","required":false},{"in":"formData","name":"skus","description":"Return only links for these SKUs.","type":"array","items":{"type":"string"},"required":false},{"in":"query","name":"shop_id","description":"Return only links on this shop (see `GET /shops`).","type":"integer","format":"int32","required":false},{"in":"query","name":"platform","description":"Return only links on this platform, e.g. `Shopify`, `Lazada`, `Shopee`.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List channel links (per-channel prices)","schema":{"$ref":"#/definitions/API_V2_Entities_LinksCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Channel prices"],"operationId":"getApiV2Links"}},"/api/v2/coverage":{"post":{"summary":"Find SKU coverage gaps for a large SKU list","description":"Same as the GET form, but accepts the SKU list in the request body so you can check 1000+ SKUs at once. Returns a sample of the gaps plus a link to the full report. Requires a full-access API key.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"shop_ids","description":"Check only these shops. Defaults to all active shops.","type":"array","items":{"type":"string"},"required":false},{"in":"formData","name":"skus","description":"Check only these SKUs. Supports 1000+ entries.","type":"array","items":{"type":"string"},"required":false},{"in":"formData","name":"limit","description":"Maximum number of gap rows to return in the sample.","type":"integer","format":"int32","default":10,"minimum":1,"maximum":50,"required":false}],"responses":{"201":{"description":"Find SKU coverage gaps for a large SKU list","schema":{"$ref":"#/definitions/API_V2_Entities_CoverageEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Coverage"],"operationId":"postApiV2Coverage"},"get":{"summary":"Find SKU coverage gaps","description":"Returns SKUs that are not listed on shops where they should be, along with a link to the full report in the app. By default it checks all active shops; narrow the scope with `shop_ids` or `skus`, and cap the sample with `limit`. For very large SKU lists, use the POST form instead.","produces":["application/json"],"parameters":[{"in":"formData","name":"shop_ids","description":"Check only these shops. Defaults to all active shops.","type":"array","items":{"type":"string"},"required":false},{"in":"formData","name":"skus","description":"Check only these SKUs.","type":"array","items":{"type":"string"},"required":false},{"in":"query","name":"limit","description":"Maximum number of gap rows to return in the sample.","type":"integer","format":"int32","default":10,"minimum":1,"maximum":50,"required":false}],"responses":{"200":{"description":"Find SKU coverage gaps","schema":{"$ref":"#/definitions/API_V2_Entities_CoverageEnvelope"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Coverage"],"operationId":"getApiV2Coverage"}},"/api/v2/account_health":{"get":{"summary":"Account setup \u0026 data-quality health check","description":"One read-only report on how completely this account is set up (catalogue, listing matches, order line items) with a 0-100 `setup_score` and count-bearing `recommendations`, so an assistant can say what still needs doing before analytics and inventory sync are reliable. Takes no parameters.","produces":["application/json"],"responses":{"200":{"description":"Account setup \u0026 data-quality health check","schema":{"$ref":"#/definitions/API_V2_Entities_AccountHealthEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Account Health"],"operationId":"getApiV2AccountHealth"}},"/api/v2/bundle_uploads/{id}":{"get":{"summary":"Get a bundle upload","description":"Returns the status and results of a bundle upload job by its ID, including each row and whether it succeeded or failed. Poll this after creating an upload to see when processing is complete and to read any per-row errors.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the bundle upload job.","type":"integer","format":"int32","required":true},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Get a bundle upload","schema":{"$ref":"#/definitions/API_V2_Entities_BundleUploadEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Bundle upload not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Bundle Uploads"],"operationId":"getApiV2BundleUploadsId"}},"/api/v2/bundle_uploads":{"post":{"summary":"Create a bundle upload","description":"Creates bundles in bulk as one background job, the same as a CSV on the Bundle Uploads page, and returns at once with the job `id` and `status`. Send one `bundles` row per bundle component. Poll GET /bundle_uploads/{id} for per-row results.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"name","description":"A name to identify this bundle upload job.","type":"string","required":true},{"in":"formData","name":"bundles[product_code]","description":"The parent product SKU the bundle belongs to.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"bundles[bundle_sku]","description":"The SKU of the bundle itself.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"bundles[component_sku]","description":"The SKU of a component contained in the bundle.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"bundles[quantity_in_bundle]","description":"How many units of this component the bundle contains.","type":"array","required":true,"items":{"type":"integer","format":"int32"}}],"responses":{"201":{"description":"Create a bundle upload","schema":{"$ref":"#/definitions/API_V2_Entities_BundleUploadEnvelope"}},"400":{"description":"Missing `name` or `bundles`, or a row lacks a field","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"The upload job could not be saved","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Bundle Uploads"],"operationId":"postApiV2BundleUploads"}},"/api/v2/zapier":{"get":{"summary":"Test the connection","description":"Confirms your API key is valid and returns the connected company name, the name of the key you authenticated with, and the email of the user who owns it. Use it to verify credentials before making other calls.","produces":["application/json"],"responses":{"200":{"description":"Test the connection","schema":{"$ref":"#/definitions/API_V2_Entities_ZapierAuthEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Utilities"],"operationId":"getApiV2Zapier"}},"/api/v2/reviews/{id}/reply":{"post":{"summary":"Reply to a review","description":"Posts a public seller reply to the review on its marketplace, as replying from the Reviews Inbox in the app does. It is sent synchronously and saved in OneCart only once the marketplace accepts it; a retry is then refused, never posted twice. Returns the updated review.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the review.","type":"integer","format":"int32","required":true},{"in":"formData","name":"content","description":"The public reply text, non-blank. Text over 500 characters (Lazada's limit, applied to every platform) is truncated.","type":"string","required":true}],"responses":{"200":{"description":"Reply sent","schema":{"$ref":"#/definitions/API_V2_Entities_ReviewEnvelope"}},"400":{"description":"`content` missing or blank","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Review not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"No reply API (PLATFORM_REPLY_UNSUPPORTED); rating-only/disallowed (REVIEW_NOT_REPLYABLE); already replied (REVIEW_ALREADY_REPLIED); refused (PLATFORM_REJECTED)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Reviews"],"operationId":"postApiV2ReviewsIdReply"}},"/api/v2/reviews/{id}":{"get":{"summary":"Get a review","description":"Returns a single review by its OneCart ID. Add `_fields` to include the platform identifiers and association ids.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The OneCart ID of the review.","type":"integer","format":"int32","required":true},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Get a review","schema":{"$ref":"#/definitions/API_V2_Entities_ReviewEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Review not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Reviews"],"operationId":"getApiV2ReviewsId"}},"/api/v2/reviews/kpis":{"get":{"summary":"Review KPIs","description":"Returns the header metrics of your Reviews Inbox (`/reviews` in the app), optionally narrowed to one `platform` or `shop_id`. Rating-only reviews count towards `critical_unanswered` but not towards `needs_reply` or `reply_rate`.","produces":["application/json"],"parameters":[{"in":"query","name":"platform","description":"Only count reviews from this platform, e.g. `Shopee`, `Lazada`.","type":"string","required":false},{"in":"query","name":"shop_id","description":"Only count reviews for this shop.","type":"integer","format":"int32","required":false}],"responses":{"200":{"description":"Review KPIs","schema":{"$ref":"#/definitions/API_V2_Entities_ReviewKpisEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Reviews"],"operationId":"getApiV2ReviewsKpis"}},"/api/v2/reviews":{"get":{"summary":"List reviews","description":"Returns the marketplace reviews in your Reviews Inbox (`/reviews` in the app), newest first by `reviewed_at`, paginated. `status` defaults to `all` here, whereas the app inbox opens on `needs_reply`.","produces":["application/json"],"parameters":[{"in":"query","name":"platform","description":"Return only reviews from this platform, e.g. `Shopee`, `Lazada`.","type":"string","required":false},{"in":"query","name":"shop_id","description":"Return only reviews for this shop.","type":"integer","format":"int32","required":false},{"in":"query","name":"status","description":"`all` (default), `needs_reply`/`unanswered` (synonyms: written comment, no seller reply), `replied`, `ratings` (rating-only), `critical` (1–2 stars, rating-only included).","type":"string","default":"all","enum":["all","unanswered","needs_reply","replied","ratings","critical"],"required":false},{"in":"query","name":"rating","description":"Return only reviews with this star rating (1–5).","type":"integer","format":"int32","minimum":1,"maximum":5,"required":false},{"in":"query","name":"reviewed_start","description":"Return reviews left on or after this time (Unix timestamp in seconds, inclusive).","type":"string","required":false},{"in":"query","name":"reviewed_end","description":"Return reviews left on or before this time (Unix timestamp in seconds, inclusive).","type":"string","required":false},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List reviews","schema":{"$ref":"#/definitions/API_V2_Entities_ReviewsCollection"}},"400":{"description":"`status` or `rating` outside its allowed values","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Reviews"],"operationId":"getApiV2Reviews"}},"/api/v2/backfills/all":{"post":{"summary":"Run every backfill in order (brands → categories → order history)","description":"The one call to get an account ready for analysis: creates brands and categories from every connected channel and tags SKUs, then links past order lines to products — in that order, as a single background job so no step can be skipped. Returns immediately; safe to repeat.","produces":["application/json"],"consumes":["application/json"],"responses":{"201":{"description":"Run every backfill in order (brands → categories → order history)","schema":{"$ref":"#/definitions/API_V2_Entities_BackfillEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Forbidden — key lacks backfills:write","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Backfills"],"operationId":"postApiV2BackfillsAll"}},"/api/v2/backfills/link_order_history":{"post":{"summary":"Link order history to products","description":"Links past order lines to catalogue SKUs (case-insensitive SKU match) and fills line cost and profit where a cost price is known. Until it runs, unlinked lines are missing from SKU, brand and category sales reports. Runs in the background and returns at once; safe to repeat.","produces":["application/json"],"consumes":["application/json"],"responses":{"201":{"description":"Link order history to products","schema":{"$ref":"#/definitions/API_V2_Entities_BackfillEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Forbidden — key lacks backfills:write","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Backfills"],"operationId":"postApiV2BackfillsLinkOrderHistory"}},"/api/v2/backfills/buyer_categories":{"post":{"summary":"Create buyer categories from every connected channel and tag SKUs","description":"Creates any missing buyer category from every connected channel that carries category data (Shopee, Lazada, WooCommerce, TikTok), case-insensitive, then tags every SKU that has none. Runs in the background and returns at once; safe to repeat. `enqueued: false` when no channel has the data.","produces":["application/json"],"consumes":["application/json"],"responses":{"201":{"description":"Create buyer categories from every connected channel and tag SKUs","schema":{"$ref":"#/definitions/API_V2_Entities_BackfillEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Forbidden — key lacks backfills:write","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Backfills"],"operationId":"postApiV2BackfillsBuyerCategories"}},"/api/v2/backfills/brands":{"post":{"summary":"Create brands from every connected channel and tag SKUs","description":"Creates any missing brand from every connected channel that carries brand data (Shopee, Lazada), case-insensitive with no duplicates, then tags every SKU that has no brand. Runs in the background and returns at once; safe to repeat. `enqueued: false` when no channel carries brand data.","produces":["application/json"],"consumes":["application/json"],"responses":{"201":{"description":"Create brands from every connected channel and tag SKUs","schema":{"$ref":"#/definitions/API_V2_Entities_BackfillEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Forbidden — key lacks backfills:write","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Backfills"],"operationId":"postApiV2BackfillsBrands"}},"/api/v2/cross_posts/{id}/publish":{"post":{"summary":"Publish a prepared cross-post (step 2 of 2)","description":"Sends the reviewed drafts live to the marketplaces; the only step that creates live listings. By default every `ready_for_review` listing with no blocking actions is published; pass `copy_listing_ids` for a subset. Returns `queued` and `blocked` (with the reason).","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The cross-post batch ID.","type":"integer","format":"int32","required":true},{"in":"formData","name":"copy_listing_ids","description":"Publish only these listings (default: every ready listing in the batch).","type":"array","items":{"type":"integer","format":"int32"},"required":false}],"responses":{"201":{"description":"Publish a prepared cross-post (step 2 of 2)","schema":{"$ref":"#/definitions/API_V2_Entities_CrossPostPublishEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key, or no `cross_posts:write` scope","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Cross-post not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Cross-posting"],"operationId":"postApiV2CrossPostsIdPublish"}},"/api/v2/cross_posts/{id}/draft":{"get":{"summary":"Get the prepared draft","description":"Returns the full prepared payload for each listing in the batch - exactly what publish will send to the marketplace - so a client or agent can review it before publishing. This is your own catalog data; nothing is redacted.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The cross-post batch ID.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get the prepared draft","schema":{"$ref":"#/definitions/API_V2_Entities_CrossPostDraftEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Cross-post not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Cross-posting"],"operationId":"getApiV2CrossPostsIdDraft"}},"/api/v2/cross_posts/{id}":{"get":{"summary":"Get a cross-post batch","description":"Returns a cross-post batch's overall status and each destination listing (status, whether the AI prepared it, any blocking reason, and the live listing URL once published). The reviewable draft is embedded per listing.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The cross-post batch ID.","type":"integer","format":"int32","required":true},{"in":"query","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"200":{"description":"Get a cross-post batch","schema":{"$ref":"#/definitions/API_V2_Entities_CrossPostEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Cross-post not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Cross-posting"],"operationId":"getApiV2CrossPostsId"}},"/api/v2/cross_posts":{"post":{"summary":"Prepare a cross-post (step 1 of 2)","description":"OneCart AI builds a draft listing (category, required attributes, brand, size chart, ...) for each destination shop from one source item. Nothing is published: each listing lands in `ready_for_review` or `prepare_failed`. Review the draft, then call POST /cross_posts/{id}/publish.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"variant_id","description":"OneCart variant (SKU) ID of the source item. Send one of `variant_id`, `sku`, `product_id` or `import_id`.","type":"integer","format":"int32","required":false},{"in":"formData","name":"sku","description":"SKU of the source item. Must match a cross-postable listing or an Item Master product.","type":"string","required":false},{"in":"formData","name":"product_id","description":"OneCart product ID of the source item (uses its variants). A product never listed anywhere is a valid source.","type":"integer","format":"int32","required":false},{"in":"formData","name":"import_id","description":"Source Import ID directly (advanced; skips SKU lookup): an import on a supported cross-post platform, or one of your manual-shop imports from POST /imports.","type":"integer","format":"int32","required":false},{"in":"formData","name":"shop_ids","description":"Destination shop IDs: active, on a supported platform, not the source shop (for a product: not already listing it). Any other shop comes back `skipped` with a reason.","type":"array","items":{"type":"integer","format":"int32"},"required":true},{"in":"formData","name":"category_id","description":"Override the AI-picked destination category (applied to every prepared shop).","type":"string","required":false},{"in":"formData","name":"_fields","description":"Fields to return: a list (`id,status`) for only those, or `%2Bname`/`-name` to adjust the defaults (send `+` as `%2B`). Mixing both is a 400.","type":"string","required":false}],"responses":{"201":{"description":"Prepare a cross-post (step 1 of 2)","schema":{"$ref":"#/definitions/API_V2_Entities_CrossPostEnvelope"}},"400":{"description":"No source given: send one of variant_id, sku, product_id, import_id","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key, or no `cross_posts:write` scope","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Variant, product or import not found; SKU matches no cross-postable listing or Item Master product","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"The import's platform cannot be a source; none of the shop_ids can receive this cross-post","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Cross-posting"],"operationId":"postApiV2CrossPosts"}},"/api/v2/ai/enhance":{"post":{"summary":"Enhance a title or description","description":"Rewrites a product title or description with OneCart AI, like Enhance with AI in the app, and returns the suggestion without saving anything. Metered against your AI credits.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"field_type","description":"`title` or `description`: which field to enhance.","type":"string","enum":["title","description"],"required":true},{"in":"formData","name":"text","description":"The current title or description to improve. Send this or `variant_id`.","type":"string","required":false},{"in":"formData","name":"variant_id","description":"Use this OneCart variant's product title/description instead of `text`; 404 if not yours. Takes precedence over `text`.","type":"integer","format":"int32","required":false}],"responses":{"201":{"description":"Enhance a title or description","schema":{"$ref":"#/definitions/API_V2_Entities_AiEnhanceEnvelope"}},"400":{"description":"Bad `field_type`, or no `text` / variant content to enhance (VALIDATION_ERROR)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"402":{"description":"Insufficient AI credits (PAYMENT_REQUIRED)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key without `ai:write`","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"`variant_id` is not one of your variants (NOT_FOUND)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Enhancement failed; try again","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["AI"],"operationId":"postApiV2AiEnhance"}},"/api/v2/logistics_providers/{id}/pickup_timings":{"get":{"summary":"Get pickup dates and time slots","description":"The pickup dates and slots you can book with this provider, as Order Processing shows them: live from SPX; for SingPost (no slots API) the next 7 weekdays at 9am. Pass `date` and `pickup_time_id` to `POST /shipments` soon, as slots change.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The logistics provider ID.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get pickup dates and time slots","schema":{"$ref":"#/definitions/API_V2_Entities_PickupTimingsEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Provider not found, or another company's (NOT_FOUND)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"The provider refused the slot read (PROVIDER_ERROR); platform not supported (UNSUPPORTED_PROVIDER)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"502":{"description":"Provider could not be reached (PROVIDER_UNAVAILABLE)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Ship with your logistics provider"],"operationId":"getApiV2LogisticsProvidersIdPickupTimings"}},"/api/v2/logistics_providers":{"get":{"summary":"List your logistics providers","description":"Your own SPX and SingPost accounts, set up in Settings, Logistics Providers. Each comes with your pickup addresses. Use a provider `id` as `provider_id` and an address `id` as `pickup_address_id` in `POST /shipments`. Pickup is the only delivery method.","produces":["application/json"],"parameters":[{"in":"query","name":"active","description":"Only active providers when true.","type":"boolean","required":false}],"responses":{"200":{"description":"List your logistics providers","schema":{"$ref":"#/definitions/API_V2_Entities_LogisticsProvidersEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Ship with your logistics provider"],"operationId":"getApiV2LogisticsProviders"}},"/api/v2/shipments/{id}/cancel":{"post":{"summary":"Cancel a shipment","description":"Cancels the booking with the provider and marks the shipment `cancelled`, as Cancel on the Shipments page does (SPX only). The items can be booked again, but the Shopify fulfilment or WooCommerce completion is not undone.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"path","name":"id","description":"The shipment ID.","type":"integer","format":"int32","required":true},{"in":"formData","name":"reason","description":"Cancel reason sent to the provider. Default `Wrong Details`.","type":"string","required":false}],"responses":{"201":{"description":"Cancel a shipment","schema":{"$ref":"#/definitions/API_V2_Entities_ShipmentEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Shipment not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Already cancelled (ALREADY_CANCELLED); SingPost, nothing sent (CANCEL_NOT_SUPPORTED); SPX refused (PROVIDER_ERROR)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Ship with your logistics provider"],"operationId":"postApiV2ShipmentsIdCancel"}},"/api/v2/shipments/{id}/label":{"get":{"summary":"Get the shipping label","description":"The provider's label (AWB) for this parcel, as Print AWB gets it in OneCart. By default a provider-hosted PDF link (SPX links expire, so fetch it soon); `label_format=pdf` returns the file as `pdf_base64`.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The shipment ID.","type":"integer","format":"int32","required":true},{"in":"query","name":"label_format","description":"`url` (default: the provider-hosted PDF link) or `pdf` (the file as `pdf_base64`).","type":"string","default":"url","enum":["url","pdf"],"required":false},{"in":"query","name":"include_items","description":"SPX only: stamp the parcel's items onto the label; always returns `pdf`. Default `false`, ignored for SingPost.","type":"boolean","default":false,"required":false}],"responses":{"200":{"description":"Get the shipping label","schema":{"$ref":"#/definitions/API_V2_Entities_ShipmentLabelEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Shipment not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"The provider returned no label (LABEL_ERROR)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"502":{"description":"The label URL could not be downloaded for `pdf` (PROVIDER_UNAVAILABLE)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Ship with your logistics provider"],"operationId":"getApiV2ShipmentsIdLabel"}},"/api/v2/shipments/{id}":{"get":{"summary":"Get a shipment","description":"One shipment booked with your logistics provider: tracking number, status and the items in the parcel.","produces":["application/json"],"parameters":[{"in":"path","name":"id","description":"The shipment ID.","type":"integer","format":"int32","required":true}],"responses":{"200":{"description":"Get a shipment","schema":{"$ref":"#/definitions/API_V2_Entities_ShipmentEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Shipment not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Ship with your logistics provider"],"operationId":"getApiV2ShipmentsId"}},"/api/v2/shipments":{"post":{"summary":"Book shipments with your logistics provider","description":"Books parcels with your own SPX or SingPost account, as Send to Logistics Provider in Order Processing does; each parcel gets its own shipment and tracking number. Send `order_ids` (whole orders) or `parcels` (items from `GET /orders/{id}/shippable_items`), with a slot from `pickup_timings`.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"provider_id","description":"Your logistics provider, from `GET /logistics_providers`.","type":"integer","format":"int32","required":true},{"in":"formData","name":"delivery_method","description":"`pickup` (default and the only method today); any other value is a 400.","type":"string","default":"pickup","enum":["pickup"],"required":false},{"in":"formData","name":"pickup_address_id","description":"Where the parcels are collected: a `pickup_addresses[].id` from `GET /logistics_providers`.","type":"integer","format":"int32","required":true},{"in":"formData","name":"pickup_date","description":"A `date` from `GET /logistics_providers/{id}/pickup_timings`, e.g. `2026-10-06`. Re-checked with the provider before booking.","type":"string","required":true},{"in":"formData","name":"pickup_time_id","description":"A `slots[].pickup_time_id` of that date; refused if the slot is no longer open.","type":"integer","format":"int32","required":true},{"in":"formData","name":"order_ids","description":"Ship these whole orders (Shopify, WooCommerce, Magento), one parcel each. Send this or `parcels`, not both.","type":"array","items":{"type":"integer","format":"int32"},"required":false},{"in":"formData","name":"parcels[order_id]","description":"The OneCart ID of the order.","type":"array","required":true,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"parcels[line_items][ref]","description":"A `ref` from `GET /orders/{id}/shippable_items`.","type":"array","required":true,"items":{"type":"string"}},{"in":"formData","name":"parcels[line_items][qty]","description":"How many. At most the item's `unshipped_qty`, across all parcels.","type":"array","required":true,"items":{"type":"integer","format":"int32"}},{"in":"formData","name":"parcels[weight]","description":"Weight in kg (default 1).","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"parcels[length]","description":"Length in cm (default 30).","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"parcels[width]","description":"Width in cm (default 20).","type":"array","required":false,"items":{"type":"number","format":"float"}},{"in":"formData","name":"parcels[height]","description":"Height in cm (default 10).","type":"array","required":false,"items":{"type":"number","format":"float"}}],"responses":{"201":{"description":"Book shipments with your logistics provider","schema":{"$ref":"#/definitions/API_V2_Entities_ShipmentBookingEnvelope"}},"400":{"description":"Both or neither of `parcels` / `order_ids`, or a required param missing","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"Provider or order not found, or another company's (NOT_FOUND)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"UNSUPPORTED_PLATFORM, INVALID_PICKUP_ADDRESS, INVALID_PARCELS, ALREADY_SHIPPED, INVALID_PICKUP_DATE/SLOT, ORDER_DATA_ERROR (nothing sent); PROVIDER_ERROR","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"502":{"description":"Provider could not be reached; booking state unknown (PROVIDER_UNAVAILABLE)","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Ship with your logistics provider"],"operationId":"postApiV2Shipments"},"get":{"summary":"List shipments","description":"Parcels booked with your own logistics provider, newest first. Filter by `status`, `order_id` or `provider_id`.","produces":["application/json"],"parameters":[{"in":"query","name":"status","description":"Only shipments in this status: `created` (booked) or `cancelled`.","type":"string","required":false},{"in":"query","name":"order_id","description":"Only shipments for this order.","type":"integer","format":"int32","required":false},{"in":"query","name":"provider_id","description":"Only shipments booked with this logistics provider.","type":"integer","format":"int32","required":false},{"in":"query","name":"page","description":"Page number (default 1).","type":"integer","format":"int32","default":1,"required":false},{"in":"query","name":"per_page","description":"Results per page (default 25, max 100).","type":"integer","format":"int32","default":25,"minimum":1,"maximum":100,"required":false}],"responses":{"200":{"description":"List shipments","schema":{"$ref":"#/definitions/API_V2_Entities_ShipmentsCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Ship with your logistics provider"],"operationId":"getApiV2Shipments"}}},"definitions":{"API_V2_Entities_BrandSkusEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_BrandSkusData"},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_BrandSkusEnvelope model"},"API_V2_Entities_BrandSkusData":{"type":"object","properties":{"brand_id":{"type":"integer","format":"int32","description":"Unique brand ID."},"brand_name":{"type":"string","description":"Name of the brand."},"skus":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_BrandSku"},"description":"The brand's SKUs for this page, ordered by SKU."}}},"API_V2_Entities_BrandSku":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique variant ID."},"sku":{"type":"string","description":"Stock keeping unit."},"product_id":{"type":"integer","format":"int32","description":"ID of the parent product."},"product_name":{"type":"string","description":"Name of the parent product."},"quantity":{"type":"integer","format":"int32","description":"On-hand stock quantity."},"price":{"type":"number","format":"float","description":"Selling price of the SKU."}}},"API_V2_Entities_PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer","format":"int32","example":2,"description":"The page you are currently on."},"per_page":{"type":"integer","format":"int32","example":25,"description":"Number of items per page."},"total_items":{"type":"integer","format":"int32","example":342,"description":"Total number of items across all pages."},"total_pages":{"type":"integer","format":"int32","example":14,"description":"Total number of pages available."},"has_next_page":{"type":"boolean","example":true,"description":"Whether a next page exists."},"has_previous_page":{"type":"boolean","example":true,"description":"Whether a previous page exists."}}},"API_V2_Entities_Links":{"type":"object","properties":{"self":{"type":"string","description":"URL of the current page."},"first":{"type":"string","description":"URL of the first page."},"prev":{"type":"string","description":"URL of the previous page, or null on the first page."},"next":{"type":"string","description":"URL of the next page, or null on the last page."},"last":{"type":"string","description":"URL of the last page."}}},"API_V2_Entities_ErrorEnvelope":{"type":"object","properties":{"error":{"$ref":"#/definitions/API_V2_Entities_ErrorObject","description":"Details of what went wrong."}},"description":"API_V2_Entities_ErrorEnvelope model"},"API_V2_Entities_ErrorObject":{"type":"object","properties":{"code":{"type":"string","example":"VALIDATION_ERROR","description":"Semantic error code."},"message":{"type":"string","description":"Human-readable message. For a validation error it leads with the most useful hint."},"details":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ErrorDetail"}},"request_id":{"type":"string","description":"Matches the X-Request-Id response header."},"example":{"type":"object","description":"Validation errors only: a minimal valid request for this endpoint (required fields, placeholder values). Omitted when the endpoint requires nothing."},"docs_url":{"type":"string","description":"Validation errors only: this endpoint's entry in the API reference."},"import_id":{"type":"integer","format":"int32","description":"POST /imports 409 only: the import that already has this item_code."},"listing_id":{"type":"integer","format":"int32","description":"POST /listings 409 only: the listing this import is already matched to."},"unmatched_skus":{"type":"array","items":{"type":"string"},"description":"POST /listings 422 with auto only: the import SKUs with no identical SKU in your catalog."}}},"API_V2_Entities_ErrorDetail":{"type":"object","properties":{"field":{"type":"string","description":"Offending field, or null if the error is not field-specific."},"message":{"type":"string","description":"What is wrong with this field."},"path":{"type":"string","example":"updates[0].quantity","description":"Validation errors only: the field as a dotted path. `field` keeps the bracket form (`updates[0][quantity]`)."},"expected":{"type":"string","example":"array of objects {id: string (required), quantity: integer}","description":"Validation errors only: the type and shape this endpoint declares for the field."},"received":{"type":"string","example":"object with keys id, quantity (each an array)","description":"Validation errors only: the shape that was sent (never the values), or `missing`."},"hint":{"type":"string","example":"Send the body as JSON with Content-Type: application/json.","description":"Validation errors only: how to fix a recognised cause, or null."},"docs_url":{"type":"string","description":"Validation errors only: this endpoint's entry in the API reference."}}},"API_V2_Entities_BrandsCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Brand"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array","description":"Always empty on success. Failed requests return an `error` object instead."},"warnings":{"type":"array","description":"Optional notices, e.g. deprecations."}},"description":"API_V2_Entities_BrandsCollection model"},"API_V2_Entities_Brand":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique brand ID."},"name":{"type":"string","description":"Brand name."},"sku_count":{"type":"integer","format":"int32","description":"Number of variants in the brand."}}},"API_V2_Entities_ImportListingsEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ImportListingsData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ImportListingsEnvelope model"},"API_V2_Entities_ImportListingsData":{"type":"object","properties":{"enqueued":{"type":"boolean","description":"Whether a listing-import job was queued. false when an import for this shop is already in flight."},"already_queued":{"type":"boolean","description":"Present and true when nothing was queued because an import for this shop is already pending."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop the import was requested for."},"shop_platform":{"type":"string","example":"Shopee","description":"Sales channel of the shop."},"last_imported_at":{"type":"string","format":"date-time","description":"When this shop last imported listings before this call, or null."},"message":{"type":"string","description":"Human-readable summary, including how to poll for the result."}}},"API_V2_Entities_ShopEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_Shop"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ShopEnvelope model"},"API_V2_Entities_Shop":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique shop ID."},"shop_name":{"type":"string","description":"Name of the shop."},"shop_platform":{"type":"string","example":"Shopify","description":"Sales channel the shop is connected to."},"active":{"type":"boolean","description":"Whether the shop connection is currently active."},"created_at":{"type":"string","format":"date-time","description":"When the shop was connected."},"updated_at":{"type":"string","format":"date-time","description":"When the shop record was last updated."},"auth_expiry":{"type":"string","format":"date-time","description":"When the channel's authentication expires. Null when the channel doesn't expire credentials."},"last_imported_at":{"type":"string","format":"date-time","description":"When this shop's listings were last imported, or null if never. Poll it after POST /shops/{id}/import_listings to see the import land."},"is_manual":{"type":"boolean","description":"true for an offline / manual channel (walk-in, Instagram, corporate): no integration behind it, so nothing can be imported, matched or pushed to it. Its `shop_platform` is the channel name you chose. Record its sales with POST /orders/manual."},"colour":{"type":"string","example":"#1a2b3c","description":"Manual shops only: the chart colour for this channel (#rrggbb), or null. Connected platforms use their fixed brand colour."}}},"API_V2_Entities_ShopsCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Shop"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ShopsCollection model"},"API_V2_Entities_Order":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique order ID. Included by default."},"order_no":{"type":"string","example":"SH240001","description":"Order number from the sales channel. Included by default."},"platform":{"type":"string","example":"Shopee","description":"Sales channel the order came from. Included by default."},"order_date":{"type":"string","format":"date-time","description":"When the order was placed. Included by default."},"status":{"type":"string","example":"pending","description":"Current order status. Included by default."},"net_amt":{"type":"number","format":"float","description":"Net order amount in your base currency. Included by default."},"gross_amt":{"type":"number","format":"float","description":"Gross order amount in your base currency. Included by default."},"tracking_no":{"type":"string","description":"Tracking number, or null until the order ships. Included by default."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop that received the order. Included by default."},"shop_name":{"type":"string","description":"Name of the shop that received the order. Included by default."},"created_at":{"type":"string","format":"date-time","description":"When the order record was created. Included by default."},"updated_at":{"type":"string","format":"date-time","description":"When the order record was last updated. Included by default."},"finance_data":{"type":"object","description":"Finance breakdown for the order: fees, payouts, and settlement figures. Included by default."},"shipped_at":{"type":"string","format":"date-time","description":"When the order first entered a shipped status, from its order history, or null if it has not shipped. Request via `_fields`."},"company_name":{"type":"string","description":"Your company name. Request via `_fields`."},"warehouse_status":{"type":"string","description":"Warehouse fulfilment status. Request via `_fields`."},"cancel_reason_text":{"type":"string","description":"Reason the order was cancelled, or null if it was not. Request via `_fields`."},"shipping_provider_name":{"type":"string","description":"Shipping provider handling the order. Request via `_fields`."},"original_currency":{"type":"string","example":"MYR","description":"Currency the order was placed in, before conversion. Request via `_fields`."},"original_net_amt":{"type":"number","format":"float","description":"Net amount in the original order currency. Request via `_fields`."},"original_gross_amt":{"type":"number","format":"float","description":"Gross amount in the original order currency. Request via `_fields`."},"exchange_rate":{"type":"number","format":"float","description":"Exchange rate used to convert to your base currency. Request via `_fields`."},"order_items":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_OrderItem"},"description":"Line items for the order. Request via `_fields`. Empty for orders without itemized data."},"raw_data":{"type":"object","description":"The raw order payload from the sales channel, as received. Request via `_fields`. Returned only if your API key has raw-data access; omitted otherwise."}},"description":"API_V2_Entities_Order model"},"API_V2_Entities_OrderItem":{"type":"object","properties":{"variant_id":{"type":"integer","format":"int32","description":"ID of the OneCart variant this line item maps to."},"sku":{"type":"string","description":"SKU of the ordered item."},"qty":{"type":"integer","format":"int32","description":"Quantity ordered."},"unit_price":{"type":"number","format":"float","description":"Price charged per unit, after any discount."},"line_total":{"type":"number","format":"float","description":"Total charged for this line, after any discount."},"original_unit_price":{"type":"number","format":"float","description":"Price per unit before any discount."},"original_line_total":{"type":"number","format":"float","description":"Line total before any discount."}}},"API_V2_Entities_DocumentJobEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_DocumentJob"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_DocumentJobEnvelope model"},"API_V2_Entities_DocumentJob":{"type":"object","properties":{"job_id":{"type":"integer","format":"int32"},"document":{"type":"string"},"status":{"type":"string","description":"`pending`, `processing`, `completed` or `failed`."},"shop_id":{"type":"integer","format":"int32"},"order_ids":{"type":"array","items":{"type":"integer","format":"int32"}},"total_orders":{"type":"integer","format":"int32"},"processed_count":{"type":"integer","format":"int32"},"failed_orders":{"type":"array","items":{"type":"object"},"description":"`{order_no, reason}` for orders left out of the PDF."},"packed_orders":{"type":"array","items":{"type":"object"},"description":"`{order_id, order_no}` for Lazada orders packed to print them."},"error":{"type":"string","description":"Why the job failed."},"completed_at":{"type":"string","format":"date-time"},"pdf_data_base64":{"type":"string","description":"The PDF, Base64-encoded, once `status` is `completed`."}}},"API_V2_Entities_DocumentsResult":{"type":"object","properties":{"document":{"type":"string","description":"The document you asked for."},"print_jobs":{"type":"object","description":"One entry per shop keyed `shop_\u003cid\u003e`, or a single `all` entry for `order_receipt`, `order_pdf`, `custom_awb` and `picking_list`. Each has `status`: `success` (with `pdf_data_base64`, or `download_urls` for TikTok/Qoo10, or `items` for a JSON picking list), `processing` (with `job_id` and `poll`), or `error` (with `error_code`: `ORDERS_NOT_READY`, `WRONG_PLATFORM`, `PLATFORM_ERROR`, `INTERNAL_ERROR`, and `message`). Also, when they apply: `skipped_orders` `[{order_id, order_no, status, error_code, message}]`, `packed_orders` and `picked_orders` `[{order_id, order_no}]`, `platform_errors`."}},"description":"API_V2_Entities_DocumentsResult model"},"API_V2_Entities_PrintAwbsResult":{"type":"object","properties":{"print_jobs":{"type":"object","description":"One entry per shop with that shop's labels: Shopee `pdf_data_base64`; Lazada `download_url`; TikTok `download_urls`, one per package with its tracking number; Qoo10 `pdf_data_base64` plus one image URL per order in `download_urls`; Zalora `job_id` + `poll`. Each entry has `status` (`success`, `error`, or `processing` for Zalora with a `poll` URL); an error carries `error_code` (`ORDERS_NOT_READY`, `PLATFORM_ERROR`, `PLATFORM_NOT_SUPPORTED`, `INTERNAL_ERROR`) and a readable `message`, plus `platform_error` with the marketplace's own reply. Orders that were not sent to the marketplace appear in `skipped_orders` as `{order_id, order_no, status, error_code, message}`, where `error_code` is `SHIPMENT_NOT_ARRANGED`, `ORDER_NOT_PACKED`, `ORDER_UNPAID`, `ORDER_ON_HOLD`, `ORDER_CANCELLED` or `RECENTLY_PRINTED` (printed in the last 30 s)."}},"description":"API_V2_Entities_PrintAwbsResult model"},"API_V2_Entities_BulkCancelResult":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_BulkCancelEntry"}}},"description":"API_V2_Entities_BulkCancelResult model"},"API_V2_Entities_BulkCancelEntry":{"type":"object","properties":{"id":{"type":"string","description":"ID of the order in this entry."},"success":{"type":"boolean","description":"Whether this order was cancelled."},"cancel_reason":{"type":"string","description":"Present on success."},"platform_response":{"type":"object","description":"Present on success; shape varies by channel."},"error":{"type":"string","description":"Present on failure."}}},"API_V2_Entities_OrderCancelResult":{"type":"object","properties":{"order_id":{"type":"integer","format":"int32","description":"ID of the cancelled order."},"cancel_reason":{"type":"string","example":"OUT_OF_STOCK","description":"Reason the order was cancelled."},"platform_response":{"type":"object","description":"The response from the sales channel; shape varies by channel."}},"description":"API_V2_Entities_OrderCancelResult model"},"API_V2_Entities_OrderEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_Order"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_OrderEnvelope model"},"API_V2_Entities_ShippableItemsEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ShippableItems"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ShippableItemsEnvelope model"},"API_V2_Entities_ShippableItems":{"type":"object","properties":{"order_id":{"type":"integer","format":"int32"},"order_no":{"type":"string"},"platform":{"type":"string","example":"Shopify"},"line_items":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ShippableItem"},"description":"Only items with something left to ship."}}},"API_V2_Entities_ShippableItem":{"type":"object","properties":{"ref":{"type":"string","description":"The line item id on the sales channel. Use it as `parcels[].line_items[].ref`."},"name":{"type":"string"},"sku":{"type":"string"},"option":{"type":"string","description":"Variation, e.g. \"Blue / M\"."},"qty":{"type":"integer","format":"int32","description":"Quantity ordered."},"unshipped_qty":{"type":"integer","format":"int32","description":"Quantity not yet in a live (non-cancelled) shipment. The most you can put in parcels."}}},"API_V2_Entities_PickingOrderEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_PickingOrder"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_PickingOrderEnvelope model"},"API_V2_Entities_PickingOrder":{"type":"object","properties":{"order_id":{"type":"integer","format":"int32"},"order_no":{"type":"string"},"picked":{"type":"boolean","description":"Whether the order is now marked picked."},"warehouse_status":{"type":"string","description":"`packing` when picked, `picking` when not (the raw flag, also readable on GET /orders/{id} via `_fields`)."}}},"API_V2_Entities_PickingResultEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_PickingResult"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_PickingResultEnvelope model"},"API_V2_Entities_PickingResult":{"type":"object","properties":{"picked":{"type":"boolean","description":"The value you set."},"updated_count":{"type":"integer","format":"int32","description":"Orders updated."},"results":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_PickingResultRow"}}}},"API_V2_Entities_PickingResultRow":{"type":"object","properties":{"order_id":{"type":"integer","format":"int32"},"order_no":{"type":"string","description":"Present when the order was found."},"success":{"type":"boolean"},"picked":{"type":"boolean","description":"Present on success."},"error_code":{"type":"string","description":"`NOT_FOUND` when the id is not one of your orders."},"message":{"type":"string"}}},"API_V2_Entities_SplitOrderEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_SplitOrderResult"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_SplitOrderEnvelope model"},"API_V2_Entities_SplitOrderResult":{"type":"object","properties":{"status":{"type":"string","example":"split"},"order_id":{"type":"integer","format":"int32"},"order_no":{"type":"string"},"platform":{"type":"string","example":"Shopee"},"package_count":{"type":"integer","format":"int32"},"message":{"type":"string"}}},"API_V2_Entities_ArrangeShipmentBatchEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ArrangeShipmentBatch"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ArrangeShipmentBatchEnvelope model"},"API_V2_Entities_ArrangeShipmentBatch":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"status":{"type":"string","example":"processing","description":"`processing` while rows are queued, then `completed`."},"created_at":{"type":"string","format":"date-time"},"poll":{"type":"string","example":"/api/v2/orders/arrange_shipment/12","description":"POST response only: where to poll."},"results":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ArrangeShipmentBatchRow"}}}},"API_V2_Entities_ArrangeShipmentBatchRow":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"The OneCart order ID as submitted."},"order_no":{"type":"string","description":"Null when the order was not found."},"platform":{"type":"string"},"method":{"type":"string"},"outcome":{"type":"string","example":"queued","description":"`queued` until it runs, then the result `status` (`arranged`, `packed`, `fulfilled`) or `failed`."},"error_code":{"type":"string","description":"Why it failed: the same codes as the single-order endpoint, plus `NOT_FOUND` and `DUPLICATE_IN_REQUEST` (an order listed twice in one request runs once)."},"message":{"type":"string"},"result":{"$ref":"#/definitions/API_V2_Entities_ArrangeShipmentResult","description":"The single-order result once arranged."}}},"API_V2_Entities_ArrangeShipmentResult":{"type":"object","properties":{"status":{"type":"string","example":"arranged","description":"`arranged`; `packed` for Lazada/Zalora pack; `fulfilled` for Shopify/WooCommerce. Anything else is an error response."},"method":{"type":"string","example":"pickup"},"order_id":{"type":"integer","format":"int32"},"order_no":{"type":"string"},"platform":{"type":"string","example":"Shopee"},"pickup":{"type":"object","description":"Shopee pickup: the booked `{address_id, pickup_time_id, date, time_text}`."},"packages":{"type":"array","items":{"type":"object"},"description":"Shopee per-package: `{package_number, method, address_id, pickup_time_id}` arranged."},"package_ids":{"type":"array","items":{"type":"string"},"description":"Lazada pack / TikTok ready_to_ship: the packages handled."},"tracking_number":{"type":"string","description":"The tracking number sent or, for Temu buy_shipping, assigned."},"tracking":{"type":"object","description":"TikTok own_tracking: the tracking sent (a number, or per-package entries)."},"shipping_provider_id":{"type":"string","description":"TikTok own_tracking: the courier used."},"pickup_date":{"type":"string","description":"Qoo10 confirm: the date sent."},"label_urls":{"type":"array","items":{"type":"string"},"description":"Temu buy_shipping: label URLs to print."},"package_sn_list":{"type":"array","items":{"type":"string"},"description":"Temu buy_shipping: Temu package serial numbers (for own_tracking)."},"fulfillment_id":{"type":"integer","format":"int32","description":"Shopify: the fulfillment created."},"failed_packages":{"type":"array","items":{"type":"object"},"description":"Packages the marketplace rejected while others were arranged, with the reason."},"platform_errors":{"type":"array","items":{"type":"object"},"description":"Shopee split orders: Shopee's replies for packages it rejected while others were arranged."},"message":{"type":"string","description":"What happens next, e.g. poll `GET /orders/{id}` for `tracking_no`."}}},"API_V2_Entities_ArrangeShipmentEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ArrangeShipmentResult"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ArrangeShipmentEnvelope model"},"API_V2_Entities_ShippingOptionsBatchEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ShippingOptionsBatchRow"}},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ShippingOptionsBatchEnvelope model"},"API_V2_Entities_ShippingOptionsBatchRow":{"type":"object","properties":{"order_id":{"type":"integer","format":"int32"},"order_no":{"type":"string"},"platform":{"type":"string"},"status":{"type":"string"},"methods":{"type":"array","items":{"type":"string"},"description":"Non-Shopee: methods available now."},"packages":{"type":"array","items":{"type":"object"},"description":"Shopee: per package `{package_number, methods, pickup: {addresses}}`, or `{package_number, error}`."},"error_code":{"type":"string","description":"Set when the order cannot be shipped: `NOT_FOUND`, `SHIPMENT_ALREADY_ARRANGED`, `ORDER_NOT_SHIPPABLE`, `UNSUPPORTED_PLATFORM`."},"message":{"type":"string"}}},"API_V2_Entities_ShippingOptionsEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ShippingOptions"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ShippingOptionsEnvelope model"},"API_V2_Entities_ShippingOptions":{"type":"object","properties":{"order_id":{"type":"integer","format":"int32"},"order_no":{"type":"string"},"platform":{"type":"string","example":"Shopee"},"status":{"type":"string","description":"The order status OneCart holds."},"methods":{"type":"array","items":{"type":"string"},"example":["pickup","dropoff"],"description":"Methods available for this order now; pass one as `method` to arrange_shipment. Shopee `pickup`/`dropoff`/`non_integrated`, Lazada and Zalora `pack`/`ready_to_ship`, TikTok `ready_to_ship`/`own_tracking`, Qoo10 `confirm`, Temu `buy_shipping`/`own_tracking`, Shopify and WooCommerce `fulfil`."},"info_needed":{"type":"object","description":"Per method, the inputs it needs. Shopee: Shopee's own `info_needed`."},"pickup":{"type":"object","description":"Shopee: `{addresses: [PickupAddress]}` when pickup is offered, else null."},"dropoff":{"type":"object","description":"Shopee: `{branches, slugs}` exactly as Shopee returns them when dropoff is offered, else null."},"auto_pickup":{"type":"object","description":"Shopee: the `{address_id, pickup_time_id}` that `PUT /orders/{id}` with `mark_as_shipped=true` would book, or null."},"packages":{"type":"array","items":{"type":"object"},"description":"Shopee: `{package_number, logistics_status, shipping_carrier, tracking_number, arranged, items[{item_id, model_id, order_item_id, model_quantity}]}`. Lazada: `{package_id, packed, order_item_ids}`. TikTok: package ids."},"split":{"type":"object","description":"Shopee: `{eligible, how}`; split with POST /orders/{id}/split."},"own_fleet":{"type":"boolean","description":"Lazada: true for seller-own-fleet (DBS) orders, which ship through POST /orders/bulk_mark_shipped."},"seller_shipping":{"type":"boolean","description":"TikTok: true when you ship the order yourself (own_tracking)."},"shipping_providers":{"type":"array","items":{"type":"object"},"description":"TikTok seller shipping: `{id, name}` couriers for `shipping_provider_id`."},"default_shipping_provider_id":{"type":"string","description":"TikTok seller shipping: the courier already on the order."},"pickup_dates":{"type":"array","items":{"type":"object"},"description":"Qoo10: `{pickup_date (YYYYMMDD), label}`, today to a week out."},"default_pickup_date":{"type":"string","description":"Qoo10: tomorrow, the date `PUT /orders/{id}` uses."},"services":{"type":"array","items":{"type":"object"},"description":"Temu: shipping services for the given weight and dimensions, as Temu returns them (`channelId`, `shipCompanyId`, ...). Null when no dimensions were given."},"bought_package_sns":{"type":"array","items":{"type":"string"},"description":"Temu: package_sns of the shipment already bought through OneCart (buy_shipping then returns 409 ALREADY_BOUGHT)."},"bought_labels":{"type":"object","description":"Temu, once bought: `{label_urls, labels: [{package_sn, label_status (ready / not_available), label_url}]}` re-read from Temu, so a label can be printed again, or a failed one retried in Temu Seller Center, without buying again."},"ship_companies":{"type":"array","items":{"type":"object"},"description":"Temu own_tracking: couriers for `ship_company_id`, as Temu returns them."},"note":{"type":"string","description":"Platform guidance, e.g. Lazada own fleet or Temu buy_shipping cost."}}},"API_V2_Entities_BulkMarkShippedEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_BulkMarkShippedUpload"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array","description":"On POST: a notice when some orders were not queued (partial failure); see each row's `outcome`."}},"description":"API_V2_Entities_BulkMarkShippedEnvelope model"},"API_V2_Entities_BulkMarkShippedUpload":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"OneCart ID of the upload."},"status":{"type":"string","example":"processing","description":"`processing` until every queued row has been reconciled, then `completed`."},"action":{"type":"string","example":"attach_tracking","description":"The lifecycle stage this upload ran: `ready_to_ship`, `attach_tracking` or `delivered`."},"filename":{"type":"string","example":"API v2","description":"The uploaded file name, or `API v2` for API submissions."},"created_at":{"type":"string","format":"date-time","description":"When the upload was submitted."},"tracking_status":{"type":"string","description":"POST response only: the Lazada delivery status the `attach_tracking` run drives to (null for other stages)."},"poll":{"type":"string","example":"/api/v2/orders/bulk_mark_shipped/123","description":"POST response only: URL to poll for the reconciled rows."},"results":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_BulkMarkShippedRow"},"description":"One row per order."}}},"API_V2_Entities_BulkMarkShippedRow":{"type":"object","properties":{"order_no":{"type":"string","description":"The platform order number as submitted (trimmed)."},"platform":{"type":"string","example":"Lazada","description":"Sales channel of the order, or null when the order was not found."},"outcome":{"type":"string","example":"queued","description":"`queued` when a marketplace call was enqueued; otherwise an honest reason (`not found`, `not seller-own-fleet`, `not in shippable state`, `tracking number required`, `unsupported — …`, split-validation messages). After reconciliation a queued row becomes `shipped` / `delivered`, `failed — check Order Processing` or `still pending — check Order Processing`."},"order_id":{"type":"integer","format":"int32","description":"OneCart ID of the matched order, or null."},"job_ids":{"type":"array","description":"IDs of the background jobs enqueued for this order (empty when nothing was queued)."},"note":{"type":"string","description":"Optional advisory note (rare)."}}},"API_V2_Entities_BulkMarkShippedCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_BulkMarkShippedUploadSummary"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_BulkMarkShippedCollection model"},"API_V2_Entities_BulkMarkShippedUploadSummary":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"OneCart ID of the upload."},"status":{"type":"string","example":"completed"},"action":{"type":"string","example":"ready_to_ship"},"filename":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"results_count":{"type":"integer","format":"int32","description":"Number of per-order result rows in the upload."}}},"API_V2_Entities_OrdersCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Order"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_OrdersCollection model"},"API_V2_Entities_ProductVideoDeletedEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ProductVideoDeleted"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ProductVideoDeletedEnvelope model"},"API_V2_Entities_ProductVideoDeleted":{"type":"object","properties":{"product_id":{"type":"integer","format":"int32","description":"The product whose video was removed."},"deleted":{"type":"boolean","description":"Always true."}}},"API_V2_Entities_ProductVideoEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ProductVideo"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ProductVideoEnvelope model"},"API_V2_Entities_ProductVideo":{"type":"object","properties":{"product_id":{"type":"integer","format":"int32","description":"The product the video belongs to."},"url":{"type":"string","description":"Where to download the video. Signed; expires after an hour."},"filename":{"type":"string","example":"tee-demo.mp4","description":"File name."},"byte_size":{"type":"integer","format":"int32","description":"File size in bytes."},"content_type":{"type":"string","example":"video/mp4","description":"Always video/mp4."},"duration":{"type":"number","description":"Length in seconds, read from the file; null when it could not be read."},"width":{"type":"integer","format":"int32","description":"Video width in pixels; null when it could not be read."},"height":{"type":"integer","format":"int32","description":"Video height in pixels; null when it could not be read."},"uploaded_at":{"type":"string","format":"date-time","description":"When the video was added."}}},"API_V2_Entities_ProductImageDeletedEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ProductImageDeleted"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ProductImageDeletedEnvelope model"},"API_V2_Entities_ProductImageDeleted":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"ID of the image that was removed."},"deleted":{"type":"boolean","description":"Always true."}}},"API_V2_Entities_ProductImagesEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ProductImage"}},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ProductImagesEnvelope model"},"API_V2_Entities_ProductImage":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Image id, used to reorder or delete it."},"url":{"type":"string","description":"Where to download the image."},"position":{"type":"integer","format":"int32","description":"Place in the display order, starting at 1."},"content_type":{"type":"string","example":"image/jpeg","description":"File type."},"size":{"type":"integer","format":"int32","description":"File size in bytes."},"filename":{"type":"string","description":"File name."}}},"API_V2_Entities_ProductImagesAddedEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ProductImagesAdded"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ProductImagesAddedEnvelope model"},"API_V2_Entities_ProductImagesAdded":{"type":"object","properties":{"added":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ProductImage"},"description":"The new images."},"failed":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ProductImageFailure"},"description":"The files or URLs that were not added."}}},"API_V2_Entities_ProductImageFailure":{"type":"object","properties":{"field":{"type":"string","example":"urls[0]","description":"Which file or URL of the request."},"source":{"type":"string","description":"The URL or file name."},"error":{"type":"string","description":"Why it was not added."}}},"API_V2_Entities_ProductMergedEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ProductMerged"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ProductMergedEnvelope model"},"API_V2_Entities_ProductMerged":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique product ID. Included by default."},"name":{"type":"string","description":"Parent name. Included by default."},"sku":{"type":"string","description":"Parent SKU. Cannot change. Included by default."},"total_quantity":{"type":"integer","format":"int32","description":"Total stock, worked out from the variants. Included by default."},"created_at":{"type":"string","format":"date-time","description":"When the product was created. Included by default."},"updated_at":{"type":"string","format":"date-time","description":"When the product was last updated. Included by default."},"description":{"type":"string","description":"Product description. Request via `_fields`."},"variants":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Variant"},"description":"The variants, with their default fields. Request via `_fields`."},"images":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ProductImage"},"description":"The images, in display order. Request via `_fields`."},"merged_source_product_ids":{"type":"array","items":{"type":"integer","format":"int32"},"description":"The products folded in. They no longer exist."},"variant_ids":{"type":"array","items":{"type":"integer","format":"int32"},"description":"Every variant of the merged product, inactive ones included. Variant ids do not change in a merge."}}},"API_V2_Entities_Variant":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique variant ID. Included by default."},"sku":{"type":"string","description":"Stock keeping unit. Included by default."},"price":{"type":"number","format":"float","description":"Selling price. Included by default."},"quantity":{"type":"integer","format":"int32","description":"On-hand stock quantity. Included by default."},"product_id":{"type":"integer","format":"int32","description":"ID of the parent product. Included by default."},"product_name":{"type":"string","description":"Name of the parent product. Included by default."},"is_bundle":{"type":"boolean","description":"Whether this SKU is a bundle made up of other SKUs. Included by default."},"option_name_1":{"type":"string","description":"First variant option name, e.g. `Size`. Included by default."},"option_value_1":{"type":"string","description":"First variant option value, e.g. `Large`. Included by default."},"position":{"type":"integer","format":"int32","description":"Sort position within the parent product. Included by default."},"created_at":{"type":"string","format":"date-time","description":"When the variant was created. Included by default."},"updated_at":{"type":"string","format":"date-time","description":"When the variant was last updated. Included by default."},"update_listings":{"type":"boolean","description":"Whether stock and price changes are pushed to linked listings. Request via `_fields`."},"reserve_qty":{"type":"integer","format":"int32","description":"Low-stock alert level (not stock held back from sale). Request via `_fields`."},"unit_cost_price":{"type":"number","format":"float","description":"Cost price per unit. Request via `_fields`."},"total_inventory_value":{"type":"number","format":"float","description":"On-hand quantity valued at cost. Request via `_fields`."},"total_inventory_price":{"type":"number","format":"float","description":"On-hand quantity valued at selling price. Request via `_fields`."},"details":{"type":"string","description":"Free-text variant details. Request via `_fields`."},"bundle_components":{"type":"array","items":{"type":"object"},"description":"Component SKUs of a bundle as `[{\"\u003ccomponent sku\u003e\": quantity}, ...]`; empty for a non-bundle. Request via `_fields=%2Bbundle_components`."},"custom_attributes":{"type":"object","description":"Your custom fields: free-form key/value attributes (normalized keys, string values), e.g. `{ \"material\": \"Cotton\" }`. Request via `_fields`."},"bin_location":{"type":"string","description":"Where the item sits in your warehouse. Request via `_fields`."},"expiry_date":{"type":"string","format":"date-time","description":"Expiry date. Request via `_fields`."},"weight":{"type":"number","format":"float","description":"Weight in kg. Request via `_fields`."},"package_length":{"type":"number","format":"float","description":"Package length in cm. Request via `_fields`."},"package_width":{"type":"number","format":"float","description":"Package width in cm. Request via `_fields`."},"package_height":{"type":"number","format":"float","description":"Package height in cm. Request via `_fields`."},"brand_id":{"type":"integer","format":"int32","description":"ID of the brand. Request via `_fields`."},"buyer_category_id":{"type":"integer","format":"int32","description":"ID of the product category. Request via `_fields`."}},"description":"API_V2_Entities_Variant model"},"API_V2_Entities_ProductEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_Product"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ProductEnvelope model"},"API_V2_Entities_Product":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique product ID. Included by default."},"name":{"type":"string","description":"Parent name. Included by default."},"sku":{"type":"string","description":"Parent SKU. Cannot change. Included by default."},"total_quantity":{"type":"integer","format":"int32","description":"Total stock, worked out from the variants. Included by default."},"created_at":{"type":"string","format":"date-time","description":"When the product was created. Included by default."},"updated_at":{"type":"string","format":"date-time","description":"When the product was last updated. Included by default."},"description":{"type":"string","description":"Product description. Request via `_fields`."},"variants":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Variant"},"description":"The variants, with their default fields. Request via `_fields`."},"images":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ProductImage"},"description":"The images, in display order. Request via `_fields`."}}},"API_V2_Entities_ProductsCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Product"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ProductsCollection model"},"API_V2_Entities_ForcePushEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ForcePushData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ForcePushEnvelope model"},"API_V2_Entities_ForcePushData":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the push request was accepted."},"variants_pushed":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ForcePushed"}},"errors":{"type":"array","items":{"type":"object"},"description":"Rows that could not be pushed."}}},"API_V2_Entities_ForcePushed":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"ID of the variant that was pushed."},"sku":{"type":"string","description":"SKU of the variant that was pushed."}}},"API_V2_Entities_BulkUpdateEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_BulkUpdateData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_BulkUpdateEnvelope model"},"API_V2_Entities_BulkUpdateData":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_BulkUpdateResult"}}}},"API_V2_Entities_BulkUpdateResult":{"type":"object","properties":{"id":{"type":"string","description":"ID of the variant in this row."},"success":{"type":"boolean","description":"Whether this variant was updated."},"error":{"type":"string","description":"Present only on failed rows."}}},"API_V2_Entities_VariantEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_Variant"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_VariantEnvelope model"},"API_V2_Entities_CountEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_CountData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_CountEnvelope model"},"API_V2_Entities_CountData":{"type":"object","properties":{"count":{"type":"integer","format":"int32","example":342,"description":"The matching record count."}}},"API_V2_Entities_VariantsCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Variant"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_VariantsCollection model"},"API_V2_Entities_ImportEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_Import"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ImportEnvelope model"},"API_V2_Entities_Import":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique import ID. Included by default."},"title":{"type":"string","description":"Product title on the shop. Included by default."},"platform":{"type":"string","example":"Shopee","description":"Platform of the shop (for a manual shop, its channel name). Included by default."},"item_code":{"type":"string","description":"Product id on the shop. Included by default."},"skus":{"type":"array","items":{"type":"string"},"description":"The SKUs on this product. Included by default."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop. Included by default."},"listing_id":{"type":"integer","format":"int32","description":"ID of the listing it is matched to, or null. Included by default."},"matched":{"type":"boolean","description":"Whether it is matched to a listing. Included by default."},"active":{"type":"boolean","description":"Whether it is active. Included by default."},"created_at":{"type":"string","format":"date-time","description":"When the import was created. Included by default."},"updated_at":{"type":"string","format":"date-time","description":"When the import was last updated. Included by default."},"raw_data":{"type":"object","description":"The full data. Request via `_fields`. A manual shop's is always returned; a connected shop's needs raw-data access on your account."}}},"API_V2_Entities_ImportAvailabilityEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ImportAvailabilityData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ImportAvailabilityEnvelope model"},"API_V2_Entities_ImportAvailabilityData":{"type":"object","properties":{"action":{"type":"string","enum":["delist","relist"],"description":"Which change was queued."},"queued":{"type":"array","description":"Imports a background job was queued for: `{id, platform, shop_id, listing_id, title}`. Each flips to `active` false (delist) or true (relist) once its platform accepted the change."},"skipped":{"type":"array","description":"Your imports nothing was queued for, with the reason: `{id, platform, reason}` (a platform OneCart cannot delist on, a manual shop, no shop)."},"not_found":{"type":"array","description":"Ids that are not imports of your company. Never acted on."},"message":{"type":"string","description":"Counts and how to follow up."}}},"API_V2_Entities_ImportsCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Import"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ImportsCollection model"},"API_V2_Entities_RefreshListingEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_RefreshListingData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_RefreshListingEnvelope model"},"API_V2_Entities_RefreshListingData":{"type":"object","properties":{"enqueued":{"type":"boolean","description":"Whether a refresh-and-match job was queued. false when a refresh for this listing is already in flight."},"already_queued":{"type":"boolean","description":"Present and true when nothing was queued because a refresh for this listing is already pending."},"listing_id":{"type":"integer","format":"int32","description":"ID of the listing."},"import_id":{"type":"integer","format":"int32","description":"ID of the import the refresh runs against."},"platform":{"type":"string","example":"Shopee","description":"Sales channel the listing is on."},"message":{"type":"string","description":"Human-readable summary, including how to poll for the result."}}},"API_V2_Entities_ListingVideoPushEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ListingVideoPush"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ListingVideoPushEnvelope model"},"API_V2_Entities_ListingVideoPush":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Push id."},"status":{"type":"string","enum":["queued","uploading","processing","attached","failed"],"description":"`queued`, `uploading`, `processing` (the platform is transcoding or reviewing it), `attached` (on the listing) or `failed` (see `error`)."},"platform":{"type":"string","example":"Shopee","description":"Sales channel of the listing."},"listing_id":{"type":"integer","format":"int32","description":"The listing the video is pushed to."},"product_id":{"type":"integer","format":"int32","description":"The product whose video is pushed."},"platform_video_id":{"type":"string","description":"The platform's id for the uploaded video, once it has one."},"error":{"type":"string","description":"Why the push failed, in plain words; null otherwise."},"attempts":{"type":"integer","format":"int32","description":"How many times the push job has run."},"created_at":{"type":"string","format":"date-time","description":"When the push was started."},"updated_at":{"type":"string","format":"date-time","description":"Last change."},"attached_at":{"type":"string","format":"date-time","description":"When the video was added to the listing; null until then."}}},"API_V2_Entities_ListingVideoEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ListingVideo"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ListingVideoEnvelope model"},"API_V2_Entities_ListingVideo":{"type":"object","properties":{"listing_id":{"type":"integer","format":"int32","description":"The listing."},"platform":{"type":"string","description":"Sales channel of the listing."},"pushable":{"type":"boolean","description":"Whether a video can be pushed to this listing (Shopee, TikTok, Lazada or Shopify, with a connected shop)."},"video_product_id":{"type":"integer","format":"int32","description":"The linked product whose video a push sends by default; null when no linked product has a video."},"latest":{"$ref":"#/definitions/API_V2_Entities_ListingVideoPush","description":"The newest push, or null."},"pushes":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ListingVideoPush"},"description":"Up to the 10 newest pushes, newest first."}}},"API_V2_Entities_ListingDeletedEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ListingDeleted"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ListingDeletedEnvelope model"},"API_V2_Entities_ListingDeleted":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"ID of the listing that was removed from OneCart."},"deleted":{"type":"boolean","description":"Always true."},"import_id":{"type":"integer","format":"int32","description":"The import that is unmatched again, or null."}}},"API_V2_Entities_Listing":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique listing ID. Included by default."},"title":{"type":"string","description":"Listing title on the sales channel. Included by default."},"platform":{"type":"string","example":"Shopee","description":"Sales channel the listing is on. Included by default."},"item_code":{"type":"string","description":"Item code on the sales channel. Included by default."},"url":{"type":"string","description":"Public URL of the listing on the sales channel. Included by default."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop the listing belongs to. Included by default."},"created_at":{"type":"string","format":"date-time","description":"When the listing was created. Included by default."},"updated_at":{"type":"string","format":"date-time","description":"When the listing was last updated. Included by default."},"description":{"type":"string","description":"Listing description. Request via `_fields`."},"has_image":{"type":"boolean","description":"Whether the listing has a primary image. Request via `_fields`."},"image_url":{"type":"string","description":"URL of the primary image, or null. Request via `_fields`."},"links":{"type":"array","items":{"type":"object"},"description":"The SKUs matched to this listing: `{id, variant_id, sku, product_id, shop_id, platform, price}`. Request via `_fields`."},"has_video":{"type":"boolean","description":"Whether a product linked to this listing has a video OneCart can push. Request via `_fields`."},"video_status":{"type":"string","description":"Status of the newest video push to this listing (`queued`, `uploading`, `processing`, `attached`, `failed`), or null. Request via `_fields`."}},"description":"API_V2_Entities_Listing model"},"API_V2_Entities_ListingQualityEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ListingQualityData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ListingQualityEnvelope model"},"API_V2_Entities_ListingQualityData":{"type":"object","properties":{"listing_id":{"type":"integer","format":"int32","description":"OneCart ID of the listing."},"platform":{"type":"string","example":"Shopee"},"shop_id":{"type":"integer","format":"int32"},"title":{"type":"string","description":"Current title on the platform (from the last sync)."},"title_length":{"type":"integer","format":"int32"},"title_limit":{"type":"integer","format":"int32","description":"Platform title limit used by the checks (Shopee 120, Lazada/TikTok 255)."},"brand":{"type":"string","description":"Product brand from the platform data, or null when unknown / No Brand."},"description":{"type":"string","description":"Current description on the platform (from the last sync) as plain text: the text the description findings were made on."},"description_length":{"type":"integer","format":"int32","description":"Length of `description` in characters."},"description_limit":{"type":"integer","format":"int32","description":"Platform description limit used by the checks (Shopee 5000), or null when the platform has none."},"language":{"type":"string","description":"Language buyers search in for this shop's market."},"stages":{"type":"object","description":"`discovery` (title findings), `decision` (images, video, description findings, review replies) and `demand` (ads: only after the first two pass). Each has `status`: `pass`, `needs_work` or `not_checked`; each finding is `{code, message}`."},"onecart_url":{"type":"string"},"platform_url":{"type":"string"}}},"API_V2_Entities_ListingSkusEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ListingSkusData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ListingSkusEnvelope model"},"API_V2_Entities_ListingSkusData":{"type":"object","properties":{"listing_id":{"type":"integer","format":"int32","description":"ID of the listing."},"title":{"type":"string","description":"Title of the listing."},"platform":{"type":"string","description":"Sales channel the listing is on."},"skus":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ListingSku"}}}},"API_V2_Entities_ListingSku":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique variant ID."},"link_id":{"type":"integer","format":"int32","description":"ID of the channel link (this SKU on this listing). Use it with `PUT /links/{id}` to change the price on this channel only."},"sku":{"type":"string","description":"Stock keeping unit."},"product_id":{"type":"integer","format":"int32","description":"ID of the parent product."},"product_name":{"type":"string","description":"Name of the parent product."},"quantity":{"type":"integer","format":"int32","description":"On-hand stock quantity."},"price":{"type":"number","format":"float","description":"The SKU's price on this channel listing."}}},"API_V2_Entities_ListingMatchEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ListingMatch"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ListingMatchEnvelope model"},"API_V2_Entities_ListingMatch":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique listing ID. Included by default."},"title":{"type":"string","description":"Listing title on the sales channel. Included by default."},"platform":{"type":"string","example":"Shopee","description":"Sales channel the listing is on. Included by default."},"item_code":{"type":"string","description":"Item code on the sales channel. Included by default."},"url":{"type":"string","description":"Public URL of the listing on the sales channel. Included by default."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop the listing belongs to. Included by default."},"created_at":{"type":"string","format":"date-time","description":"When the listing was created. Included by default."},"updated_at":{"type":"string","format":"date-time","description":"When the listing was last updated. Included by default."},"description":{"type":"string","description":"Listing description. Request via `_fields`."},"has_image":{"type":"boolean","description":"Whether the listing has a primary image. Request via `_fields`."},"image_url":{"type":"string","description":"URL of the primary image, or null. Request via `_fields`."},"links":{"type":"array","items":{"type":"object"},"description":"The SKUs matched to this listing: `{id, variant_id, sku, product_id, shop_id, platform, price}`. Request via `_fields`."},"has_video":{"type":"boolean","description":"Whether a product linked to this listing has a video OneCart can push. Request via `_fields`."},"video_status":{"type":"string","description":"Status of the newest video push to this listing (`queued`, `uploading`, `processing`, `attached`, `failed`), or null. Request via `_fields`."},"unmatched_skus":{"type":"array","items":{"type":"string"},"description":"SKUs on the import that were left unmatched."}}},"API_V2_Entities_ListingsCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Listing"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ListingsCollection model"},"API_V2_Entities_FeesBySkuEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_FeesBySku"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_FeesBySkuEnvelope model"},"API_V2_Entities_FeesBySku":{"type":"object","properties":{"period":{"type":"object","description":"The date range covered, with start and end."},"fee_type":{"type":"string","example":"commission","description":"The fee type these figures cover."},"currency":{"type":"string","example":"SGD","description":"Currency the amounts are reported in."},"skus":{"type":"array","description":"One row per SKU, each with its variant ID, SKU, name, fee amount, the sales value it came from, the effective rate, and a report link."}}},"API_V2_Entities_FeesByShopEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_FeesByShop"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_FeesByShopEnvelope model"},"API_V2_Entities_FeesByShop":{"type":"object","properties":{"period":{"type":"object","description":"The date range covered, with start and end."},"currency":{"type":"string","example":"SGD","description":"Currency the amounts are reported in."},"shops":{"type":"array","description":"One row per shop, each with its ID, name, platform, per-fee-type breakdown, and total."}}},"API_V2_Entities_FeesByCategoryEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_FeesByCategory"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_FeesByCategoryEnvelope model"},"API_V2_Entities_FeesByCategory":{"type":"object","properties":{"period":{"type":"object","description":"The date range covered, with start and end."},"currency":{"type":"string","example":"SGD","description":"Currency the amounts are reported in."},"categories":{"type":"array","description":"One row per category, each with its ID, name, per-fee-type breakdown, total, and a report link."}}},"API_V2_Entities_FeesByBrandEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_FeesByBrand"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_FeesByBrandEnvelope model"},"API_V2_Entities_FeesByBrand":{"type":"object","properties":{"period":{"type":"object","description":"The date range covered, with start and end."},"currency":{"type":"string","example":"SGD","description":"Currency the amounts are reported in."},"brands":{"type":"array","description":"One row per brand, each with its ID, name, per-fee-type breakdown, total, and a report link."}}},"API_V2_Entities_FeesSummaryEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_FeesSummary"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_FeesSummaryEnvelope model"},"API_V2_Entities_FeesSummary":{"type":"object","properties":{"period":{"type":"object","description":"The date range covered, with start and end."},"currency":{"type":"string","example":"SGD","description":"Currency the amounts are reported in."},"breakdown":{"type":"object","description":"Fee totals broken down by fee type, plus an overall total."},"by_platform":{"type":"array","description":"Fee totals broken down by sales channel."},"coverage":{"type":"object","description":"How complete the fee data is: total orders, eligible orders, orders that have fees, and eligible platforms."},"report_url":{"type":"string","description":"Link to the fee report in OneCart."}}},"API_V2_Entities_CategorySalesEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_CategorySales"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_CategorySalesEnvelope model"},"API_V2_Entities_CategorySales":{"type":"object","properties":{"category":{"type":"string","description":"Category name."},"category_id":{"type":"integer","format":"int32","description":"Unique category ID."},"order_count":{"type":"integer","format":"int32","description":"Number of orders containing the category's SKUs."},"qty_sold":{"type":"integer","format":"int32","description":"Total units sold."},"revenue":{"type":"number","format":"float","description":"Total revenue from the category."},"sku_count":{"type":"integer","format":"int32","description":"Number of SKUs in the category."},"report_url":{"type":"string","description":"Link to the category report in OneCart."}}},"API_V2_Entities_BrandSalesEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_BrandSales"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_BrandSalesEnvelope model"},"API_V2_Entities_BrandSales":{"type":"object","properties":{"brand":{"type":"string","description":"Brand name."},"brand_id":{"type":"integer","format":"int32","description":"Unique brand ID."},"order_count":{"type":"integer","format":"int32","description":"Number of orders containing the brand's SKUs."},"qty_sold":{"type":"integer","format":"int32","description":"Total units sold."},"revenue":{"type":"number","format":"float","description":"Total revenue from the brand."},"sku_count":{"type":"integer","format":"int32","description":"Number of SKUs in the brand."},"report_url":{"type":"string","description":"Link to the brand report in OneCart."}}},"API_V2_Entities_SkuSalesEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_SkuSales"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_SkuSalesEnvelope model"},"API_V2_Entities_SkuSales":{"type":"object","properties":{"sku":{"type":"string","description":"Stock keeping unit."},"product_name":{"type":"string","description":"Name of the product."},"product_id":{"type":"integer","format":"int32","description":"ID of the parent product."},"variant_id":{"type":"integer","format":"int32","description":"Unique variant ID."},"order_count":{"type":"integer","format":"int32","description":"Number of orders containing the SKU."},"qty_sold":{"type":"integer","format":"int32","description":"Total units sold."},"revenue":{"type":"number","format":"float","description":"Total revenue from the SKU."},"report_url":{"type":"string","description":"Link to the SKU report in OneCart."}}},"API_V2_Entities_CancellationEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_Cancellation"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_CancellationEnvelope model"},"API_V2_Entities_Cancellation":{"type":"object","properties":{"current_week":{"type":"object","description":"Current-week figures: total orders, cancelled orders, cancellation rate, and the top cancellation reasons."},"last_week":{"type":"object","description":"Previous-week figures: total orders, cancelled orders, and cancellation rate."}}},"API_V2_Entities_BundleAnalysisEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_BundleAnalysis"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_BundleAnalysisEnvelope model"},"API_V2_Entities_BundleAnalysis":{"type":"object","properties":{"bundle_performance":{"type":"array","description":"One row per bundle, each with its SKU, name, units sold, revenue, and average order value."},"frequently_bought_together":{"type":"array","description":"Product pairs often bought together, each with the combination, how often it occurred, whether it is already a bundle, and estimated revenue."},"bundle_vs_single_comparison":{"type":"object","description":"Average order value for bundle orders (orders containing a bundle SKU) versus single-item orders without one, plus multi_item_aov (orders with 2+ items), order counts per group and a basis line. Cancelled/returned orders excluded."}}},"API_V2_Entities_SlaRiskCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_SlaRisk"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_SlaRiskCollection model"},"API_V2_Entities_SlaRisk":{"type":"object","properties":{"order_no":{"type":"string","description":"Order number from the sales channel."},"platform":{"type":"string","description":"Sales channel the order came from."},"shop_name":{"type":"string","description":"Name of the shop that received the order."},"ship_by_date":{"type":"string","format":"date-time","description":"Platform deadline to ship the order by."},"hours_remaining":{"type":"number","format":"float","description":"Hours left until the ship-by deadline. Negative once it has passed."},"overdue":{"type":"boolean","description":"True when the ship-by deadline has passed."},"order_value":{"type":"number","format":"float","description":"Total value of the order."},"items_count":{"type":"integer","format":"int32","description":"Number of items in the order. Null when they could not be read."}}},"API_V2_Entities_ChannelCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Channel"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ChannelCollection model"},"API_V2_Entities_Channel":{"type":"object","properties":{"shop_id":{"type":"integer","format":"int32","description":"Unique shop ID."},"shop_name":{"type":"string","description":"Name of the shop."},"platform":{"type":"string","example":"Shopee","description":"Sales channel the shop is connected to."},"current_week":{"type":"object","description":"Current-week totals for this shop: order count, revenue, average order value, and cancellation rate."},"previous_week":{"type":"object","description":"Previous-week totals: order count and revenue."},"growth_percent":{"type":"number","format":"float","description":"Week-over-week revenue growth as a percentage."},"top_products":{"type":"array","description":"Top-selling SKUs this week, each with units sold and revenue."},"health_indicators":{"type":"object","description":"Connection health for the shop: token expiry, last import time, active listing count, and linked variant count."}}},"API_V2_Entities_PeakHourCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_PeakHour"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_PeakHourCollection model"},"API_V2_Entities_PeakHour":{"type":"object","properties":{"hour":{"type":"integer","format":"int32","example":21,"description":"Hour of the day, 0 to 23 (Singapore time)."},"hour_range":{"type":"string","example":"21:00-22:00 SGT","description":"The hour as a readable time range."},"order_count":{"type":"integer","format":"int32","description":"Number of orders placed in this hour."},"percentage_of_daily":{"type":"number","format":"float","description":"Share of the day's orders that fell in this hour, as a percentage."}}},"API_V2_Entities_HiddenWinnerCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_HiddenWinner"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_HiddenWinnerCollection model"},"API_V2_Entities_HiddenWinner":{"type":"object","properties":{"sku":{"type":"string","description":"Stock keeping unit."},"product_name":{"type":"string","description":"Name of the product."},"margin_percent":{"type":"number","format":"float","description":"Profit margin as a percentage."},"weekly_units":{"type":"integer","format":"int32","description":"Units sold in the last week."},"weekly_revenue":{"type":"number","format":"float","description":"Revenue in the last week."},"weekly_profit":{"type":"number","format":"float","description":"Profit in the last week."},"growth_percent":{"type":"number","format":"float","description":"Week-over-week sales growth as a percentage."},"current_stock":{"type":"integer","format":"int32","description":"On-hand stock quantity."},"platforms_linked":{"type":"integer","format":"int32","description":"Number of sales channels the SKU is listed on."}}},"API_V2_Entities_OutOfStockSellerCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_OutOfStockSeller"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_OutOfStockSellerCollection model"},"API_V2_Entities_OutOfStockSeller":{"type":"object","properties":{"sku":{"type":"string","description":"Stock keeping unit."},"product_name":{"type":"string","description":"Name of the product."},"total_sold":{"type":"integer","format":"int32","description":"Units sold in the period."},"total_revenue":{"type":"number","format":"float","description":"Revenue earned from the SKU in the period."},"current_stock":{"type":"integer","format":"int32","example":0,"description":"On-hand stock quantity, now at zero."},"variant_url":{"type":"string","description":"Link to the product in OneCart."}}},"API_V2_Entities_SlowMoverCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_SlowMover"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_SlowMoverCollection model"},"API_V2_Entities_SlowMover":{"type":"object","properties":{"sku":{"type":"string","description":"Stock keeping unit."},"product_name":{"type":"string","description":"Name of the product."},"current_stock":{"type":"integer","format":"int32","description":"On-hand stock quantity."},"sales_last_30_days":{"type":"integer","format":"int32","description":"Units sold in the requested `days` window (field name kept for compatibility)."},"inventory_value":{"type":"number","format":"float","description":"Value of the on-hand stock at cost."},"days_of_inventory":{"type":"integer","format":"int32","description":"Estimated days of stock left at the current sales rate. A high placeholder value when there were no recent sales."},"recommendation":{"type":"string","description":"Suggested action, such as promote or clear."}}},"API_V2_Entities_StockoutRiskCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_StockoutRisk"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_StockoutRiskCollection model"},"API_V2_Entities_StockoutRisk":{"type":"object","properties":{"sku":{"type":"string","description":"Stock keeping unit."},"product_name":{"type":"string","description":"Name of the product."},"current_stock":{"type":"integer","format":"int32","description":"On-hand stock quantity."},"reserve_qty":{"type":"integer","format":"int32","description":"Low-stock alert level (not stock held back from sale)."},"available_stock":{"type":"integer","format":"int32","description":"Stock available to sell, after reserved quantity."},"daily_velocity":{"type":"number","format":"float","description":"Average units sold per day over the recent period."},"weekly_sales":{"type":"integer","format":"int32","description":"Units sold in the last week."},"days_until_stockout":{"type":"number","format":"float","description":"Estimated days until the SKU runs out, or null when there is no recent sales velocity."},"revenue_at_risk":{"type":"number","format":"float","description":"Revenue you stand to lose if the SKU stocks out."},"linked_platforms":{"type":"array","description":"Sales channels the SKU is listed on."}}},"API_V2_Entities_DeliveryOrderEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_DeliveryOrder"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_DeliveryOrderEnvelope model"},"API_V2_Entities_DeliveryOrder":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique order ID."},"order_no":{"type":"string","description":"Order number from the sales channel."},"platform":{"type":"string","example":"Shopify","description":"Sales channel the order came from."},"shop_name":{"type":"string","description":"Name of the shop that received the order."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop that received the order."},"order_date":{"type":"string","format":"date-time","description":"When the order was placed."},"status":{"type":"string","description":"Current order status."},"first_name":{"type":"string","description":"Customer's first name."},"last_name":{"type":"string","description":"Customer's last name."},"shipping_address":{"type":"string","description":"Delivery address for the order."},"payment_details":{"type":"object","description":"Payment information for the order."},"shipping_postal_code":{"type":"string","description":"Delivery postal code."},"shipping_phone_number":{"type":"string","description":"Customer's contact phone number."},"line_items":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_DeliveryOrderLineItem"},"description":"Items to fulfill, read from the marketplace order, with bundle components expanded. Items without a SKU are included (sku null)."},"picked":{"type":"boolean","description":"Whether the order is marked picked. Request via `_fields=+picked`."}}},"API_V2_Entities_DeliveryOrderLineItem":{"type":"object","properties":{"sku":{"type":"string","description":"SKU of the item to pick."},"quantity":{"type":"integer","format":"int32","description":"Quantity ordered."},"name":{"type":"string","description":"Product name."},"is_bundle_component":{"type":"boolean","description":"Whether this row is a component of a bundle rather than a standalone item."},"bundle_sku":{"type":"string","description":"SKU of the parent bundle. Set only on bundle component rows."},"unit_price":{"type":"number","format":"float","description":"Price per unit. Set only on standalone rows, not bundle components; null until OneCart has priced the line (shortly after import) or when the item has no SKU."},"line_total":{"type":"number","format":"float","description":"Line total for this item. Set only on standalone rows, not bundle components; null when unit_price is."}}},"API_V2_Entities_DeliveryOrdersCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_DeliveryOrder"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_DeliveryOrdersCollection model"},"API_V2_Entities_LocationStockUpdateEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_LocationStockUpdateResult"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_LocationStockUpdateEnvelope model"},"API_V2_Entities_LocationStockUpdateResult":{"type":"object","properties":{"message":{"type":"string","example":"Stock update processed","description":"Confirmation that the update was processed."},"submitted_mutation":{"type":"object","description":"The stock update request that was sent to Shopify."},"successful_updates":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_LocationStockChange"},"description":"Updates that were applied successfully."},"failed_updates":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_LocationStockFailure"},"description":"Updates that could not be applied."}}},"API_V2_Entities_LocationStockChange":{"type":"object","properties":{"name":{"type":"string","description":"Name of the quantity that changed, e.g. available."},"delta":{"type":"integer","format":"int32","description":"Change applied to the on-hand quantity."},"quantityAfterChange":{"type":"integer","format":"int32","description":"On-hand quantity after the change."}}},"API_V2_Entities_LocationStockFailure":{"type":"object","properties":{"field":{"type":"string","description":"The input field the failure relates to."},"message":{"type":"string","description":"Reason the update failed."},"code":{"type":"string","description":"Machine-readable failure code."}}},"API_V2_Entities_ShopifyLocationsCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ShopifyLocation"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ShopifyLocationsCollection model"},"API_V2_Entities_ShopifyLocation":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique location ID."},"shopify_location_id":{"type":"string","description":"The location's ID on Shopify."},"shopify_location_name":{"type":"string","description":"Name of the location on Shopify."},"shop_name":{"type":"string","description":"Name of the shop the location belongs to."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop the location belongs to."},"is_default":{"type":"boolean","description":"Whether this is the shop's default location."}}},"API_V2_Entities_CategorySkusEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_CategorySkusData"},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_CategorySkusEnvelope model"},"API_V2_Entities_CategorySkusData":{"type":"object","properties":{"category_id":{"type":"integer","format":"int32","description":"ID of the category."},"category_name":{"type":"string","description":"Name of the category."},"skus":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_CategorySku"},"description":"The SKUs in the category for this page."}}},"API_V2_Entities_CategorySku":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique variant ID."},"sku":{"type":"string","description":"The SKU."},"product_id":{"type":"integer","format":"int32","description":"ID of the product the SKU belongs to."},"product_name":{"type":"string","description":"Name of the product the SKU belongs to."},"quantity":{"type":"integer","format":"int32","description":"On-hand quantity of the SKU."},"price":{"type":"number","format":"float","description":"Price of the SKU."}}},"API_V2_Entities_BuyerCategoriesCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_BuyerCategory"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_BuyerCategoriesCollection model"},"API_V2_Entities_BuyerCategory":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique category ID."},"name":{"type":"string","description":"Category name."},"sku_count":{"type":"integer","format":"int32","description":"Number of SKUs in the category."}}},"API_V2_Entities_SkuChannelsEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_SkuChannelsData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_SkuChannelsEnvelope model"},"API_V2_Entities_SkuChannelsData":{"type":"object","properties":{"skus":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_SkuChannelResult"},"description":"One result per SKU that was found."}}},"API_V2_Entities_SkuChannelResult":{"type":"object","properties":{"sku":{"type":"string","description":"The SKU that was looked up."},"variant_id":{"type":"integer","format":"int32","description":"Unique variant ID for the SKU."},"product_id":{"type":"integer","format":"int32","description":"ID of the product the SKU belongs to."},"name":{"type":"string","description":"Name of the product the SKU belongs to."},"quantity":{"type":"integer","format":"int32","description":"On-hand quantity of the SKU."},"url":{"type":"string","description":"Link to the product."},"channels":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_SkuChannelListing"},"description":"The channels the SKU is listed on."}}},"API_V2_Entities_SkuChannelListing":{"type":"object","properties":{"link_id":{"type":"integer","format":"int32","description":"ID of the channel link (this SKU on this channel). Use it with `PUT /links/{id}` to change the price on this channel only."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop the SKU is listed on."},"shop_name":{"type":"string","description":"Name of the shop the SKU is listed on."},"platform":{"type":"string","example":"Shopee","description":"Sales channel of the listing."},"listing_title":{"type":"string","description":"Title of the listing on the channel."},"listing_url":{"type":"string","description":"Link to the listing, or null if none."},"price":{"type":"number","format":"float","description":"Price of the SKU on this channel."}}},"API_V2_Entities_LinkPriceUpdateEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_LinkPriceUpdateData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_LinkPriceUpdateEnvelope model"},"API_V2_Entities_LinkPriceUpdateData":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"ID of the channel link (one SKU on one channel)."},"variant_id":{"type":"integer","format":"int32","description":"ID of the OneCart variant (SKU)."},"sku":{"type":"string","description":"The SKU."},"product_id":{"type":"integer","format":"int32","description":"ID of the parent product."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop this link belongs to."},"shop_name":{"type":"string","description":"Name of the shop."},"platform":{"type":"string","example":"Shopify","description":"Sales channel."},"listing_id":{"type":"integer","format":"int32","description":"ID of the channel listing this SKU sits on."},"listing_title":{"type":"string","description":"Title of the channel listing."},"price":{"type":"number","format":"float","description":"Price of this SKU on this channel."},"special_price":{"type":"number","format":"float","description":"Promotional price on this channel, if any."},"price_push_supported":{"type":"boolean","description":"Whether a price change can be pushed live to this channel. False for channels with no price API (e.g. RedMart): the price is stored in OneCart only."},"updated_at":{"type":"string","format":"date-time","description":"When the link was last changed."},"price_push":{"type":"string","example":"queued","description":"`queued` when the new price is being pushed to the channel, `skipped` when only stored in OneCart."}}},"API_V2_Entities_LinkEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_Link"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_LinkEnvelope model"},"API_V2_Entities_Link":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"ID of the channel link (one SKU on one channel)."},"variant_id":{"type":"integer","format":"int32","description":"ID of the OneCart variant (SKU)."},"sku":{"type":"string","description":"The SKU."},"product_id":{"type":"integer","format":"int32","description":"ID of the parent product."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop this link belongs to."},"shop_name":{"type":"string","description":"Name of the shop."},"platform":{"type":"string","example":"Shopify","description":"Sales channel."},"listing_id":{"type":"integer","format":"int32","description":"ID of the channel listing this SKU sits on."},"listing_title":{"type":"string","description":"Title of the channel listing."},"price":{"type":"number","format":"float","description":"Price of this SKU on this channel."},"special_price":{"type":"number","format":"float","description":"Promotional price on this channel, if any."},"price_push_supported":{"type":"boolean","description":"Whether a price change can be pushed live to this channel. False for channels with no price API (e.g. RedMart): the price is stored in OneCart only."},"updated_at":{"type":"string","format":"date-time","description":"When the link was last changed."}}},"API_V2_Entities_LinkBulkPriceEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_LinkBulkPriceData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_LinkBulkPriceEnvelope model"},"API_V2_Entities_LinkBulkPriceData":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_LinkBulkPriceResult"}}}},"API_V2_Entities_LinkBulkPriceResult":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"ID of the channel link, when it was resolved."},"sku":{"type":"string","description":"SKU of the row."},"shop_id":{"type":"integer","format":"int32","description":"Shop of the row."},"platform":{"type":"string","description":"Sales channel of the row."},"price":{"type":"number","format":"float","description":"The price requested."},"success":{"type":"boolean","description":"Whether this row was updated."},"price_push":{"type":"string","description":"`queued` or `skipped` on successful rows."},"error":{"type":"string","description":"Present only on failed rows."}}},"API_V2_Entities_LinksCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Link"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_LinksCollection model"},"API_V2_Entities_CoverageEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_CoverageData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_CoverageEnvelope model"},"API_V2_Entities_CoverageData":{"type":"object","properties":{"gaps":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_CoverageGap"},"description":"A sample of the SKUs with coverage gaps, capped by `limit`."},"total_with_gaps":{"type":"integer","format":"int32","description":"Total number of SKUs with a gap, before the sample limit."},"showing":{"type":"integer","format":"int32","description":"Number of gap rows returned in this sample."},"full_report_url":{"type":"string","description":"Link to the full coverage report in the app."},"shops":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_CoverageShop"},"description":"The active shops the check ran against."},"message":{"type":"string","description":"Present only when there are no active shops to check."}}},"API_V2_Entities_CoverageGap":{"type":"object","properties":{"variant_id":{"type":"integer","format":"int32","description":"Unique variant ID for the SKU."},"product_id":{"type":"integer","format":"int32","description":"ID of the product the SKU belongs to."},"sku":{"type":"string","description":"The SKU with the coverage gap."},"name":{"type":"string","description":"Name of the product the SKU belongs to."},"published_on":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_CoveragePublishedShop"},"description":"Shops the SKU is already listed on."},"missing_from":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_CoverageMissingShop"},"description":"Shops the SKU is missing from."}}},"API_V2_Entities_CoveragePublishedShop":{"type":"object","properties":{"shop_id":{"type":"integer","format":"int32","description":"ID of the shop the SKU is listed on."},"shop_name":{"type":"string","description":"Name of the shop."},"platform":{"type":"string","example":"Shopee","description":"Sales channel of the shop."},"listing_id":{"type":"integer","format":"int32","description":"ID of the existing listing. Included when you query by `skus`."}}},"API_V2_Entities_CoverageMissingShop":{"type":"object","properties":{"shop_id":{"type":"integer","format":"int32","description":"ID of the shop the SKU is missing from."},"shop_name":{"type":"string","description":"Name of the shop."},"platform":{"type":"string","example":"Lazada","description":"Sales channel of the shop."},"create_listing_url":{"type":"string","description":"Link to create the missing listing. Included when you query by `skus`."}}},"API_V2_Entities_CoverageShop":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Shop ID."},"name":{"type":"string","description":"Shop name."},"platform":{"type":"string","example":"Shopify","description":"Sales channel of the shop."}}},"API_V2_Entities_AccountHealthEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_AccountHealth"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_AccountHealthEnvelope model"},"API_V2_Entities_AccountHealth":{"type":"object","properties":{"company_id":{"type":"integer","format":"int32","description":"The company this report is for."},"generated_at":{"type":"string","format":"date-time","description":"When the report was generated (ISO 8601)."},"summary":{"type":"object","description":"setup_score 0-100 (weights: SKUs present 15, listings matched 25, orders with line items 25, line items with a variant 25, cost prices 10), status `healthy` (≥ 85) / `needs_attention` (60-84) / `incomplete` (\u003c 60), and a one-line headline."},"catalog":{"type":"object","description":"Variant/SKU counts and the share of variants with a SKU, brand, category, cost price, and selling price."},"listings":{"type":"object","description":"Listing match totals and per-shop rows (listings, matched, unmatched, pct_matched)."},"orders":{"type":"object","description":"Order line-item coverage totals and per-shop rows (orders, oldest and newest order dates)."},"line_items":{"type":"object","description":"Line-item variant fill; unmatched SKUs split into `unmatched_skus_missing_from_catalog` (add the product) and `unmatched_skus_fixable_by_rematch` (regenerate line items); `sample_missing_skus`: up to 20, most line items first."},"recommendations":{"type":"array","description":"Concrete, count-bearing next steps for the gaps found. Empty when nothing needs attention."}}},"API_V2_Entities_BundleUploadEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_BundleUpload"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_BundleUploadEnvelope model"},"API_V2_Entities_BundleUpload":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique job ID. Use it to poll the job status."},"name":{"type":"string","description":"The name you gave the job."},"status":{"type":"string","example":"complete","description":"Overall job status, e.g. processing or complete."},"error_message":{"type":"string","description":"Job-level error, or null if none."},"warning_message":{"type":"string","description":"Job-level warning, or null if none."},"created_at":{"type":"string","format":"date-time","description":"When the job was created."},"bundle_upload_items":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_BundleUploadItem"},"description":"The individual rows in the job and their results."}}},"API_V2_Entities_BundleUploadItem":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique row ID."},"status":{"type":"string","description":"Whether this row was processed successfully or failed."},"error_message":{"type":"string","description":"Reason this row failed, or null if it succeeded."},"raw_data":{"type":"object","description":"The values you submitted for this row: product code, bundle SKU, component SKU, and quantity."}}},"API_V2_Entities_ZapierAuthEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ZapierAuth"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ZapierAuthEnvelope model"},"API_V2_Entities_ZapierAuth":{"type":"object","properties":{"hi":{"type":"string","description":"The name of the company the key belongs to."},"using":{"type":"string","description":"The name of the API key used."},"created_by":{"type":"string","description":"Email of the user who created the key."}}},"API_V2_Entities_ReviewEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_Review"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ReviewEnvelope model"},"API_V2_Entities_Review":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Unique review ID. Included by default."},"platform":{"type":"string","example":"Shopee","description":"Sales channel the review was left on. Included by default."},"shop_id":{"type":"integer","format":"int32","description":"ID of the shop the review belongs to. Included by default."},"shop_name":{"type":"string","description":"Name of the shop the review belongs to. Included by default."},"rating":{"type":"integer","format":"int32","example":4,"description":"Star rating (1–5), or null if the channel did not provide one. Included by default."},"body":{"type":"string","description":"The written review text, or null for a rating-only review. Included by default."},"buyer_name":{"type":"string","description":"Display name of the buyer, as shown by the channel. Included by default."},"order_no":{"type":"string","description":"Order number the review relates to, or null. Included by default."},"status":{"type":"string","example":"unanswered","description":"`unanswered` or `replied`. Included by default."},"can_reply":{"type":"boolean","description":"Whether this specific review can be replied to from OneCart. False for rating-only reviews and reviews the marketplace will not accept a reply on. Included by default."},"platform_supports_reply":{"type":"boolean","description":"Whether the review's platform has a seller-reply API at all (false for fetch-only channels such as TikTok). Included by default."},"seller_reply":{"type":"string","description":"Your public reply, or null if not yet replied. Included by default."},"replied_at":{"type":"string","format":"date-time","description":"When the reply was sent, or null. Included by default."},"reviewed_at":{"type":"string","format":"date-time","description":"When the buyer left the review. Included by default."},"onecart_url":{"type":"string","example":"/reviews?review_id=123\u0026status=all","description":"Link to this review in the OneCart reviews inbox. Included by default."},"platform_review_id":{"type":"string","description":"The review's ID on the sales channel. Request via `_fields`."},"item_platform_id":{"type":"string","description":"The channel's ID of the reviewed item. Request via `_fields`."},"listing_id":{"type":"integer","format":"int32","description":"ID of the OneCart listing the review is for, or null. Request via `_fields`."},"link_id":{"type":"integer","format":"int32","description":"ID of the OneCart listing-SKU link the review is for, or null. Request via `_fields`."},"created_at":{"type":"string","format":"date-time","description":"When the review was first synced into OneCart. Request via `_fields`."},"updated_at":{"type":"string","format":"date-time","description":"When the review record was last updated. Request via `_fields`."}}},"API_V2_Entities_ReviewKpisEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ReviewKpis"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ReviewKpisEnvelope model"},"API_V2_Entities_ReviewKpis":{"type":"object","properties":{"needs_reply":{"type":"integer","format":"int32","description":"Reviews with a written comment and no seller reply yet."},"critical_unanswered":{"type":"integer","format":"int32","description":"Unanswered reviews rated 1–2 stars, including rating-only ones."},"avg_rating_30d":{"type":"number","format":"float","description":"Average star rating of reviews left in the last 30 days, or null if none."},"reply_rate":{"type":"integer","format":"int32","example":72,"description":"Percentage of reviews with a written comment that have a seller reply, or null if there are none."},"median_reply_hours":{"type":"number","format":"float","description":"Median hours between a review being left and your reply, or null if nothing has been replied to."}}},"API_V2_Entities_ReviewsCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Review"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ReviewsCollection model"},"API_V2_Entities_BackfillEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_BackfillData"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_BackfillEnvelope model"},"API_V2_Entities_BackfillData":{"type":"object","properties":{"enqueued":{"type":"boolean","description":"Whether a background job was queued. false only when there was nothing to run (e.g. no connected channel carries brand data)."},"backfill":{"type":"string","description":"Which backfill: brands, buyer_categories, link_order_history or all."},"platforms":{"type":"object","description":"Connected channels the brand/category backfill reads from."},"steps":{"type":"array","items":{"type":"string"},"description":"/all only: the steps run, in order."},"unlinked_line_items":{"type":"integer","format":"int32","description":"Order lines with no product link at the time of the call (link_order_history and all)."},"message":{"type":"string","description":"Human-readable summary suitable to relay to the user."}}},"API_V2_Entities_CrossPostPublishEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_CrossPostPublishResult"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_CrossPostPublishEnvelope model"},"API_V2_Entities_CrossPostPublishResult":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"The cross-post batch ID."},"status":{"type":"string","description":"The batch status after publishing."},"queued":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_CrossPostListing"},"description":"Listings queued to publish."},"blocked":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_CrossPostListing"},"description":"Listings not published, with the reason."}}},"API_V2_Entities_CrossPostListing":{"type":"object","properties":{"copy_listing_id":{"type":"integer","format":"int32","description":"The listing ID (null for a shop skipped before a listing was built)."},"shop_id":{"type":"integer","format":"int32","description":"The destination shop."},"platform":{"type":"string","description":"The destination platform, e.g. Lazada."},"status":{"type":"string","description":"pending_prepare, ready_for_review, prepare_failed, pending, success, failed, or skipped."},"ai_prepared":{"type":"boolean","description":"Whether OneCart AI built this draft."},"blocking_reason":{"type":"string","description":"Why the listing cannot publish yet (e.g. a required size chart), or null."},"failure":{"type":"object","description":"Only on a `failed` or `prepare_failed` listing: `{cause, action, raw, retryable}`, the plain-English cause and next step the app shows. `raw` is the platform's own message (null when `cause` already is it); `retryable` is true when Retry AI prepare can fix it without leaving OneCart."},"listing_url":{"type":"string","description":"The live marketplace listing URL, once published."},"draft":{"type":"object","description":"The reviewable draft (title, price, category, info, pending actions)."}}},"API_V2_Entities_CrossPostDraftEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_CrossPostDraft"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_CrossPostDraftEnvelope model"},"API_V2_Entities_CrossPostDraft":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"status":{"type":"string"},"copy_listings":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_CrossPostDraftListing"}}}},"API_V2_Entities_CrossPostDraftListing":{"type":"object","properties":{"copy_listing_id":{"type":"integer","format":"int32"},"shop_id":{"type":"integer","format":"int32"},"platform":{"type":"string"},"status":{"type":"string"},"draft":{"type":"object","description":"Compact draft summary."},"platform_data":{"type":"object","description":"The full destination payload publish will send."}}},"API_V2_Entities_CrossPostEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_CrossPost"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_CrossPostEnvelope model"},"API_V2_Entities_CrossPost":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"The cross-post batch ID."},"status":{"type":"string","description":"creating, preparing, awaiting_review, some failed, or finished."},"created_at":{"type":"string","format":"date-time"},"total_selected":{"type":"integer","format":"int32","description":"How many destination shops were requested."},"source_type":{"type":"string","description":"The source kind: \"import\" (an imported listing) or \"product\" (an Item Master product)."},"source_id":{"type":"integer","format":"int32","description":"The source Import id or Product id, matching source_type."},"copy_listings":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_CrossPostListing"}}}},"API_V2_Entities_AiEnhanceEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_AiEnhance"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_AiEnhanceEnvelope model"},"API_V2_Entities_AiEnhance":{"type":"object","properties":{"field_type":{"type":"string","description":"title or description."},"original":{"type":"string","description":"The text you submitted."},"enhanced":{"type":"string","description":"The AI-improved text (not saved)."}}},"API_V2_Entities_PickupTimingsEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_PickupTimings"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_PickupTimingsEnvelope model"},"API_V2_Entities_PickupTimings":{"type":"object","properties":{"provider_id":{"type":"integer","format":"int32"},"platform":{"type":"string","example":"SPX"},"dates":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_PickupDate"}}}},"API_V2_Entities_PickupDate":{"type":"object","properties":{"date":{"type":"string","example":"2026-10-06","description":"Pass as `pickup_date` when booking."},"pickup_time":{"type":"integer","format":"int32","description":"Unix timestamp (seconds) of the pickup day, as the provider gives it."},"slots":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_PickupSlot"}}}},"API_V2_Entities_PickupSlot":{"type":"object","properties":{"pickup_time_id":{"type":"integer","format":"int32","example":1,"description":"Pass as `pickup_time_id` when booking."},"pickup_time_range":{"type":"string","example":"09:00:00","description":"The slot as the provider names it."}}},"API_V2_Entities_LogisticsProvidersEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_LogisticsProvider"}},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_LogisticsProvidersEnvelope model"},"API_V2_Entities_LogisticsProvider":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Pass as `provider_id` when booking."},"name":{"type":"string"},"platform":{"type":"string","example":"SPX","description":"`SPX` or `SingPost`."},"active":{"type":"boolean"},"delivery_methods":{"type":"array","items":{"type":"string"},"example":["pickup"],"description":"How parcels can leave you. Pickup only today."},"can_cancel":{"type":"boolean","description":"Whether `POST /shipments/{id}/cancel` works for this provider (SPX yes, SingPost no)."},"pickup_addresses":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ProviderPickupAddress"},"description":"Your pickup addresses (Settings, shipping addresses). The same list for every provider."}}},"API_V2_Entities_ProviderPickupAddress":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"Pass as `pickup_address_id` when booking."},"name":{"type":"string","description":"Sender name printed on the label."},"address":{"type":"string"},"postal_code":{"type":"string"},"phone":{"type":"string"}}},"API_V2_Entities_ShipmentEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_Shipment"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ShipmentEnvelope model"},"API_V2_Entities_Shipment":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"order_id":{"type":"integer","format":"int32"},"order_no":{"type":"string"},"order_platform":{"type":"string","example":"Shopify"},"provider_id":{"type":"integer","format":"int32"},"provider_platform":{"type":"string","example":"SPX"},"tracking_number":{"type":"string"},"tracking_link":{"type":"string","description":"Provider tracking page (SPX). Null for SingPost."},"status":{"type":"string","example":"created","description":"`created` or `cancelled`."},"pickup_date":{"type":"string","example":"2026-10-06"},"whole_order":{"type":"boolean","description":"True when booked for the whole order (no item breakdown)."},"line_items":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ShipmentLineItem"},"description":"Items in this parcel. Empty for a whole-order shipment."},"label_url":{"type":"string","description":"API path for this parcel's label."},"created_at":{"type":"string","format":"date-time"},"store_update":{"$ref":"#/definitions/API_V2_Entities_StoreUpdate","description":"Only on the booking response: what OneCart writes back to the sales channel."}}},"API_V2_Entities_ShipmentLineItem":{"type":"object","properties":{"ref":{"type":"string"},"sku":{"type":"string"},"name":{"type":"string"},"qty":{"type":"integer","format":"int32"}}},"API_V2_Entities_StoreUpdate":{"type":"object","properties":{"platform":{"type":"string","example":"Shopify"},"status":{"type":"string","example":"queued","description":"`queued`: the tracking number is being written to the store in the background (usually within seconds). `none`: this platform is not updated (Magento)."},"scope":{"type":"string","example":"line_items","description":"`line_items`: Shopify fulfils only this parcel's items. `whole_order`: the whole order is fulfilled (WooCommerce always; Shopify when booked by `order_ids`)."},"message":{"type":"string"}}},"API_V2_Entities_ShipmentLabelEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ShipmentLabel"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ShipmentLabelEnvelope model"},"API_V2_Entities_ShipmentLabel":{"type":"object","properties":{"shipment_id":{"type":"integer","format":"int32"},"tracking_number":{"type":"string"},"format":{"type":"string","example":"url","description":"`url` (the provider's hosted PDF) or `pdf` (`pdf_base64` holds the file)."},"url":{"type":"string","description":"format=url: the provider's label PDF. SPX links carry a short-lived access token, so fetch it soon."},"pdf_base64":{"type":"string","description":"format=pdf: the label PDF, base64-encoded."},"filename":{"type":"string"}}},"API_V2_Entities_ShipmentBookingEnvelope":{"type":"object","properties":{"data":{"$ref":"#/definitions/API_V2_Entities_ShipmentBooking"},"meta":{"type":"object"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ShipmentBookingEnvelope model"},"API_V2_Entities_ShipmentBooking":{"type":"object","properties":{"status":{"type":"string","example":"booked","description":"`booked` (every parcel) or `partially_booked` (see `failed_parcels`)."},"provider_id":{"type":"integer","format":"int32"},"platform":{"type":"string","example":"SPX"},"shipments":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Shipment"},"description":"One per booked parcel, each with its own tracking number."},"failed_parcels":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_FailedParcel"}}}},"API_V2_Entities_FailedParcel":{"type":"object","properties":{"order_id":{"type":"integer","format":"int32"},"parcel_no":{"type":"integer","format":"int32","description":"Position of the parcel within its order (1, 2, ...)."},"reference":{"type":"string","description":"The reference OneCart sent the provider."},"message":{"type":"string","description":"The provider's reason."}}},"API_V2_Entities_ShipmentsCollection":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_Shipment"}},"meta":{"$ref":"#/definitions/API_V2_Entities_PaginationMeta"},"links":{"$ref":"#/definitions/API_V2_Entities_Links"},"errors":{"type":"array"},"warnings":{"type":"array"}},"description":"API_V2_Entities_ShipmentsCollection model"}}}