{"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\nKeys come in two access levels:\n\n- **Full access** — read and write.\n- **Read-only** — `GET` requests only. Any write returns `403 FORBIDDEN`.\n\nA missing or invalid key returns `401 UNAUTHORIZED`.\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, such as deprecations. Usually empty.\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## 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. Mixing a bare list with `+`/`-`\nadjustments in the same request returns a `400`.\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\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| `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 key whose access scope is \"readonly\" may call GET endpoints only."}},"security":[{"api_key":[]}],"host":"app.getonecart.com","tags":[{"name":"Products","description":"Manage product variants (SKUs) and their stock levels."},{"name":"Listings","description":"Your product listings on each connected sales channel."},{"name":"Orders","description":"Retrieve, update, cancel, and fulfill orders."},{"name":"Delivery Orders","description":"Orders that are paid and awaiting fulfillment."},{"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":"Bundle Uploads","description":"Bulk-create product bundles from a list."},{"name":"Insights","description":"Sales, inventory, and performance analytics."},{"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":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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":{"get":{"summary":"List shops","description":"Returns every connected shop across all your sales channels, most recent first, including its platform and connection status. Use `page` and `per_page` to page through the list, and `_fields` to select which fields you receive.","produces":["application/json"],"parameters":[{"in":"query","name":"_fields","description":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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":"Mark an order shipped","description":"Marks an order as shipped and fulfills it on its sales channel, then returns the order. Fulfillment runs in the background, so the returned status may not reflect the change straight away. Set `mark_as_shipped` to `true` to trigger it.","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":"Set to `true` to mark the order as shipped.","type":"boolean","default":true,"required":true}],"responses":{"200":{"description":"Mark an order shipped","schema":{"$ref":"#/definitions/API_V2_Entities_Order"}},"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":["Orders"],"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":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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/print_awbs":{"post":{"summary":"Print shipping labels","description":"Generates air waybills (shipping labels) for a batch of orders, grouped by shop and platform. Lazada returns a download URL, Shopee returns Base64-encoded PDF data, and TikTok returns a download URL per package along with its tracking number.","produces":["application/json"],"consumes":["application/json"],"parameters":[{"in":"formData","name":"order_ids","description":"The OneCart IDs of the orders to print labels for.","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.","type":"boolean","default":false,"required":false},{"in":"formData","name":"document_type","description":"TikTok only. `SHIPPING_LABEL` 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"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"404":{"description":"One or more orders not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Orders"],"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":["Orders"],"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":["Orders"],"operationId":"putApiV2OrdersIdCancel"}},"/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":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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":["Orders"],"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":"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":"Return orders with this status, matched case-insensitively against the order status. Accepts one status or a comma-separated list (`pending,shipped`). Common values include `pending`, `ready_to_ship`, `shipped`, `completed`, and `cancelled`; the exact values vary by sales channel.","type":"string","required":false},{"in":"query","name":"_fields","description":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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/variants":{"post":{"summary":"Create products","description":"Creates one or more variants (SKUs) in your catalog. Pass a single variant's fields directly, or an array of `variants` to create several at once. Each variant must belong to a product, identified by `product_id` or `product_sku`; when only a SKU is given, a new product is created.","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[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":"Quantity to hold back as reserved stock.","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":"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":"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":"Quantity to hold back as reserved stock (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":"_fields","description":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","type":"string","required":false}],"responses":{"201":{"description":"Create products","schema":{"$ref":"#/definitions/API_V2_Entities_Variant"}},"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":"Duplicate SKU or validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"postApiV2Variants"},"get":{"summary":"List products","description":"Returns your product variants (SKUs) with their stock levels, newest first. Filter by `sku`, `sku_list`, or product `name`, and page through results with `page` and `per_page`.","produces":["application/json"],"parameters":[{"in":"query","name":"sku","description":"Return variants whose SKU contains this text.","type":"string","required":false},{"in":"formData","name":"sku_list","description":"Return variants matching any SKU in this list.","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":"_fields","description":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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_VariantsCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"getApiV2Variants"}},"/api/v2/variants/{id}":{"put":{"summary":"Update stock","description":"Sets a single variant on-hand quantity and syncs it to your connected channels. Bundle SKUs cannot be set directly, since their stock is derived from their components. Leave `update_quantity` as `true` to recalculate and push the new level.","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":"The new on-hand quantity for the variant.","type":"integer","format":"int32","required":true},{"in":"formData","name":"update_quantity","description":"Set to `true` to recalculate the variant and its product quantity and push the change to channels.","type":"boolean","default":true,"required":false},{"in":"formData","name":"_fields","description":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","type":"string","required":false}],"responses":{"200":{"description":"Update stock","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 not found","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Bundle quantity cannot be updated directly","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"putApiV2VariantsId"}},"/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":["Products"],"operationId":"postApiV2VariantsForcePush"}},"/api/v2/variants/bulk_update":{"put":{"summary":"Update stock in bulk","description":"Sets the on-hand quantity for multiple variants in one request and syncs the new levels to your connected channels. Each variant succeeds or fails on its own; bundle SKUs are rejected because their stock is derived from their components.","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":"The new on-hand quantity for the variant.","type":"array","required":true,"items":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Update stock in bulk","schema":{"$ref":"#/definitions/API_V2_Entities_BulkUpdateEnvelope"}},"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":["Products"],"operationId":"putApiV2VariantsBulkUpdate"}},"/api/v2/variants/count":{"get":{"summary":"Count products","description":"Returns the total number of variants in your catalog. 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 products","schema":{"$ref":"#/definitions/API_V2_Entities_CountEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Products"],"operationId":"getApiV2VariantsCount"}},"/api/v2/listings/{id}":{"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":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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}/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":{"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":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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. Use it to see which sales channels are pulling their weight. Set `exclude_inactive` to false to include shops with no orders.","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","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":"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":{"get":{"summary":"List delivery orders","description":"Returns your unshipped orders across every connected sales channel, newest first — the queue of orders waiting to be fulfilled. Each row includes the customer, shipping address, and line items (with bundle components expanded). Filter by `platform`, `shop_id`, or `status`, and page through results with `page` and `per_page`.","produces":["application/json"],"parameters":[{"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":"status","description":"Return only orders with this status.","type":"string","required":false},{"in":"query","name":"_fields","description":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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 delivery orders","schema":{"$ref":"#/definitions/API_V2_Entities_DeliveryOrdersCollection"}},"400":{"description":"Validation error","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}}},"tags":["Delivery Orders"],"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":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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/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/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":"Choose which fields to return. Omit for the resource's default fields. Pass a comma-separated list (`id,order_no,status`) to return exactly those fields (`id` is always included). Or adjust the defaults with `+`/`-` prefixes (`+order_items,-tracking_no`). Mixing a bare list with `+`/`-` prefixes returns a 400. Unknown field names are ignored.","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":"Submits a batch of bundle definitions to create in one job. Give the job a `name` and a `bundles` array, where each entry sets the parent product SKU (`product_code`), maps a bundle SKU to one of its component SKUs, and gives the quantity of that component. The job is processed in the background and returns immediately with its ID and status; poll that ID to track progress. Requires a full-access API key.","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"}},"401":{"description":"Unauthorized","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"403":{"description":"Read-only key","schema":{"$ref":"#/definitions/API_V2_Entities_ErrorEnvelope"}},"422":{"description":"Validation error","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"}}},"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."},"details":{"type":"array","items":{"$ref":"#/definitions/API_V2_Entities_ErrorDetail"}},"request_id":{"type":"string","description":"Matches the X-Request-Id response header."}}},"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."}}},"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_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_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."}}},"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."},"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_PrintAwbsResult":{"type":"object","properties":{"print_jobs":{"type":"object","description":"One entry per shop, each containing that shop's generated shipping labels."}},"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_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_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":"Quantity 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. Request via `_fields`."}},"description":"API_V2_Entities_Variant 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_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_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`."}},"description":"API_V2_Entities_Listing model"},"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."},"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_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 versus single-item orders."}}},"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."},"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."}}},"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 last 30 days."},"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":"Quantity 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_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_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, with bundle components expanded."}}},"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."},"line_total":{"type":"number","format":"float","description":"Line total for this item. Set only on standalone rows, not bundle components."}}},"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":{"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_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_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."}}}}}