# Open API > The Pancake POS REST API: read and write a shop's orders, products, inventory, customers and reports from your own systems with an API key. --- Source: https://pos.pancake.ph/developers/api/overview.md # Introduction The Open API lets your systems (ERP, website, accounting software, internal tools) read and write a shop's data on Pancake POS: orders, products, stock, customers, purchases, exports, promotions and reports. ## API address Every endpoint lives under: ```text https://pos.pages.fm/api/v1 ``` Paths in these docs are relative to that address: `GET /shops/{SHOP_ID}/orders` means `https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders`. `{SHOP_ID}` is the shop's numeric ID. ## Your first request 1. Create an API key as described in [Authentication](/developers/api/en/authentication). 2. List the shops the key can access, with their IDs: ```bash curl "https://pos.pages.fm/api/v1/shops?api_key=API_KEY" ``` 3. Get a shop's 20 most recent orders: ```bash curl "https://pos.pages.fm/api/v1/shops/SHOP_ID/orders?api_key=API_KEY&page_size=20&page_number=1" ``` 4. Create an order by sending JSON in the request body: ```bash curl -X POST "https://pos.pages.fm/api/v1/shops/SHOP_ID/orders?api_key=API_KEY" \ -H "Content-Type: application/json" \ -d '{"bill_full_name": "Jane Doe", "bill_phone_number": "0912345678", "items": [{"variation_id": "VARIATION_ID", "quantity": 1}]}' ``` The fields of each endpoint are in the reference, for example [Orders](/developers/api/en/order). ## Data format - Requests and responses are JSON (`Content-Type: application/json`), UTF-8 encoded. - Responses carry `success` (`true` or `false`); data usually sits in `data`. Each endpoint documents its exact shape. - Times use ISO 8601 in UTC, for example `2026-01-15T03:20:00`. - Array query parameters repeat the name with `[]`: `filter_status[]=1&filter_status[]=2`. ## Pagination List endpoints take `page_size` together with `page_number` or `page` (see each endpoint's parameters) and return: | Field | Meaning | |---|---| | `data` | Records on this page | | `page_number` | Current page, starting at 1 | | `page_size` | Records per page | | `total_entries` | Total number of records | | `total_pages` | Total number of pages | Read a whole list by increasing `page_number` up to `total_pages`. For periodic syncs, read only what changed instead of everything. For orders: `updateStatus=updated_at` with `startDateTime` and `endDateTime` (unix timestamps). ## Reading the reference - Endpoints are grouped by business area in the sidebar: Shop, Sales, Products & inventory, Customers & promotions, Finance, Reports & ads. - Each endpoint lists its parameters, request body, responses by HTTP status and a `curl` example. Expand an attribute to see its children. - Shared objects (orders, products, webhook payloads…) are in [Data models](/developers/api/en/schemas). - Every page has a Markdown version; [llms.txt](/developers/api/llms.txt) helps AI tools read the right docs. ## Related - [POS Apps](/developers/apps/en) call this same Open API from inside POS, with an app token issued by POS instead of an API key. - [MCP](/developers/mcp/en) lets Claude, Codex and Cursor use the Open API through plain-language requests. --- Source: https://pos.pancake.ph/developers/api/authentication.md # Authentication Every request sends an API key in the `api_key` query parameter: ```bash curl "https://pos.pages.fm/api/v1/shops/SHOP_ID/orders?api_key=API_KEY" ``` ## Two kinds of API key | | Shop API key | Account API key | |---|---|---| | Created in | **Settings › Apps › Webhook/API**, **API Key** tab | **Account › API Key** | | Works for | One shop | Every shop the account belongs to | | Permissions | Full Open API access to the shop | The account's own permissions in each shop: role, warehouses, department, work hours, allowed IPs | | Key format | Random string | Starts with `pos_user_` | | Best for | Background integrations between two systems (ERP, website) | Tools acting on behalf of one person: personal scripts, [MCP](/developers/mcp/en) | Both kinds call the same endpoints. An account key is rejected (`403`) for actions the account is not allowed to do. ## Shop API key 1. Open **Settings › Apps** and choose **Webhook/API**. 2. Open the **API Key** tab and click **Add**. Note what the key is for so it is easy to manage. 3. Copy the key and store it somewhere safe on your server. Delete a key in the same list when you no longer need it; systems using it are rejected immediately. ## Account API key 1. Open the **Account** page, **API Key** section, and click **Create**. 2. Name it after its purpose (for example "Claude" or "Daily report"). 3. The key is shown **only once** after creation: copy it right away. One key works for every shop you belong to: - Call `GET /shops` to see which shops the key can access; every other endpoint needs `{SHOP_ID}` in the path. - Leaving a shop or having your permissions changed takes effect on the key immediately. - Rename or revoke the key in the same list. An API key cannot create or revoke other API keys. ## Keep keys safe - An API key is as powerful as a password: never ship it in browser or mobile app code, never commit it to git, never send it in chat. - Call the Open API from your server and read the key from an environment variable or a secret store. - If a key may have leaked, delete or revoke it at once and create a new one. - 20 wrong `api_key` attempts within a minute from the same IP address lock that address for 5 minutes (`429`, code `109`, with a `Retry-After` header). ## In POS Apps Apps running inside POS do not use API keys: POS issues an app token for the person using the app. See [POS Apps › Data access](/developers/apps/en/data-access). --- Source: https://pos.pancake.ph/developers/api/errors.md # Errors & limits ## HTTP status codes | Code | Meaning | What to do | |---|---|---| | `200` | Success | | | `400` | Bad request: missing parameter or wrong data type | Fix the request using `message` | | `403` | Wrong API key, or not allowed to perform this action | Check the key and permissions; do not retry unchanged | | `404` | Shop or record not found | Check the IDs in the path | | `422` | Data fails business validation | Fix the data using `message` | | `429` | Rate limit reached (code `106`) or too many wrong keys (code `109`) | Wait, then retry (see below) | | `500`, `502`, `503`, `504` | Server error or temporary overload | Retry later with increasing waits | ## Error body Errors return JSON with `success: false`: ```json { "success": false, "message": "You have reached the limit of requests", "error_code": 106 } ``` | Field | Meaning | |---|---| | `success` | Always `false` for errors | | `message` | Human-readable description; wording may change over time | | `error_code` | Numeric error code, when provided. Handle errors in code with this field, not with `message` | | `error` | Stable error name, when provided | | `message_code` | POS business message code, when provided | | `permission` | The missing permission when access is denied, when provided | Common error codes: | `error_code` | HTTP | Meaning | |---|---|---| | `105` | 403 | Invalid `api_key` | | `106` | 429 | Rate limit reached | | `109` | 429 | Too many wrong `api_key` attempts, locked for 5 minutes | ## Rate limits Limits apply per endpoint (record IDs in the path do not count separately) and per: - **Shop API key**: shop. All keys of the same shop share the quota. - **Account API key**: account + shop. | Request type | Limit | |---|---| | Reads (`GET`) | Under 30 requests per second | | Writes (`POST`, `PUT`, `DELETE`) | Under 100 requests per second | | `GET /shops/{SHOP_ID}/inventory_histories` | 3 requests per second | Going over returns `429` with `error_code` `106`. ## Retries - `429` and `5xx`: wait and retry with increasing delays (for example 1, 2, 4, 8 seconds) and stop after a few attempts. Honour the `Retry-After` header when present. - Other `4xx`: fix the request; sending it again unchanged fails again. - A write (`POST`) that failed with a network error or timeout: check whether the record was created before sending it again, to avoid duplicates. - Large syncs: run sequentially or with few parallel workers, and prefer a large `page_size` over many small requests. --- Source: https://pos.pancake.ph/developers/api/webhooks.md # Receiving webhooks Webhooks push data to your server as soon as a record changes, instead of polling the Open API. ## Configuration Configure webhooks in **Settings › Apps › Webhook/API**, **Webhook URL** tab, or through the [Webhook configuration](/developers/api/en/webhook) API: | Setting | Meaning | |---|---| | Webhook URL | Your public `https://` address, required | | Error email | Receives an email when a delivery fails | | Headers | Headers sent with every request, for example a secret your server checks to verify the sender | | Data types | One or more of the types below | ## Data types | Type | Sent when | Payload | |---|---|---| | `orders` | An order is created or updated | [WebhookOrderResponse](/developers/api/en/schemas#webhookorderresponse) | | `customers` | A customer is created or updated | [WebhookCustomerResponse](/developers/api/en/schemas#webhookcustomerresponse) | | `products` | A product is created or updated | [WebhookProductResponse](/developers/api/en/schemas#webhookproductresponse) | | `variations_warehouses` | A variation's stock changes | [WebhookInventoryResponse](/developers/api/en/schemas#webhookinventoryresponse) | | `auto_call` | An automated call ends | [WebhookAutoCallResponse](/developers/api/en/schemas#webhookautocallresponse) | ## Receiving webhooks POS sends a `POST` with a JSON body and your configured headers. Your server should: - Return a `2xx` status within 30 seconds. Any other status or a timeout counts as a failure. - Do heavy work (calling other systems, writing many tables) on a separate queue and return `2xx` first. - Check the secret header you configured so it only accepts requests from POS. - Accept the same record more than once (after retries or rapid successive changes): use the record ID and update time to skip stale versions. ## Retries on failure - When the first delivery fails: POS emails the error address (if set), retries after 10 minutes, then again 30 minutes later, then stops. - When your server keeps failing: POS pauses deliveries to avoid piling up load, then resumes once your server responds normally. - When the URL is invalid: POS turns the shop's webhook off. Fix the URL and turn it back on. To recover data missed while your server was down, read it back through the Open API filtered by update time (see [Pagination](/developers/api/en#pagination)). --- Source: https://pos.pancake.ph/developers/api/shop.md # Shop > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Shop information `GET /shops` Get shop information ### Responses - `200` Success (object) ```json { "shops": [ { "avatar_url": "https://statics.pancake.vn/user-content-dev2.pancake.vn/2022/7/6/8678250807b2285e2752ac2cbbf43925f19a677c.jpeg", "name": "Shop thời trang", "id": 6036602, "link_post_marketer": [ { "ad_account_id": null, "id": "949f1396-f6fa-45d9-93b6-4c37503a9950", "inserted_at": "2025-08-21T03:02:04", "marketer": "cee3c05e-5f85-43c4-b27e-889b99c50097", "multiple_post": [], "multiple_source": [ { "account": "2284322048329488", "key": "-1", "page_id": "2284322048329488" } ], "shop_id": 6036602, "type": "source" } ], "pages": [ { "id": "104438181227821", "name": "Quần áo", "platform": "facebook", "settings": { "auto_create_order": true }, "shop_id": 20 } ] } ], "success": true } ``` ## Get shop `GET /shops/{SHOP_ID}` Get one shop the caller belongs to, in the same shape as an item of the shop list. With a shop API key, the key's account needs the shop configuration permission. ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "shop": { "id": 20, "name": "Shop thời trang", "avatar_url": "https://statics.pancake.vn/user-content-dev2.pancake.vn/2022/7/6/8678250807b2285e2752ac2cbbf43925f19a677c.jpeg", "currency": "VND", "preferred_shop": null, "link_post_marketer": [], "pages": [ { "id": "104438181227821", "name": "Quần áo", "platform": "facebook", "settings": { "auto_create_order": true }, "shop_id": 20 } ] } } ``` --- Source: https://pos.pancake.ph/developers/api/employee.md # Employee > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Employee list `GET /shops/{SHOP_ID}/users` Get list of employees ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "department": { "id": 933, "name": "Sales" }, "shop_id": 7, "user_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "user": { "email": "2042723249341651@facebook.com", "fb_id": "2042723249341651", "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "name": "Hoang Anh", "phone_number": null }, "sale_group": { "id": 30, "name": "Ca sáng" } } ] } ``` --- Source: https://pos.pancake.ph/developers/api/address.md # Address > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of provinces and cities `GET /geo/provinces` Get list of provinces and cities ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `country_code` | query | string | yes | Country code (for example, Vietnam country code is 84) | | `is_new` | query | boolean | | New province (for country Viet Nam) | | `all` | query | boolean | | All provinces including old and new (for country Viet Nam) | ### Responses - `200` Success (object) ```json { "data": [ { "id": "101", "name": "Hà Nội", "name_en": "ha noi", "new_id": "84_VN101" }, { "id": "701", "name": "Hồ Chí Minh", "name_en": "ho chi minh", "new_id": "84_VN129" } ] } ``` ## List of districts `GET /geo/districts` Get list of districts ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `province_id` | query | string | yes | Province ID of districts you want to retrieve. Get province ID in api GET /geo/provinces | ### Responses - `200` Success (object) ```json { "data": [ { "id": "10101", "name": "Quận Ba Đình", "name_en": "ba dinh", "province_id": "101" } ] } ``` ## List of communes `GET /geo/communes` Get list of communes ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `district_id` | query | string | yes | District ID of communes you want to retrieve. Get district ID in api GET /geo/districts | | `province_id` | query | string | yes | Province ID of communes you want to retrieve. Get province ID in api GET /geo/provinces | ### Responses - `200` Success (object) ```json { "data": [ { "district_id": "10101", "id": "1010115", "name": "Phường Cống Vị", "name_en": "cong vi", "new_id": null, "postcode": null, "province_id": "101" } ] } ``` --- Source: https://pos.pancake.ph/developers/api/webhook.md # Webhook > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Webhook configuration `PUT /shops/{SHOP_ID}` Configure webhook settings. Go to **Setting -> Advance -> Third-party connection -> Webhook/API** to configure: - Webhook URL (Required) - Email error message - Request Headers - Webhook types: `orders`, `customers`, `products`, `variations_warehouses`, or `auto_call` ## Webhook Response Types When webhook is enabled, the system sends POST requests to the configured URL. Response schema: - **`orders`**: See [WebhookOrderResponse](#model/WebhookOrderResponse) schema - **`customers`**: See [WebhookCustomerResponse](#model/WebhookCustomerResponse) schema - **`products`**: See [WebhookProductResponse](#model/WebhookProductResponse) schema - **`variations_warehouses`**: See [WebhookInventoryResponse](#model/WebhookInventoryResponse) schema - **`auto_call`**: See [WebhookAutoCallResponse](#model/WebhookAutoCallResponse) schema ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing information to update - `shop` (object, required): - `webhook_enable` (boolean): Enable/Disable Webhook - `webhook_url` (string (uri)): Link URL - `webhook_email` (string (email)): Error message email - `webhook_types` (string[]): Webhook data - `webhook_partner` (string): Partner - `webhook_headers` (object): Webhook headers ```json { "shop": { "webhook_enable": true, "webhook_url": "https://test.com", "webhook_email": "1234@gmail.com", "webhook_types": [ "orders", "customers", "variations_warehouses" ], "webhook_partner": "", "webhook_headers": { "X-API-KEY": "elqsF9ERiFWGacWQO9Gg5XC4kXojot" } } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` --- Source: https://pos.pancake.ph/developers/api/order.md # Order > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of orders `GET /shops/{SHOP_ID}/orders` Get list of orders. Get information of specific order ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page_size` | query | integer | | Page size | | `page_number` | query | integer | | Page number | | `search` | query | string | | Phone number, name of customer, note, .... | | `filter_status[]` | query | integer[] | | Order status | | `include_removed` | query | integer | | Include removed orders | | `updateStatus` | query | string | | Filter orders by time Values: `inserted_at` Order creation time, `updated_at` Last update time, `partner_inserted_at` Time sent to courier, `paid_at` Reconciliation time, `estimate_delivery_date` Estimate delivery time, `picked_up_at` Courier picked up at, `first_delivery_at` First delivery at, `transfer_proof` Transfer proof, `time_assign_seller` Time assign seller, `time_assign_care` Time assign care, `time_assign_marketer` Time assign marketer, `-1` Last status update, `0` New, `11` Restocking, `20` Purchased, `1` Confirmed, `12` Wait for printing, `13` Printed, `8` Packaging, `9` Waiting for pick up, `2` Shipped, `3` Received, `16` Collected money, `4` Returning, `15` Partial return, `5` Returned. | | `startDateTime` | query | integer (int64) | | Start date (unix timestamp) | | `endDateTime` | query | integer (int64) | | End date (unix timestamp) | | `option_sort` | query | string | | Orders sequence Values: `inserted_at_desc` Order creation time gradually decreases, `inserted_at_asc` Order creation time gradually increases, `last_updated_order_desc` Last updated order gradually decreases, `last_updated_order_asc` Last updated order gradually increases, `last_update_status_at_desc` Last update status at gradually decreases, `last_update_status_at_asc` Last update status at gradually increases, `order_valuation_desc` Order value gradually decreases, `order_valuation_asc` Order value gradually increases, `product_quantity_desc` Product quantity gradually decreases, `product_quantity_asc` Product quantity gradually increases, `product_name_desc` Product name gradually decreases, `product_name_asc` Product name gradually increases, `sub_status_sort_desc` Delivery delay update gradually decreases, `sub_status_sort_asc` Delivery delay update gradually increases, `first_undeliverable_at_desc` First undeliverable at gradually decreases, `first_undeliverable_at_asc` First undeliverable at gradually increases, `customer_sort_desc` Customer name gradually decreases, `customer_sort_asc` Customer name gradually increases, `estimate_delivery_date_desc` Estimate delivery date gradually decreases, `estimate_delivery_date_asc` Estimate delivery date gradually increases, `order_source_desc` Order source gradually decreases, `order_source_asc` Order source gradually increases. | | `fields[]` | query | string[] | | Response fields | | `partner_id[]` | query | integer[] | | Shipping partner ID on Pancake system | | `shop_partner_account` | query | integer | | Filter by shipping account ID connected to the shop | | `customer_id` | query | string | | Customer ID | | `order_sources[]` | query | string[][] | | Order sources. Format: [[order_source_id, account_id], ...] Example: [["-1", "314"], ["-3"]] | | `is_filter_exclude_source` | query | boolean | | Exclude order source | | `ad_ids[]` | query | string[] | | Advertising IDs | | `project_ids` | query | integer | | Project ID | | `extra_fields[]` | query | string[] | | Extra fields | ### Responses - `200` Success (object) ```json { "data": [ { "id": 1418, "system_id": 1, "shop_id": 4, "inserted_at": "2020-05-12T04:51:42", "updated_at": "2020-05-12T04:51:54", "status": 0, "status_name": "new", "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "bill_email": "customer@example.com", "conversation_id": "117967746266487_9306266852780716", "page_id": "256469571178082", "post_id": "185187094667903_477083092110915", "ad_id": "23851252560290199", "shipping_fee": 0, "cod": 0, "cash": 0, "account": 1, "total_discount": 0, "note": "", "note_print": null, "received_at_shop": false, "is_free_shipping": false, "is_locked": false, "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "items": [], "partner": { "partner_id": 1, "cod": 0, "extend_code": "S58824.MB25.C3.500020713", "total_fee": 0, "updated_at": "2020-05-12T05:18:16", "delivery_name": null, "delivery_tel": null, "picked_up_at": null, "sort_code": null, "paid_at": null, "system_created": true, "partner_status": "request_received", "partner_name": "Shopee Xpress", "first_delivery_at": null, "first_undeliverable_at": "2025-06-30T06:41:44", "count_of_delivery": 1, "order_number_vtp": null, "printed_form": null, "extend_update": [ { "key": "status", "status": "delivered", "tracking_id": "S58824.MB25.C3.500020713", "note": "", "update_at": "2020-05-12T05:18:16", "webhook_params": null } ] }, "shipping_address": { "full_name": "Hoang Anh", "phone_number": "0999999999", "address": "90 Cầu Giấy", "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội", "province_id": "101", "district_id": "10113", "commune_id": "1011309" }, "additional_info": { "service_partner": "instant" }, "invoice_info_list": [ { "error": "", "invoice_detail": { "company_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình", "company_address_breakdown": { "company_additional_info": "", "company_barangay": "", "company_city": "", "company_detailed_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình", "company_district": "Phường Nam Định", "company_full_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình", "company_postcode": "", "company_province": "", "company_region": "VietNam", "company_state": "Ninh Bình", "company_town": "Phường Nam Định" }, "company_email": "acb@gmail.com", "company_name": "Công ty cổ phần tư vấn xây dựng điện Hoàng Phát", "company_tax_id": "0601043840" }, "invoice_type": "company", "is_requested": true, "order_sn": "251121BVGU6RVE" } ], "reports_by_phone": { "+639175706297": { "order_fail": 29, "order_success": 20, "warning": 0 } }, "p_utm_source": "fb", "p_utm_medium": "paid", "p_utm_campaign": "120236828168640593", "p_utm_term": "120236828168790593", "p_utm_content": "120236828168960593", "link": "https://www.myfahathai.com/doc?fbclid=IwZXh0bgNhZW0BMABhZGlkAasqwhnoX" } ], "page_number": 1, "page_size": 100, "success": true, "total_entries": 1418, "total_pages": 15 } ``` ## Create order `POST /shops/{SHOP_ID}/orders` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Order information to create - `id` (integer): Order ID - `system_id` (integer): System ID - `shop_id` (integer, required): Shop ID - `inserted_at` (string (date-time)): Order creation time - `updated_at` (string (date-time)): Order update time - `status` (integer): Order status Values: `0` New, `17` Waiting for confirmation, `11` Restocking, `12` Wait for printing, `13` Printed, `20` Purchased, `1` Confirmed, `8` Packaging, `9` Waiting for pick up, `2` Shipped, `3` Received, `16` Collected money, `4` Returning, `15` Partial return, `5` Returned, `6` Canceled, `7` Deleted recently. - `status_name` (string): Order status name - `bill_full_name` (string): Customer name - `bill_phone_number` (string): Phone number of customer - `bill_email` (string): Customer email - `conversation_id` (string): Conversation ID - `page_id` (string): Facebook page ID - `post_id` (string): Post ID - `ad_id` (string): Ad ID - `shipping_fee` (integer): Shipping fee - `partner_fee` (integer): Fee from shipping partner - `fee_marketplace` (integer): Fees from e-commerce platforms - `customer_pay_fee` (boolean): Customer pay shipping fee - `is_free_shipping` (boolean): Free shipping - `is_livestream` (boolean): Is livestream order - `is_live_shopping` (boolean): Is live shopping order - `is_smc` (boolean): Shopping on Messenger - `received_at_shop` (boolean): true: Sales at counter, false: Sell online - `total_discount` (integer): Discount total - `note` (string): Internal note - `note_print` (string): Note for printing - `returned_reason` (integer): Return reason code (1: Customer, 2: Staff, 3: Defective product, 4: Shipping carrier, 5: Exchange). Other values are shop-defined custom reasons, see returned_reason_name for the display name - `returned_reason_name` (string): Return reason name - `sub_status` (integer): Reason for delivery delay - `warehouse_id` (string): Warehouse ID - `warehouse_info` (object): Warehouse information - `name` (string): Warehouse name - `phone_number` (string): Warehouse phone number - `full_address` (string): Warehouse full address - `address` (string): Warehouse address - `province_id` (string): Province ID - `district_id` (string): District ID - `commune_id` (string): Commune ID - `affiliate_id` (string): Affiliate ID - `ffm_id` (string): FFM ID - `has_snappy_service` (boolean): Has Snappy service - `custom_id` (string): Custom ID - `creator_id` (string): Creator ID - `creator` (object): Order creator - `id` (string): Creator ID - `fb_id` (string): Facebook ID of creator - `name` (string): Creator name - `avatar_url` (string): Creator avatar URL - `items` (object[]): Product list - `product_id` (string): Product ID - `quantity` (integer, required): Quantity - `returned_count` (integer): Returned count - `assigning_seller_id` (string): Assigning seller ID - `quantity_by_combo_products` (object[]): Quantity by combo products - `discount_each_product` (integer): Discount for each product - `is_bonus_product` (boolean): Is bonus product - `is_discount_percent` (boolean): Is discount by percent - `is_wholesale` (boolean): Is wholesale - `is_composite` (boolean): Is composite product - `one_time_product` (boolean): One time product - `note` (string): Product note - `note_product` (string): Product note - `inserted_at` (string (date-time)): Inserted at - `measure_group_id` (integer): Measure group ID - `variation_info` (object): Variation information. Optional when creating/updating an order (the backend defaults it to an empty object if omitted). Its inner fields are not individually required, but sending `retail_price` is recommended so the line price is correct. - `components` (object[]): Product components - `variation_id` (string, required): Variation ID (SKU of the variation can also be used) - `partner` (object): Partner information When updating an order that already has shipping info, only the fields you send are written; omitted fields keep their current values. Send `null` to clear `partner_id`, `extend_code` or `shop_partner_id`. - `partner_id` (integer): Partner ID - `cod` (integer): Reconciliation COD - `extend_code` (string): Shipping order ID on partner system - `total_fee` (integer): Total fee - `updated_at` (string (date-time)): Updated at - `delivery_name` (string): Shipper name - `delivery_tel` (string): Delivery phone - `picked_up_at` (string (date-time)): Picked up at - `sort_code` (string): Sort code - `paid_at` (string (date-time)): Paid at - `system_created` (boolean): System created - `extend_update` (object[]): Update from courier - `partner_status` (string): Partner shipping status Values: `waiting` Waiting for processing, `request_received` Carrier received the request, `processing_picked_up` Processing pickup, `picking_up` Picking up, `delay_pickup` Delayed pickup, `picked_up` Picked up, `waiting_on_the_way` Waiting for transit, `on_the_way` In transit, `contact_delivery_company` Contact the carrier, `out_for_delivery` Out for delivery, `delay_delivery` Delayed delivery, `inform_recipient` Notify the recipient, `undeliverable` Undeliverable, `waiting_for_return` Waiting for return, `delivered` Delivered, `delivered_cod` Delivered, COD reconciled, `returning` Returning, `returned` Returned, `returned_cod` Returned, COD reconciled, `canceled` Canceled. - `partner_name` (string): Partner name - `first_delivery_at` (string (date-time)): First delivery time - `first_undeliverable_at` (string (date-time)): First failed delivery time - `count_of_delivery` (integer): Number of delivery attempts. Courier updates add 1 each time the shipment moves to `out_for_delivery` or `delay_delivery`. Can be set when creating or updating an order (integer 0-32767); omitted or invalid values keep the current value, and later courier updates keep counting from the value you set. - `order_number_vtp` (string): Viettel Post tracking number - `printed_form` (object): Printed form - `shipping_address` (ShippingAddress): - `address` (string): Street address. When creating an order via API, if `address` is provided but `province_id` is left empty, the system automatically parses this free-text address to fill in `province_id`, `district_id` and `commune_id`. Auto-fill is skipped when the parsed location is in Thailand (country code 66) or when no commune can be resolved from the text. - `commnue_name` (string): Commune name - `commune_id` (string): Commune ID - `country_code` (string): Country code - `district_id` (string): District ID - `district_name` (string): District name - `full_address` (string): Full address - `full_name` (string): Full name - `new_full_address` (string): New full address - `new_province_id` (string): New province ID - `phone_number` (string): Phone number - `post_code` (string): Post code - `province_id` (string): Province ID - `province_name` (string): Province name - `render_type` (string): Render type - `payment_purchase_histories` (object[]): Payment histories - `amount` (integer): Amount of money - `type` (string): Payment type - `inserted_at` (string (date-time)): Transaction time - `result_code` (string): Result code - `ipn_reply` (boolean): IPN reply - `voucher_amount` (integer): Voucher amount - `tags` (string[]): Tags - `tags` (object[]): Tags list - `id` (integer): Tag ID - `name` (string): Tag name - `marketer` (object): Marketer information - `id` (string): Marketer ID - `name` (string): Marketer name - `email` (string): Marketer email - `phone_number` (string): Marketer phone number - `fb_id` (string): Marketer Facebook ID - `avatar_url` (string): Marketer avatar URL - `pke_mkter` (string): Marketer ID - `activated_combo_products` (object): Activated combo products information - `combo_product_id` (integer): Combo product ID - `quantity_combo_activated` (integer): Quantity combo activated - `combo_product_info` (object): Combo product information - `activated_promotion_advances` (object[]): Activated promotion advances information - `id` (integer): ID - `promotion_advance_id` (string): Promotion advance ID - `promotion_advance_info` (object): Promotion advance information - `invoice_info_list` (object[]): Invoice information list - `error` (string): Error message if any - `invoice_detail` (object): Invoice detail information. The fields to send depend on `invoice_type`: - `company`: use `company_name`, `company_tax_id`, `company_address`, `company_email` (and optionally `company_address_breakdown`). - `personal`: use `name`, `phone_number`, `identity_code`, `tax_id`, `email`. - `invoice_type` (string): Invoice type: `company` for an organization, `personal` for an individual. Determines which `invoice_detail` fields are used. Values: `company`, `personal`. - `is_requested` (boolean): Customer requests an e-invoice for this order. Set `true` together with `invoice_type` and `invoice_detail` to request invoice issuance. - `order_sn` (string): Order code on the marketplace - `reports_by_phone` (object): Reports by phone number - `order_fail` (integer): Number of failed orders - `order_success` (integer): Number of successful orders - `warning` (integer): Number of warnings orders - `tracking_link` (string): Link confirm order - `payment_link` (string): Payment link - `ads_source` (string): Advertising source - `bank_payments` (object): Payment method - `transfer_proofs` (object[]): Bank transfer payment proofs, including verification time, amount and receipt images - `id` (integer): Transfer proof ID - `order_id` (integer): Order ID - `shop_id` (integer): Shop ID - `payment_id` (string): Bank payment method ID (matches a key in `bank_payments`) - `amount` (integer): Transferred amount - `images` (string[]): Transfer receipt images - `note` (string): Note - `is_income` (boolean): Money received (true) or paid out (false) - `is_verify` (boolean): Whether the transfer has been verified - `verify_at` (string (date-time)): Verification time - `verifier` (object): Verifier information - `creator` (object): Creator information - `last_editor` (object): Last editor information - `order_info` (object): Additional order information - `inserted_at` (string (date-time)): Transfer proof creation time - `updated_at` (string (date-time)): Transfer proof update time - `shopify_order_id` (string): Shopify order ID - `shopify_abandon_checkout_id` (integer): Shopify abandon checkout ID - `is_abandoned_order` (boolean): Abandoned-cart flag for creating or updating an order. Send it directly in the request body, not inside `third_party` or `third_party_infomation`. An explicit value, including `false`, takes precedence over automatic detection. If omitted on creation, the flag is determined automatically; if omitted on update, the current value is preserved. Only boolean `true` or string `"true"` is normalized to `true`; all other submitted values become `false`. - `cod` (integer): Cash on delivery - `cash` (integer): Cash payment - `account` (integer): Order source ID - `account_name` (string): Order source name - `advanced_platform_fee` (object): Fees from e-commerce platforms - `ads_top_up` (integer): Ads wallet top-up - `affiliate_commission` (integer): Affiliate commission - `diff_shipping_fee` (integer): Difference shipping fee - `marketplace_voucher` (integer): Marketplace voucher - `payment_fee` (integer): Payment fee - `platform_commission` (integer): Platform commission - `seller_transaction_fee` (integer): Seller transaction fee - `service_fee` (integer): Service fee - `sfp_service_fee` (integer): SFP service fee - `printing_count` (integer): Printing count - `money_to_collect` (integer): Money to collect - `marketplace_id` (string): Marketplace ID Values: `-2`, `-3`, `-4`, `-9`, `-16`, `-17`, `-20`, `-25`, `-27`, `-28`. - `total_price` (integer): Total price - `shop_customer_address_id` (string): Customer address ID - `customer` (object): Customer information - `fb_id` (string): Customer Facebook ID - `id` (string): Customer ID - `name` (string): Customer name - `page_id` (string): Page ID - `total_quantity` (integer): Total quantity - `time_assign_marketer` (string (date-time)): Time assign marketer - `p_utm_source` (string): UTM Source - `p_utm_medium` (string): UTM Medium - `p_utm_campaign` (string): UTM Campaign - `p_utm_term` (string): UTM Term - `p_utm_content` (string): UTM Content - `p_utm_id` (string): UTM ID - `utm_affiliate` (string): Affiliate - `link` (string): Link - `status_history` (object[]): Status update history - `avatar_url` (string): Avatar URL - `editor` (object): Editor information - `editor_fb` (string): Editor Facebook ID - `editor_id` (string): Editor ID - `name` (string): Name - `old_status` (integer): Old status - `status` (integer): Status - `updated_at` (string (date-time)): Updated at - `duplicated_phone` (boolean): Duplicated phone - `order_currency` (string): Order currency - `charged_by_vnpay` (integer): Charged by VNPay - `charged_by_qrpay` (integer): Charged by QRPay - `custom_id` (string): Custom ID - `last_editor` (object): Last editor information - `id` (string): Editor ID - `fb_id` (string): Facebook ID of editor - `name` (string): Editor name - `email` (string): Editor email - `avatar_url` (string): Editor avatar URL - `phone_number` (string): Editor phone number - `last_editor_id` (string): Last editor ID - `charged_by_momo` (integer): Charged by MoMo - `prepaid_by_point` (object): Prepaid by point - `money` (integer): Money amount - `point` (integer): Point amount - `bank_transfer_images` (string (uri)[]): Bank transfer images - `transfer_money` (integer): Transfer money - `lock_order_by_user` (string): Lock order by user ID - `assigning_care` (object): Assigning care information - `id` (string): Care ID - `fb_id` (string): Facebook ID of care - `name` (string): Care name - `email` (string): Care email - `avatar_url` (string): Care avatar URL - `phone_number` (string): Care phone number - `assigning_care_id` (string): Assigning care ID - `time_assign_care` (string (date-time)): Time assign care - `assigning_seller` (object): Assigning seller information - `id` (string): Seller ID - `fb_id` (string): Facebook ID of seller - `name` (string): Seller name - `email` (string): Seller email - `avatar_url` (string): Seller avatar URL - `phone_number` (string): Seller phone number - `einvoices` (EInvoice[]): - `actual_shipping_fee` (integer): Shipping fee - `adjust_amount` (integer): Percentage reduction on revenue - `adjustment_criteria` (integer): Adjustment criteria Values: `1` Quantity adjustment, `2` Price adjustment, `3` Tax rate adjustment, `4` Tax amount adjustment. - `adjustment_type` (integer): Adjustment type Values: `1` Increase adjustment, `2` Decrease adjustment, `3` Information. - `allocation_discounts` (object[]): Allocation discounts - `allocation_type` (integer): Allocation type Values: `1` By unit price, `2` custom. - `bank_account_number` (string): Bank account number - `bank_name` (string): Bank name - `budget_unit_code` (string): Budget unit code - `buyer_not_get_invoice` (boolean): Buyer not get invoice - `creator` (object): Creator information - `discount` (integer): General discount amount - `display_id` (integer): Display ID - `einvoice_account_id` (integer): E-invoice account ID - `email` (string): Email address - `full_name` (string): Buyer's name - `id` (integer): Invoice ID - `identity_code` (string): Buyer's identity code - `included_tax` (integer): Included tax - `invoice_no` (string): Invoice number - `invoice_series` (string): Invoice series - `invoice_type` (integer): Invoice type - `is_adjust_amount` (boolean): Is adjust amount - `is_included_tax` (boolean): Is included tax - `items` (object[]): Invoice items - `key_search` (string): Key search - `last_editor_id` (string): Last editor ID - `note` (string): Note - `order_id` (integer): Order ID - `order_info` (object): Order information - `original_einvoice` (object): Original e-invoice ID - `payment_method` (string): Payment method - `phone_number` (string): Phone number - `purchaser_tax_code` (string): Purchaser tax code - `purchaser_unit` (string): Purchaser unit - `release_date` (string (date-time)): Release date - `release_type` (integer): Release type - `shipping_address` (ShippingAddress): - `shipping_fee` (integer): Shipping fee - `shop_id` (integer): Shop ID - `signature_type` (integer): Signature type - `status` (integer): Status Values: `0` Not released, `1` Pending release, `2` Released, `3` Canceled, `4` Replacement invoice, `5` Replaced invoice, `6` Adjustment invoice, `7` Adjusted. - `tax` (integer): Tax rate - `template_code` (string): Template code - `total_amount` (integer): Total amount - `verification_code` (string): Tax Authority Code - `voucher_book` (object): Voucher book - `charged_by_card` (integer): Charged by card - `estimate_delivery_date` (string (date-time)): Estimate delivery date - `order_sources` (string): Order sources ID - `charged_by_fundiin` (integer): Charged by Fundiin - `surcharge` (integer): Surcharge - `is_linked_partner` (boolean): Is linked partner - `call_laters` (object[]): Call laters - `last_update_status_at` (string (date-time)): Last update status at - `discount_by_customer_level` (integer): Discount by customer level - `viewing` (object[]): Viewing - `additional_info` (object): Additional info - `service_partner` (string): Service partner Values: `instant` Instant. - `delivery_deadline` (string (date-time)): Delivery deadline (ISO8601, no timezone). - `ship_by_date` (integer): Marketplace ship-by deadline (Unix timestamp, seconds) for Shopee/TikTok orders — the order must be handed over to the carrier before this time, otherwise the marketplace may cancel it automatically. Shopee `ship_by_date`, TikTok `collection_due_time`. `0` = the marketplace has not returned it yet; `null` for non-marketplace orders. - `order_returned_ids` (string): Order returned IDs - `cost_surcharge` (integer): Cost surcharge - `time_send_partner` (string (date-time)): Time send partner - `charged_by_kredivo` (integer): Charged by Kredivo - `discount` (integer): Discount - `histories` (object[]): Histories - `duplicated_customer` (boolean): Duplicated customer - `customer_referral_code` (object): Customer referral code - `active` (string): Active status - `customer_id` (string (uuid)): Customer ID - `discount` (string): Discount value - `format` (string): Referral code format - `free_products_priced_between_approx` (object): Free products priced between approximately - `is_percent` (string): Discount is percentage - `only_customers_with_level_will_have_referral_code` (string): Only customers with level will have referral code - `referral_code` (string): Referral code - `reward_points_for_old_customers` (object): Reward points for customers - `shop_customer_id` (string (uuid)): Shop customer ID - `tax` (integer): Tax - `is_from_ecommerce` (boolean): Is from e-commerce - `note_image` (string (uri)[]): Note images - `shopify_draft_order_id` (string): Shopify draft order ID - `display_id` (integer): Display ID - `shop_partner_id` (integer): Shop partner ID - `is_locked` (boolean): Order lock - `merge_order` (boolean): Allows merging orders ```json { "is_abandoned_order": true, "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "conversation_id": "117967746266487_9306266852780716", "is_free_shipping": false, "received_at_shop": false, "page_id": "256469571178082", "account": 4, "account_name": "facebook321", "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6", "items": [ { "discount_each_product": 0, "is_bonus_product": false, "is_discount_percent": false, "is_wholesale": false, "one_time_product": false, "quantity": 1, "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "variation_info": { "detail": null, "fields": null, "display_id": null, "name": "aaaaaa", "product_display_id": null, "retail_price": 100000, "weight": 100 } } ], "note": "", "note_print": null, "merge_order": false, "returned_reason": 1, "warehouse_id": "630744ef-4614-4a70-988c-52e6d78c953c", "shipping_address": { "address": "aaaaa", "commune_id": "2210941", "country_code": null, "district_id": "22109", "full_address": "aaaaa, Xã Bắc Lý, Huyện Hiệp Hòa, Bắc Giang", "full_name": "hoang anh", "phone_number": "0999999999", "post_code": null, "province_id": "221" }, "shipping_fee": 0, "shop_id": 4, "total_discount": 0, "warehouse_info": { "district_id": "10111", "full_address": "kakakaka, Phường Khương Trung, Quận Thanh Xuân, Hà Nội", "name": "snappy", "phone_number": "0999999999", "province_id": "101" }, "custom_id": "Ma0001", "activated_promotion_advances": [ { "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121", "is_activated": true } ], "invoice_info_list": [ { "invoice_type": "personal", "is_requested": true, "invoice_detail": { "name": "Hoang Anh", "phone_number": "0934283743", "identity_code": "029374382740", "tax_id": "", "email": "" } } ], "status": 0, "cash": 0 } ``` ### Responses - `200` Success (object) ```json { "id": 1418, "system_id": 1, "shop_id": 4, "inserted_at": "2020-05-12T04:51:42", "updated_at": "2020-05-12T04:51:54", "status": 0, "status_name": "new", "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "bill_email": "customer@example.com", "page_id": "256469571178082", "post_id": "185187094667903_477083092110915", "ad_id": "23851252560290199", "shipping_fee": 0, "cod": 0, "cash": 0, "account": 1, "total_discount": 0, "note": "", "note_print": null, "received_at_shop": false, "is_free_shipping": false, "is_locked": false, "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "items": [], "partner": { "partner_id": 1, "cod": 0, "extend_code": "S58824.MB25.C3.500020713", "total_fee": 0, "updated_at": "2020-05-12T05:18:16" }, "shipping_address": { "full_name": "Hoang Anh", "phone_number": "0999999999", "address": "90 Cầu Giấy", "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội", "province_id": "101", "district_id": "10113", "commune_id": "1011309" } } ``` ## Get order information `GET /shops/{SHOP_ID}/orders/{ORDER_ID}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `ORDER_ID` | path | string | yes | Order ID | ### Responses - `200` Success (object) ```json { "id": 1, "system_id": 1, "shop_id": 1, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "status": 1, "status_name": "Đã xác nhận", "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "bill_email": "hoang@example.com", "page_id": "104438181227821", "post_id": "185187094667903_477083092110915", "ad_id": "23851252560290199", "shipping_fee": 1, "partner_fee": 1, "fee_marketplace": 1, "customer_pay_fee": true, "is_free_shipping": true, "is_livestream": true, "is_live_shopping": true, "is_smc": true, "received_at_shop": true, "total_discount": 1, "note": "", "note_print": null, "returned_reason": 1, "returned_reason_name": "Do khách hàng", "sub_status": 1, "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "warehouse_info": { "name": "kho test ecod", "phone_number": "0999999999", "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu", "address": "hâhhha", "province_id": "717", "district_id": "71705", "commune_id": "7170510", "affiliate_id": null, "ffm_id": null, "has_snappy_service": true, "custom_id": null }, "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "items": [ { "id": 1, "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "quantity": 1, "returned_count": 1, "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6", "quantity_by_combo_products": [], "discount_each_product": 1, "is_bonus_product": true, "is_discount_percent": true, "is_wholesale": true, "is_composite": true, "one_time_product": true, "note": "", "note_product": "", "inserted_at": "2024-01-01T00:00:00Z", "measure_group_id": 1, "variation_info": { "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "name": "Ao so mi nam", "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "retail_price": 140000, "detail": "", "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "fields": [ { "id": "field-id-1", "name": "Màu", "value": "Trắng", "keyValue": "Màu" } ], "barcode": "BARCODE123", "brand_id": null, "category_ids": [ 1290021044 ], "display_id": "13109", "product_display_id": "a131092025", "is_upsale_product": true, "last_imported_price": 30000, "weight": 0, "measure_info": { "measure_id": 1, "exchange_value": 1 }, "avg_price": 30000 }, "components": [ { "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "quantity": 1, "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7" } ] } ], "partner": { "partner_id": 1, "cod": 0, "extend_code": "S58824.MB25.C3.500020713", "total_fee": 0, "updated_at": "2020-05-12T05:18:16", "delivery_name": null, "delivery_tel": null, "picked_up_at": null, "sort_code": null, "paid_at": null, "system_created": true, "partner_status": "request_received", "partner_name": "Shopee Xpress", "first_delivery_at": null, "first_undeliverable_at": "2025-06-30T06:41:44", "count_of_delivery": 1, "order_number_vtp": null, "printed_form": null, "extend_update": [ { "key": "status", "status": "delivered", "tracking_id": "S58824.MB25.C3.500020713", "note": "", "update_at": "2020-05-12T05:18:16" } ] }, "shipping_address": { "full_name": "Hoang Anh", "phone_number": "0999999999", "address": "90 Cầu Giấy", "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội", "province_id": "101", "district_id": "10113", "commune_id": "1011309", "commnue_name": "Phường Dịch Vọng", "district_name": "Quận Cầu Giấy", "province_name": "Hà Nội", "country_code": "84", "post_code": null }, "payment_purchase_histories": [ { "amount": 1800000, "type": "cash", "inserted_at": "2024-01-01T00:00:00Z", "result_code": "00", "ipn_reply": true, "voucher_amount": 0, "tags": [ "payment" ] } ], "tags": [ { "id": 75, "name": "thẻ 4" } ], "marketer": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Marketer Name", "email": "marketer@example.com", "phone_number": "0999999999", "fb_id": "2042723249341651", "avatar_url": null }, "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097", "activated_combo_products": { "combo_product_id": 1, "quantity_combo_activated": 1 }, "activated_promotion_advances": [ { "id": 1, "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121" } ], "tracking_link": "https://tracking.example.com", "payment_link": "https://payment.example.com", "ads_source": null, "shopify_order_id": null, "shopify_abandon_checkout_id": 1, "is_abandoned_order": true, "cod": 0, "cash": 0, "account": 1, "account_name": "facebook321", "advanced_platform_fee": { "ads_top_up": 1, "affiliate_commission": 1, "diff_shipping_fee": 1, "marketplace_voucher": 1, "payment_fee": 1, "platform_commission": 1, "seller_transaction_fee": 1, "service_fee": 1, "sfp_service_fee": 1 }, "printing_count": 1, "marketplace_id": "-3", "money_to_collect": 1, "total_price": 1, "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857", "customer": { "fb_id": null, "id": "96a8e283-3fba-492e-a35a-970f72a30a02", "name": "Trần Văn Hoàng", "page_id": "104438181227821" }, "total_quantity": 1, "time_assign_marketer": "2024-01-01T00:00:00Z", "status_history": [ { "avatar_url": null, "editor_fb": "2042723249341651", "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "name": "Hoang Anh", "old_status": 0, "status": 1, "updated_at": "2024-01-01T00:00:00Z" } ], "duplicated_phone": true, "order_currency": "VND", "charged_by_vnpay": 1, "charged_by_qrpay": 1, "custom_id": null, "last_editor": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "email": "hoang@example.com", "avatar_url": null, "phone_number": "0999999999" }, "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "charged_by_momo": 1, "bank_transfer_images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "transfer_money": 1, "transfer_proofs": [ { "id": 1, "order_id": 1, "shop_id": 1, "payment_id": "64e130e4-012a-45b1-bd88-51811f23ead8", "amount": 1, "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "note": null, "is_income": true, "is_verify": true, "verify_at": "2024-01-01T00:00:00Z", "verifier": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "last_editor": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "order_info": null, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ], "lock_order_by_user": null, "assigning_care": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "fb_id": "2042723249341651", "name": "Care Name", "email": "care@example.com", "avatar_url": null, "phone_number": "0999999999" }, "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "time_assign_care": "2024-01-01T00:00:00Z", "assigning_seller": { "id": "340644fc-314d-450e-a45f-33343678cab6", "fb_id": "2042723249341651", "name": "Seller Name", "email": "seller@example.com", "avatar_url": null, "phone_number": "0999999999" }, "einvoices": [], "charged_by_card": 1, "estimate_delivery_date": "2024-01-01T00:00:00Z", "order_sources": "-1", "charged_by_fundiin": 1, "surcharge": 1, "is_linked_partner": true, "call_laters": [], "last_update_status_at": "2024-01-01T00:00:00Z", "discount_by_customer_level": 1, "viewing": [], "order_returned_ids": null, "cost_surcharge": 1, "time_send_partner": "2024-01-01T00:00:00Z", "charged_by_kredivo": 1, "discount": 1, "histories": [], "duplicated_customer": true, "tax": 1, "is_from_ecommerce": true, "note_image": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "shopify_draft_order_id": null, "display_id": 1, "shop_partner_id": 1, "is_locked": true, "additional_info": { "service_partner": "instant" }, "invoice_info_list": [ { "error": "", "invoice_detail": { "company_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình", "company_address_breakdown": { "company_additional_info": "", "company_barangay": "", "company_city": "", "company_detailed_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình", "company_district": "Phường Nam Định", "company_full_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình", "company_postcode": "", "company_province": "", "company_region": "VietNam", "company_state": "Ninh Bình", "company_town": "Phường Nam Định", "company_email": "acb@gmail.com", "company_name": "Công ty cổ phần tư vấn xây dựng điện Hoàng Phát", "company_tax_id": "0601043840" } }, "invoice_type": "company", "is_requested": true, "order_sn": "251121BVGU6RVE" } ], "reports_by_phone": { "+639175706297": { "order_fail": 29, "order_success": 20, "warning": 0 } }, "p_utm_source": "fb", "p_utm_medium": "paid", "p_utm_campaign": "120236828168640593", "p_utm_term": "120236828168790593", "p_utm_content": "120236828168960593", "link": "https://www.myfahathai.com/doc?fbclid=IwZXh0bgNhZW0BMABhZGlkAasqwhnoX" } ``` ## Update order `PUT /shops/{SHOP_ID}/orders/{ORDER_ID}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `ORDER_ID` | path | string | yes | Order ID | ### Request body Order information to update - `id` (integer): Order ID - `system_id` (integer): System ID - `shop_id` (integer): Shop ID - `inserted_at` (string (date-time)): Order creation time - `updated_at` (string (date-time)): Order update time - `status` (integer): Order status Values: `0` New, `17` Waiting for confirmation, `11` Restocking, `12` Wait for printing, `13` Printed, `20` Purchased, `1` Confirmed, `8` Packaging, `9` Waiting for pick up, `2` Shipped, `3` Received, `16` Collected money, `4` Returning, `15` Partial return, `5` Returned, `6` Canceled, `7` Deleted recently. - `status_name` (string): Order status name - `bill_full_name` (string): Customer name - `bill_phone_number` (string): Phone number of customer - `bill_email` (string): Customer email - `conversation_id` (string): Conversation ID - `page_id` (string): Facebook page ID - `post_id` (string): Post ID - `ad_id` (string): Ad ID - `shipping_fee` (integer): Shipping fee - `partner_fee` (integer): Fee from shipping partner - `fee_marketplace` (integer): Fees from e-commerce platforms - `customer_pay_fee` (boolean): Customer pay shipping fee - `is_free_shipping` (boolean): Free shipping - `is_livestream` (boolean): Is livestream order - `is_live_shopping` (boolean): Is live shopping order - `is_smc` (boolean): Shopping on Messenger - `received_at_shop` (boolean): true: Sales at counter, false: Sell online - `total_discount` (integer): Discount total - `note` (string): Internal note - `note_print` (string): Note for printing - `returned_reason` (integer): Return reason code (1: Customer, 2: Staff, 3: Defective product, 4: Shipping carrier, 5: Exchange). Other values are shop-defined custom reasons, see returned_reason_name for the display name - `returned_reason_name` (string): Return reason name - `sub_status` (integer): Reason for delivery delay - `warehouse_id` (string): Warehouse ID - `warehouse_info` (object): Warehouse information - `name` (string): Warehouse name - `phone_number` (string): Warehouse phone number - `full_address` (string): Warehouse full address - `address` (string): Warehouse address - `province_id` (string): Province ID - `district_id` (string): District ID - `commune_id` (string): Commune ID - `affiliate_id` (string): Affiliate ID - `ffm_id` (string): FFM ID - `has_snappy_service` (boolean): Has Snappy service - `custom_id` (string): Custom ID - `creator_id` (string): Creator ID - `creator` (object): Order creator - `id` (string): Creator ID - `fb_id` (string): Facebook ID of creator - `name` (string): Creator name - `avatar_url` (string): Creator avatar URL - `items` (object[]): Product list - `product_id` (string): Product ID - `quantity` (integer, required): Quantity - `returned_count` (integer): Returned count - `assigning_seller_id` (string): Assigning seller ID - `quantity_by_combo_products` (object[]): Quantity by combo products - `discount_each_product` (integer): Discount for each product - `is_bonus_product` (boolean): Is bonus product - `is_discount_percent` (boolean): Is discount by percent - `is_wholesale` (boolean): Is wholesale - `is_composite` (boolean): Is composite product - `one_time_product` (boolean): One time product - `note` (string): Product note - `note_product` (string): Product note - `inserted_at` (string (date-time)): Inserted at - `measure_group_id` (integer): Measure group ID - `variation_info` (object): Variation information. Optional when creating/updating an order (the backend defaults it to an empty object if omitted). Its inner fields are not individually required, but sending `retail_price` is recommended so the line price is correct. - `components` (object[]): Product components - `variation_id` (string, required): Variation ID - `partner` (object): Partner information When updating an order that already has shipping info, only the fields you send are written; omitted fields keep their current values. Send `null` to clear `partner_id`, `extend_code` or `shop_partner_id`. - `partner_id` (integer): Partner ID - `cod` (integer): Reconciliation COD - `extend_code` (string): Shipping order ID on partner system - `total_fee` (integer): Total fee - `updated_at` (string (date-time)): Updated at - `delivery_name` (string): Shipper name - `delivery_tel` (string): Delivery phone - `picked_up_at` (string (date-time)): Picked up at - `sort_code` (string): Sort code - `paid_at` (string (date-time)): Paid at - `system_created` (boolean): System created - `extend_update` (object[]): Update from courier - `partner_status` (string): Partner shipping status Values: `waiting` Waiting for processing, `request_received` Carrier received the request, `processing_picked_up` Processing pickup, `picking_up` Picking up, `delay_pickup` Delayed pickup, `picked_up` Picked up, `waiting_on_the_way` Waiting for transit, `on_the_way` In transit, `contact_delivery_company` Contact the carrier, `out_for_delivery` Out for delivery, `delay_delivery` Delayed delivery, `inform_recipient` Notify the recipient, `undeliverable` Undeliverable, `waiting_for_return` Waiting for return, `delivered` Delivered, `delivered_cod` Delivered, COD reconciled, `returning` Returning, `returned` Returned, `returned_cod` Returned, COD reconciled, `canceled` Canceled. - `partner_name` (string): Partner name - `first_delivery_at` (string (date-time)): First delivery time - `first_undeliverable_at` (string (date-time)): First failed delivery time - `count_of_delivery` (integer): Number of delivery attempts. Courier updates add 1 each time the shipment moves to `out_for_delivery` or `delay_delivery`. Can be set when creating or updating an order (integer 0-32767); omitted or invalid values keep the current value, and later courier updates keep counting from the value you set. - `order_number_vtp` (string): Viettel Post tracking number - `printed_form` (object): Printed form - `shipping_address` (ShippingAddress): - `address` (string): Street address. When creating an order via API, if `address` is provided but `province_id` is left empty, the system automatically parses this free-text address to fill in `province_id`, `district_id` and `commune_id`. Auto-fill is skipped when the parsed location is in Thailand (country code 66) or when no commune can be resolved from the text. - `commnue_name` (string): Commune name - `commune_id` (string): Commune ID - `country_code` (string): Country code - `district_id` (string): District ID - `district_name` (string): District name - `full_address` (string): Full address - `full_name` (string): Full name - `new_full_address` (string): New full address - `new_province_id` (string): New province ID - `phone_number` (string): Phone number - `post_code` (string): Post code - `province_id` (string): Province ID - `province_name` (string): Province name - `render_type` (string): Render type - `payment_purchase_histories` (object[]): Payment histories - `amount` (integer): Amount of money - `type` (string): Payment type - `inserted_at` (string (date-time)): Transaction time - `result_code` (string): Result code - `ipn_reply` (boolean): IPN reply - `voucher_amount` (integer): Voucher amount - `tags` (string[]): Tags - `tags` (object[]): Tags list - `id` (integer): Tag ID - `name` (string): Tag name - `marketer` (object): Marketer information - `id` (string): Marketer ID - `name` (string): Marketer name - `email` (string): Marketer email - `phone_number` (string): Marketer phone number - `fb_id` (string): Marketer Facebook ID - `avatar_url` (string): Marketer avatar URL - `pke_mkter` (string): Marketer ID - `activated_combo_products` (object): Activated combo products information - `combo_product_id` (integer): Combo product ID - `quantity_combo_activated` (integer): Quantity combo activated - `combo_product_info` (object): Combo product information - `activated_promotion_advances` (object[]): Activated promotion advances information - `id` (integer): ID - `promotion_advance_id` (string): Promotion advance ID - `promotion_advance_info` (object): Promotion advance information - `invoice_info_list` (object[]): Invoice information list - `error` (string): Error message if any - `invoice_detail` (object): Invoice detail information. The fields to send depend on `invoice_type`: - `company`: use `company_name`, `company_tax_id`, `company_address`, `company_email` (and optionally `company_address_breakdown`). - `personal`: use `name`, `phone_number`, `identity_code`, `tax_id`, `email`. - `invoice_type` (string): Invoice type: `company` for an organization, `personal` for an individual. Determines which `invoice_detail` fields are used. Values: `company`, `personal`. - `is_requested` (boolean): Customer requests an e-invoice for this order. Set `true` together with `invoice_type` and `invoice_detail` to request invoice issuance. - `order_sn` (string): Order code on the marketplace - `reports_by_phone` (object): Reports by phone number - `order_fail` (integer): Number of failed orders - `order_success` (integer): Number of successful orders - `warning` (integer): Number of warnings orders - `tracking_link` (string): Link confirm order - `payment_link` (string): Payment link - `ads_source` (string): Advertising source - `bank_payments` (object): Payment method - `transfer_proofs` (object[]): Bank transfer payment proofs, including verification time, amount and receipt images - `id` (integer): Transfer proof ID - `order_id` (integer): Order ID - `shop_id` (integer): Shop ID - `payment_id` (string): Bank payment method ID (matches a key in `bank_payments`) - `amount` (integer): Transferred amount - `images` (string[]): Transfer receipt images - `note` (string): Note - `is_income` (boolean): Money received (true) or paid out (false) - `is_verify` (boolean): Whether the transfer has been verified - `verify_at` (string (date-time)): Verification time - `verifier` (object): Verifier information - `creator` (object): Creator information - `last_editor` (object): Last editor information - `order_info` (object): Additional order information - `inserted_at` (string (date-time)): Transfer proof creation time - `updated_at` (string (date-time)): Transfer proof update time - `shopify_order_id` (string): Shopify order ID - `shopify_abandon_checkout_id` (integer): Shopify abandon checkout ID - `is_abandoned_order` (boolean): Abandoned-cart flag for creating or updating an order. Send it directly in the request body, not inside `third_party` or `third_party_infomation`. An explicit value, including `false`, takes precedence over automatic detection. If omitted on creation, the flag is determined automatically; if omitted on update, the current value is preserved. Only boolean `true` or string `"true"` is normalized to `true`; all other submitted values become `false`. - `cod` (integer): Cash on delivery - `cash` (integer): Cash payment - `account` (integer): Order source ID - `account_name` (string): Order source name - `advanced_platform_fee` (object): Fees from e-commerce platforms - `ads_top_up` (integer): Ads wallet top-up - `affiliate_commission` (integer): Affiliate commission - `diff_shipping_fee` (integer): Difference shipping fee - `marketplace_voucher` (integer): Marketplace voucher - `payment_fee` (integer): Payment fee - `platform_commission` (integer): Platform commission - `seller_transaction_fee` (integer): Seller transaction fee - `service_fee` (integer): Service fee - `sfp_service_fee` (integer): SFP service fee - `printing_count` (integer): Printing count - `money_to_collect` (integer): Money to collect - `marketplace_id` (string): Marketplace ID Values: `-2`, `-3`, `-4`, `-9`, `-16`, `-17`, `-20`, `-25`, `-27`, `-28`. - `total_price` (integer): Total price - `shop_customer_address_id` (string): Customer address ID - `customer` (object): Customer information - `fb_id` (string): Customer Facebook ID - `id` (string): Customer ID - `name` (string): Customer name - `page_id` (string): Page ID - `total_quantity` (integer): Total quantity - `time_assign_marketer` (string (date-time)): Time assign marketer - `p_utm_source` (string): UTM Source - `p_utm_medium` (string): UTM Medium - `p_utm_campaign` (string): UTM Campaign - `p_utm_term` (string): UTM Term - `p_utm_content` (string): UTM Content - `p_utm_id` (string): UTM ID - `utm_affiliate` (string): Affiliate - `link` (string): Link - `status_history` (object[]): Status update history - `avatar_url` (string): Avatar URL - `editor` (object): Editor information - `editor_fb` (string): Editor Facebook ID - `editor_id` (string): Editor ID - `name` (string): Name - `old_status` (integer): Old status - `status` (integer): Status - `updated_at` (string (date-time)): Updated at - `duplicated_phone` (boolean): Duplicated phone - `order_currency` (string): Order currency - `charged_by_vnpay` (integer): Charged by VNPay - `charged_by_qrpay` (integer): Charged by QRPay - `custom_id` (string): Custom ID - `last_editor` (object): Last editor information - `id` (string): Editor ID - `fb_id` (string): Facebook ID of editor - `name` (string): Editor name - `email` (string): Editor email - `avatar_url` (string): Editor avatar URL - `phone_number` (string): Editor phone number - `last_editor_id` (string): Last editor ID - `charged_by_momo` (integer): Charged by MoMo - `prepaid_by_point` (object): Prepaid by point - `money` (integer): Money amount - `point` (integer): Point amount - `bank_transfer_images` (string (uri)[]): Bank transfer images - `transfer_money` (integer): Transfer money - `lock_order_by_user` (string): Lock order by user ID - `assigning_care` (object): Assigning care information - `id` (string): Care ID - `fb_id` (string): Facebook ID of care - `name` (string): Care name - `email` (string): Care email - `avatar_url` (string): Care avatar URL - `phone_number` (string): Care phone number - `assigning_care_id` (string): Assigning care ID - `time_assign_care` (string (date-time)): Time assign care - `assigning_seller` (object): Assigning seller information - `id` (string): Seller ID - `fb_id` (string): Facebook ID of seller - `name` (string): Seller name - `email` (string): Seller email - `avatar_url` (string): Seller avatar URL - `phone_number` (string): Seller phone number - `einvoices` (EInvoice[]): - `actual_shipping_fee` (integer): Shipping fee - `adjust_amount` (integer): Percentage reduction on revenue - `adjustment_criteria` (integer): Adjustment criteria Values: `1` Quantity adjustment, `2` Price adjustment, `3` Tax rate adjustment, `4` Tax amount adjustment. - `adjustment_type` (integer): Adjustment type Values: `1` Increase adjustment, `2` Decrease adjustment, `3` Information. - `allocation_discounts` (object[]): Allocation discounts - `allocation_type` (integer): Allocation type Values: `1` By unit price, `2` custom. - `bank_account_number` (string): Bank account number - `bank_name` (string): Bank name - `budget_unit_code` (string): Budget unit code - `buyer_not_get_invoice` (boolean): Buyer not get invoice - `creator` (object): Creator information - `discount` (integer): General discount amount - `display_id` (integer): Display ID - `einvoice_account_id` (integer): E-invoice account ID - `email` (string): Email address - `full_name` (string): Buyer's name - `id` (integer): Invoice ID - `identity_code` (string): Buyer's identity code - `included_tax` (integer): Included tax - `invoice_no` (string): Invoice number - `invoice_series` (string): Invoice series - `invoice_type` (integer): Invoice type - `is_adjust_amount` (boolean): Is adjust amount - `is_included_tax` (boolean): Is included tax - `items` (object[]): Invoice items - `key_search` (string): Key search - `last_editor_id` (string): Last editor ID - `note` (string): Note - `order_id` (integer): Order ID - `order_info` (object): Order information - `original_einvoice` (object): Original e-invoice ID - `payment_method` (string): Payment method - `phone_number` (string): Phone number - `purchaser_tax_code` (string): Purchaser tax code - `purchaser_unit` (string): Purchaser unit - `release_date` (string (date-time)): Release date - `release_type` (integer): Release type - `shipping_address` (ShippingAddress): - `shipping_fee` (integer): Shipping fee - `shop_id` (integer): Shop ID - `signature_type` (integer): Signature type - `status` (integer): Status Values: `0` Not released, `1` Pending release, `2` Released, `3` Canceled, `4` Replacement invoice, `5` Replaced invoice, `6` Adjustment invoice, `7` Adjusted. - `tax` (integer): Tax rate - `template_code` (string): Template code - `total_amount` (integer): Total amount - `verification_code` (string): Tax Authority Code - `voucher_book` (object): Voucher book - `charged_by_card` (integer): Charged by card - `estimate_delivery_date` (string (date-time)): Estimate delivery date - `order_sources` (string): Order sources ID - `charged_by_fundiin` (integer): Charged by Fundiin - `surcharge` (integer): Surcharge - `is_linked_partner` (boolean): Is linked partner - `call_laters` (object[]): Call laters - `last_update_status_at` (string (date-time)): Last update status at - `discount_by_customer_level` (integer): Discount by customer level - `viewing` (object[]): Viewing - `additional_info` (object): Additional info - `service_partner` (string): Service partner Values: `instant` Instant. - `delivery_deadline` (string (date-time)): Delivery deadline (ISO8601, no timezone). - `ship_by_date` (integer): Marketplace ship-by deadline (Unix timestamp, seconds) for Shopee/TikTok orders — the order must be handed over to the carrier before this time, otherwise the marketplace may cancel it automatically. Shopee `ship_by_date`, TikTok `collection_due_time`. `0` = the marketplace has not returned it yet; `null` for non-marketplace orders. - `order_returned_ids` (string): Order returned IDs - `cost_surcharge` (integer): Cost surcharge - `time_send_partner` (string (date-time)): Time send partner - `charged_by_kredivo` (integer): Charged by Kredivo - `discount` (integer): Discount - `histories` (object[]): Histories - `duplicated_customer` (boolean): Duplicated customer - `customer_referral_code` (object): Customer referral code - `active` (string): Active status - `customer_id` (string (uuid)): Customer ID - `discount` (string): Discount value - `format` (string): Referral code format - `free_products_priced_between_approx` (object): Free products priced between approximately - `is_percent` (string): Discount is percentage - `only_customers_with_level_will_have_referral_code` (string): Only customers with level will have referral code - `referral_code` (string): Referral code - `reward_points_for_old_customers` (object): Reward points for customers - `shop_customer_id` (string (uuid)): Shop customer ID - `tax` (integer): Tax - `is_from_ecommerce` (boolean): Is from e-commerce - `note_image` (string (uri)[]): Note images - `shopify_draft_order_id` (string): Shopify draft order ID - `display_id` (integer): Display ID - `shop_partner_id` (integer): Shop partner ID - `is_locked` (boolean): Order lock - `merge_order` (boolean): Allows merging orders ```json { "is_abandoned_order": true, "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "partner": { "partner_id": 1, "extend_code": "S58824.MB25.C3.500020713", "count_of_delivery": 2 }, "is_free_shipping": false, "received_at_shop": false, "page_id": "256469571178082", "account": 4, "account_name": "facebook321", "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6", "items": [ { "discount_each_product": 0, "is_bonus_product": false, "is_discount_percent": false, "is_wholesale": false, "one_time_product": false, "quantity": 1, "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "variation_info": { "detail": null, "fields": null, "display_id": null, "name": "aaaaaa", "product_display_id": null, "is_upsale_product": true, "retail_price": 100000, "weight": 100 } } ], "note": "", "note_print": null, "returned_reason": 1, "warehouse_id": "630744ef-4614-4a70-988c-52e6d78c953c", "shipping_address": { "address": "aaaaa", "commune_id": "2210941", "country_code": null, "district_id": "22109", "full_address": "aaaaa, Xã Bắc Lý, Huyện Hiệp Hòa, Bắc Giang", "full_name": "hoang anh", "phone_number": "0999999999", "post_code": null, "province_id": "221" }, "shipping_fee": 0, "shop_id": 4, "total_discount": 0, "warehouse_info": { "district_id": "10111", "full_address": "kakakaka, Phường Khương Trung, Quận Thanh Xuân, Hà Nội", "name": "snappy", "phone_number": "0999999999", "province_id": "101" }, "custom_id": "Ma0001", "activated_promotion_advances": [ { "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121", "is_activated": true } ], "invoice_info_list": [ { "invoice_type": "personal", "is_requested": true, "invoice_detail": { "name": "Hoang Anh", "phone_number": "0934283743", "identity_code": "029374382740", "tax_id": "", "email": "" } } ], "status": 0, "cash": 0 } ``` ### Responses - `200` Success (object) ```json { "id": 1, "system_id": 1, "shop_id": 1, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "status": 1, "status_name": "Đã xác nhận", "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "bill_email": "hoang@example.com", "page_id": "104438181227821", "post_id": "185187094667903_477083092110915", "ad_id": "23851252560290199", "shipping_fee": 1, "partner_fee": 1, "fee_marketplace": 1, "customer_pay_fee": true, "is_free_shipping": true, "is_livestream": true, "is_live_shopping": true, "is_smc": true, "received_at_shop": true, "total_discount": 1, "note": "", "note_print": null, "returned_reason": 1, "returned_reason_name": "Do khách hàng", "sub_status": 1, "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "warehouse_info": { "name": "kho test ecod", "phone_number": "0999999999", "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu", "address": "hâhhha", "province_id": "717", "district_id": "71705", "commune_id": "7170510", "affiliate_id": null, "ffm_id": null, "has_snappy_service": true, "custom_id": null }, "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "items": [ { "id": 1, "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "quantity": 1, "returned_count": 1, "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6", "quantity_by_combo_products": [], "discount_each_product": 1, "is_bonus_product": true, "is_discount_percent": true, "is_wholesale": true, "is_composite": true, "one_time_product": true, "note": "", "note_product": "", "inserted_at": "2024-01-01T00:00:00Z", "measure_group_id": 1, "variation_info": { "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "name": "Ao so mi nam", "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "retail_price": 140000, "detail": "", "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "fields": [ { "id": "field-id-1", "name": "Màu", "value": "Trắng", "keyValue": "Màu" } ], "barcode": "BARCODE123", "brand_id": null, "category_ids": [ 1290021044 ], "display_id": "13109", "product_display_id": "a131092025", "is_upsale_product": true, "last_imported_price": 30000, "weight": 0, "measure_info": { "measure_id": 1, "exchange_value": 1 }, "avg_price": 30000 }, "components": [ { "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "quantity": 1, "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7" } ] } ], "partner": { "partner_id": 1, "cod": 0, "extend_code": "S58824.MB25.C3.500020713", "total_fee": 0, "updated_at": "2020-05-12T05:18:16", "delivery_name": null, "delivery_tel": null, "picked_up_at": null, "sort_code": null, "paid_at": null, "system_created": true, "extend_update": [ { "key": "status", "status": "delivered", "tracking_id": "S58824.MB25.C3.500020713", "note": "", "update_at": "2020-05-12T05:18:16" } ] }, "shipping_address": { "full_name": "Hoang Anh", "phone_number": "0999999999", "address": "90 Cầu Giấy", "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội", "province_id": "101", "district_id": "10113", "commune_id": "1011309", "commnue_name": "Phường Dịch Vọng", "district_name": "Quận Cầu Giấy", "province_name": "Hà Nội", "country_code": "84", "post_code": null }, "payment_purchase_histories": [ { "amount": 1800000, "type": "cash", "inserted_at": "2024-01-01T00:00:00Z", "result_code": "00", "ipn_reply": true, "voucher_amount": 0, "tags": [ "payment" ] } ], "tags": [ { "id": 75, "name": "thẻ 4" } ], "marketer": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Marketer Name", "email": "marketer@example.com", "phone_number": "0999999999", "fb_id": "2042723249341651", "avatar_url": null }, "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097", "activated_combo_products": { "combo_product_id": 1, "quantity_combo_activated": 1 }, "activated_promotion_advances": [ { "id": 1, "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121" } ], "tracking_link": "https://tracking.example.com", "payment_link": "https://payment.example.com", "ads_source": null, "shopify_order_id": null, "shopify_abandon_checkout_id": 1, "is_abandoned_order": true, "cod": 0, "cash": 0, "account": 1, "account_name": "facebook321", "advanced_platform_fee": { "ads_top_up": 1, "affiliate_commission": 1, "diff_shipping_fee": 1, "marketplace_voucher": 1, "payment_fee": 1, "platform_commission": 1, "seller_transaction_fee": 1, "service_fee": 1, "sfp_service_fee": 1 }, "printing_count": 1, "money_to_collect": 1, "total_price": 1, "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857", "customer": { "fb_id": null, "id": "96a8e283-3fba-492e-a35a-970f72a30a02", "name": "Trần Văn Hoàng", "page_id": "104438181227821" }, "total_quantity": 1, "time_assign_marketer": "2024-01-01T00:00:00Z", "status_history": [ { "avatar_url": null, "editor_fb": "2042723249341651", "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "name": "Hoang Anh", "old_status": 0, "status": 1, "updated_at": "2024-01-01T00:00:00Z" } ], "duplicated_phone": true, "order_currency": "VND", "charged_by_vnpay": 1, "charged_by_qrpay": 1, "custom_id": null, "last_editor": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "email": "hoang@example.com", "avatar_url": null, "phone_number": "0999999999" }, "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "charged_by_momo": 1, "bank_transfer_images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "transfer_money": 1, "lock_order_by_user": null, "assigning_care": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "fb_id": "2042723249341651", "name": "Care Name", "email": "care@example.com", "avatar_url": null, "phone_number": "0999999999" }, "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "time_assign_care": "2024-01-01T00:00:00Z", "assigning_seller": { "id": "340644fc-314d-450e-a45f-33343678cab6", "fb_id": "2042723249341651", "name": "Seller Name", "email": "seller@example.com", "avatar_url": null, "phone_number": "0999999999" }, "einvoices": [], "charged_by_card": 1, "estimate_delivery_date": "2024-01-01T00:00:00Z", "order_sources": "-1", "charged_by_fundiin": 1, "surcharge": 1, "is_linked_partner": true, "call_laters": [], "last_update_status_at": "2024-01-01T00:00:00Z", "discount_by_customer_level": 1, "viewing": [], "order_returned_ids": null, "cost_surcharge": 1, "time_send_partner": "2024-01-01T00:00:00Z", "charged_by_kredivo": 1, "discount": 1, "histories": [], "duplicated_customer": true, "tax": 1, "is_from_ecommerce": true, "note_image": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "shopify_draft_order_id": null, "display_id": 1, "shop_partner_id": 1, "is_locked": true } ``` ## Get order conversation messages `GET /shops/{SHOP_ID}/orders/{ORDER_ID}/messages` Resolves the conversation associated with the order and returns messages from the entire conversation. Messages in each response are ordered chronologically (oldest to newest). Pagination follows the Pancake web application semantics: - Omit `current_count` or set it to `0` to load up to 25 of the newest records, rendered in chronological order. - To load older records, set `current_count` to the total number of messages already loaded. After the first response use `25`; if the next response contains 30 messages, use `55`, and continue in the same way. - Calls with a positive `current_count` return up to 30 older messages. A valid order without an associated conversation returns `{"success":true,"data":[]}`. ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `ORDER_ID` | path | string | yes | Order ID | | `current_count` | query | integer | | Number of messages already loaded. This is an offset count, not a cursor. | | `fields[]` | query | string[] | | Top-level message fields to include in each item. Repeat the query parameter for multiple fields, for example `fields[]=id&fields[]=message`. Omit it to return all fields. | ### Responses - `200` Conversation messages, an empty data array when the valid order has no conversation, or a legacy authentication error returned with HTTP 200 () - `400` The current_count parameter is invalid (ErrorResponse) - `403` The API key is invalid or disabled, or the authenticated user cannot access order management (ErrorResponse) - `404` The shop or order does not exist, or the order is not visible to the authenticated API client (ErrorResponse) - `429` The Open API request rate limit was reached (ErrorResponse) - `502` The upstream conversation service returned an error (ErrorResponse) - `504` The upstream conversation service timed out (ErrorResponse) ```json { "success": true, "data": [ { "id": "m_hULhobwR0nAa0NzuQaVc3O", "type": "INBOX", "message": "
Xin chào, shop còn size M không?
", "original_message": "Xin chào, shop còn size M không?", "message_tags": [], "from": { "id": "9306266852780716", "name": "Nguyễn Văn A" }, "seen": true, "can_like": false, "user_likes": false, "like_count": null, "can_comment": false, "comment_count": null, "can_remove": false, "is_removed": false, "is_hidden": false, "can_hide": false, "can_reply_privately": false, "private_reply_conversation": null, "attachments": [], "has_phone": false, "phone_info": [], "is_parent": false, "inserted_at": "2026-06-25T02:00:38.675576", "page_id": "117967746266487", "show_info": true, "parent_id": null, "is_parent_hidden": false, "edit_history": null, "removed_by": null, "rich_message": null, "conversation_id": "117967746266487_9306266852780716", "is_livestream_order": null } ] } ``` ## Print order as PDF `GET /shops/{SHOP_ID}/orders/{ORDER_ID}/print` Fills one of the shop's print templates with the order data and returns a PDF, as when printing the order from POS web. When `label_id` is omitted, the template is chosen in this order: the **Print template by courier** of the order's courier, the shop's default template, then the shop's first template. Shops without templates use the system template. The **Print order twice** and **Attached print template** settings of the chosen template also apply. - The page size follows the template's paper size. Roll paper (K80, K58...) returns one page whose height fits the content. - Printing through this endpoint does not increase the order's printing count. - Not supported yet: CRM variables, draft e-invoice data, order tracking and invoice request links, component items of composite products, templates by order source or for returned orders, and printed forms provided by the courier. The PDF can differ slightly from printing in a browser: fonts that only exist on the user's computer (Segoe UI, Tahoma, Verdana...) are replaced, and templates whose content is longer or wider than the paper can break pages differently. Images are downloaded by the server: images on non-public hosts, larger than 5 MB, slower than 5 seconds, beyond 15 MB in total, beyond the first 30 image URLs of the document, or repeated beyond 20 MB of embedded image data are left blank. Only images in `` (`src`/`srcset`) and CSS `url()` are downloaded; other external resources (`` stylesheets, `@import`, SVG ``, `background` attributes) are not loaded. Errors are returned as JSON. For the `404` order and print template errors and the `503` error, the `message` follows the shop's language. ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `ORDER_ID` | path | string | yes | Order ID, system ID or custom order ID | | `label_id` | query | integer | | ID of the shop's print template. Omit it to choose the template automatically. | ### Responses - `200` The order printed as a PDF file, or a legacy authentication error returned with HTTP 200 (ErrorResponse) - `403` The API key is invalid or disabled, or the authenticated user cannot access order management (ErrorResponse) - `404` The shop or order does not exist, the order is not visible to the authenticated API client, or `label_id` is not a print template of the shop (ErrorResponse) - `429` The Open API request rate limit was reached (ErrorResponse) - `503` The PDF could not be rendered. Retry later. (ErrorResponse) ```json { "success": false, "message": "Missing access_token", "error_code": 101 } ``` ## List of order sources `GET /shops/{SHOP_ID}/order_source` Get list of order sources ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "data": [ { "id": -3, "inserted_at": "2020-06-10T11:50:07", "name": "Shopee", "shop_id": 7, "updated_at": "2020-06-10T11:50:07" }, { "id": 4, "inserted_at": "2020-06-17T08:41:54", "name": "40999897", "parent_id": -3, "shop_id": 7, "updated_at": "2020-06-17T08:41:54" }, { "id": "1471242102982974", "inserted_at": "2021-04-22T08:33:15", "name": "Pancake.vn", "parent_id": -1, "shop_id": 20, "updated_at": "2024-04-08T03:11:25" }, { "id": "987654", "inserted_at": "2024-05-01T08:00:00", "link": "https://landing.example.com/source-abc", "name": "Landing ABC", "parent_id": -7, "shop_id": 20, "updated_at": "2024-05-01T08:00:00" } ], "success": true } ``` ## Get link print label `POST /shops/{SHOP_ID}/products/get_logistics_shipping_document` Get link to print shipping label and packing slips ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `document_type` | query | string | | Document type Values: `SL_PL` Shipping label + Packing slips, `SHIPPING_LABEL` Shipping label, `PICK_LIST` Packing slips. | ### Request body Request body containing list of order IDs to print labels - `params` (object[], required): List of order IDs - `order_id` (string, required): Order ID ```json { "params": [ { "order_id": "576551803772635228" } ] } ``` ### Responses - `200` Success (object) ```json { "data": [ "https://content.pancake.vn/2-25/2025/3/28/071edc2cc6c728f6c3fa493a2cb033e8f61fb11e.071edc2cc6c728f6c3fa493a2cb033e8f61fb11e" ], "success": true } ``` ## Get order confirm link `POST /shops/{SHOP_ID}/orders/get_tracking_url` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing system ID to get tracking URL - `system_id` (integer, required): System ID ```json { "system_id": 862 } ``` ### Responses - `200` Success (object) ```json { "url": "https://pke.gg/99gjy3r", "success": true } ``` ## Prepare order shipment `POST /shops/{SHOP_ID}/orders/arrange_shipment` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing order IDs to prepare shipment - `order_id` (string, required): Order ID - `pickup_shift` (string): Pickup shift. Required for Shopee platform. Values: `closest` closest, `farthest` farthest. - `pickup_method` (string): Pickup method. Required for Shopee and TikTok platforms. Values: `pick_up` ĐVVC lấy hàng, `drop_off` Mang hàng ra bưu cục. ```json { "order_id": "34123423498237", "pickup_shift": "closest", "pickup_method": "pick_up" } ``` ### Responses - `200` Success (object) ```json { "message": "Arrange shipment successfully", "success": true } ``` ## List of advanced promotions of order `POST /shops/{SHOP_ID}/orders/get_promotion_advance_active` Get list of advanced promotions that can be applied to an order ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing order information (existing order ID or new order details) to get active promotions ```json null ``` ### Responses - `200` Success (object) ```json { "id": 1418, "system_id": 1, "shop_id": 4, "inserted_at": "2020-05-12T04:51:42", "updated_at": "2020-05-12T04:51:54", "status": 0, "status_name": "new", "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "bill_email": "customer@example.com", "page_id": "256469571178082", "post_id": "185187094667903_477083092110915", "ad_id": "23851252560290199", "shipping_fee": 0, "cod": 0, "cash": 0, "account": 1, "total_discount": 0, "note": "", "note_print": null, "received_at_shop": false, "is_free_shipping": false, "is_locked": false, "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "items": [], "partner": { "partner_id": 1, "cod": 0, "extend_code": "S58824.MB25.C3.500020713", "total_fee": 0, "updated_at": "2020-05-12T05:18:16" }, "shipping_address": { "full_name": "Hoang Anh", "phone_number": "0999999999", "address": "90 Cầu Giấy", "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội", "province_id": "101", "district_id": "10113", "commune_id": "1011309" } } ``` ## List of payment methods `GET /shops/{SHOP_ID}/bank_payments` Get list of payment methods ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "data": [ { "id": "e01fed02-8680-4102-bdf4-343a7e1a00f5", "creator_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Tiền cọc", "shop_id": 224, "inserted_at": "2025-08-19T02:25:37", "updated_at": "2025-08-19T02:25:37" } ], "success": true } ``` ## List of return orders `GET /shops/{SHOP_ID}/orders_returned` Get list of return orders ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `status` | query | integer | | Order status | | `update_status` | query | string | | Filter orders by time Values: `inserted_at` Order creation time, `updated_at` Last update time, `0` New, `2` Shipped, `1` Completed, `4` Canceled. | | `start_time` | query | integer | | Start date (unix timestamp) | | `end_time` | query | integer | | End date (unix timestamp) | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": 1, "display_id": 1, "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "custom_id": null, "discount": 1, "discount_from_order_to_returned": 1, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "order_id": 1, "order_id_to_returned": 1, "order": { "id": 1, "system_id": 1, "shop_id": 1, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "status": 1, "status_name": "Đã xác nhận", "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "bill_email": "hoang@example.com", "page_id": "104438181227821", "post_id": "185187094667903_477083092110915", "ad_id": "23851252560290199", "shipping_fee": 1, "partner_fee": 1, "fee_marketplace": 1, "customer_pay_fee": true, "is_free_shipping": true, "is_livestream": true, "is_live_shopping": true, "is_smc": true, "received_at_shop": true, "total_discount": 1, "note": "", "note_print": null, "returned_reason": 1, "returned_reason_name": "Do khách hàng", "sub_status": 1, "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "warehouse_info": { "name": "kho test ecod", "phone_number": "0999999999", "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu", "address": "hâhhha", "province_id": "717", "district_id": "71705", "commune_id": "7170510", "affiliate_id": null, "ffm_id": null, "has_snappy_service": true, "custom_id": null }, "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "items": [ { "id": 1, "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "quantity": 1, "returned_count": 1, "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6", "quantity_by_combo_products": [], "discount_each_product": 1, "is_bonus_product": true, "is_discount_percent": true, "is_wholesale": true, "is_composite": true, "one_time_product": true, "note": "", "note_product": "", "inserted_at": "2024-01-01T00:00:00Z", "measure_group_id": 1, "variation_info": { "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "name": "Ao so mi nam", "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "retail_price": 140000, "detail": "", "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "fields": [ { "id": "field-id-1", "name": "Màu", "value": "Trắng", "keyValue": "Màu" } ], "barcode": "BARCODE123", "brand_id": null, "category_ids": [ 1290021044 ], "display_id": "13109", "product_display_id": "a131092025", "last_imported_price": 30000, "weight": 0, "measure_info": { "measure_id": 1, "exchange_value": 1 }, "avg_price": 30000 }, "components": [ { "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "quantity": 1, "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7" } ] } ], "partner": { "partner_id": 1, "cod": 0, "extend_code": "S58824.MB25.C3.500020713", "total_fee": 0, "updated_at": "2020-05-12T05:18:16", "delivery_name": null, "delivery_tel": null, "picked_up_at": null, "sort_code": null, "paid_at": null, "system_created": true, "extend_update": [ { "key": "status", "status": "delivered", "tracking_id": "S58824.MB25.C3.500020713", "note": "", "update_at": "2020-05-12T05:18:16" } ] }, "shipping_address": { "full_name": "Hoang Anh", "phone_number": "0999999999", "address": "90 Cầu Giấy", "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội", "province_id": "101", "district_id": "10113", "commune_id": "1011309", "commnue_name": "Phường Dịch Vọng", "district_name": "Quận Cầu Giấy", "province_name": "Hà Nội", "country_code": "84", "post_code": null }, "payment_purchase_histories": [ { "amount": 1800000, "type": "cash", "inserted_at": "2024-01-01T00:00:00Z", "result_code": "00", "ipn_reply": true, "voucher_amount": 0, "tags": [ "payment" ] } ], "tags": [ { "id": 75, "name": "thẻ 4" } ], "marketer": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Marketer Name", "email": "marketer@example.com", "phone_number": "0999999999", "fb_id": "2042723249341651", "avatar_url": null }, "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097", "activated_combo_products": { "combo_product_id": 1, "quantity_combo_activated": 1 }, "activated_promotion_advances": [ { "id": 1, "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121" } ], "tracking_link": "https://tracking.example.com", "payment_link": "https://payment.example.com", "ads_source": null, "shopify_order_id": null, "shopify_abandon_checkout_id": 1, "is_abandoned_order": true, "cod": 0, "cash": 0, "account": 1, "account_name": "facebook321", "advanced_platform_fee": { "ads_top_up": 1, "affiliate_commission": 1, "diff_shipping_fee": 1, "marketplace_voucher": 1, "payment_fee": 1, "platform_commission": 1, "seller_transaction_fee": 1, "service_fee": 1, "sfp_service_fee": 1 }, "printing_count": 1, "money_to_collect": 1, "total_price": 1, "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857", "customer": { "fb_id": null, "id": "96a8e283-3fba-492e-a35a-970f72a30a02", "name": "Trần Văn Hoàng", "page_id": "104438181227821" }, "total_quantity": 1, "time_assign_marketer": "2024-01-01T00:00:00Z", "status_history": [ { "avatar_url": null, "editor_fb": "2042723249341651", "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "name": "Hoang Anh", "old_status": 0, "status": 1, "updated_at": "2024-01-01T00:00:00Z" } ], "duplicated_phone": true, "order_currency": "VND", "charged_by_vnpay": 1, "charged_by_qrpay": 1, "custom_id": null, "last_editor": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "email": "hoang@example.com", "avatar_url": null, "phone_number": "0999999999" }, "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "charged_by_momo": 1, "bank_transfer_images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "transfer_money": 1, "lock_order_by_user": null, "assigning_care": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "fb_id": "2042723249341651", "name": "Care Name", "email": "care@example.com", "avatar_url": null, "phone_number": "0999999999" }, "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "time_assign_care": "2024-01-01T00:00:00Z", "assigning_seller": { "id": "340644fc-314d-450e-a45f-33343678cab6", "fb_id": "2042723249341651", "name": "Seller Name", "email": "seller@example.com", "avatar_url": null, "phone_number": "0999999999" }, "einvoices": [], "charged_by_card": 1, "estimate_delivery_date": "2024-01-01T00:00:00Z", "order_sources": "-1", "charged_by_fundiin": 1, "surcharge": 1, "is_linked_partner": true, "call_laters": [], "last_update_status_at": "2024-01-01T00:00:00Z", "discount_by_customer_level": 1, "viewing": [], "order_returned_ids": null, "cost_surcharge": 1, "time_send_partner": "2024-01-01T00:00:00Z", "charged_by_kredivo": 1, "discount": 1, "histories": [], "duplicated_customer": true, "tax": 1, "is_from_ecommerce": true, "note_image": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "shopify_draft_order_id": null, "display_id": 1, "shop_partner_id": 1, "is_locked": true }, "order_to_returned": { "id": 1, "system_id": 1, "shop_id": 1, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "status": 1, "status_name": "Đã xác nhận", "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "bill_email": "hoang@example.com", "page_id": "104438181227821", "post_id": "185187094667903_477083092110915", "ad_id": "23851252560290199", "shipping_fee": 1, "partner_fee": 1, "fee_marketplace": 1, "customer_pay_fee": true, "is_free_shipping": true, "is_livestream": true, "is_live_shopping": true, "is_smc": true, "received_at_shop": true, "total_discount": 1, "note": "", "note_print": null, "returned_reason": 1, "returned_reason_name": "Do khách hàng", "sub_status": 1, "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "warehouse_info": { "name": "kho test ecod", "phone_number": "0999999999", "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu", "address": "hâhhha", "province_id": "717", "district_id": "71705", "commune_id": "7170510", "affiliate_id": null, "ffm_id": null, "has_snappy_service": true, "custom_id": null }, "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "items": [ { "id": 1, "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "quantity": 1, "returned_count": 1, "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6", "quantity_by_combo_products": [], "discount_each_product": 1, "is_bonus_product": true, "is_discount_percent": true, "is_wholesale": true, "is_composite": true, "one_time_product": true, "note": "", "note_product": "", "inserted_at": "2024-01-01T00:00:00Z", "measure_group_id": 1, "variation_info": { "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "name": "Ao so mi nam", "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "retail_price": 140000, "detail": "", "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "fields": [ { "id": "field-id-1", "name": "Màu", "value": "Trắng", "keyValue": "Màu" } ], "barcode": "BARCODE123", "brand_id": null, "category_ids": [ 1290021044 ], "display_id": "13109", "product_display_id": "a131092025", "last_imported_price": 30000, "weight": 0, "measure_info": { "measure_id": 1, "exchange_value": 1 }, "avg_price": 30000 }, "components": [ { "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "quantity": 1, "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7" } ] } ], "partner": { "partner_id": 1, "cod": 0, "extend_code": "S58824.MB25.C3.500020713", "total_fee": 0, "updated_at": "2020-05-12T05:18:16", "delivery_name": null, "delivery_tel": null, "picked_up_at": null, "sort_code": null, "paid_at": null, "system_created": true, "extend_update": [ { "key": "status", "status": "delivered", "tracking_id": "S58824.MB25.C3.500020713", "note": "", "update_at": "2020-05-12T05:18:16" } ] }, "shipping_address": { "full_name": "Hoang Anh", "phone_number": "0999999999", "address": "90 Cầu Giấy", "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội", "province_id": "101", "district_id": "10113", "commune_id": "1011309", "commnue_name": "Phường Dịch Vọng", "district_name": "Quận Cầu Giấy", "province_name": "Hà Nội", "country_code": "84", "post_code": null }, "payment_purchase_histories": [ { "amount": 1800000, "type": "cash", "inserted_at": "2024-01-01T00:00:00Z", "result_code": "00", "ipn_reply": true, "voucher_amount": 0, "tags": [ "payment" ] } ], "tags": [ { "id": 75, "name": "thẻ 4" } ], "marketer": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Marketer Name", "email": "marketer@example.com", "phone_number": "0999999999", "fb_id": "2042723249341651", "avatar_url": null }, "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097", "activated_combo_products": { "combo_product_id": 1, "quantity_combo_activated": 1 }, "activated_promotion_advances": [ { "id": 1, "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121" } ], "tracking_link": "https://tracking.example.com", "payment_link": "https://payment.example.com", "ads_source": null, "shopify_order_id": null, "shopify_abandon_checkout_id": 1, "is_abandoned_order": true, "cod": 0, "cash": 0, "account": 1, "account_name": "facebook321", "advanced_platform_fee": { "ads_top_up": 1, "affiliate_commission": 1, "diff_shipping_fee": 1, "marketplace_voucher": 1, "payment_fee": 1, "platform_commission": 1, "seller_transaction_fee": 1, "service_fee": 1, "sfp_service_fee": 1 }, "printing_count": 1, "money_to_collect": 1, "total_price": 1, "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857", "customer": { "fb_id": null, "id": "96a8e283-3fba-492e-a35a-970f72a30a02", "name": "Trần Văn Hoàng", "page_id": "104438181227821" }, "total_quantity": 1, "time_assign_marketer": "2024-01-01T00:00:00Z", "status_history": [ { "avatar_url": null, "editor_fb": "2042723249341651", "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "name": "Hoang Anh", "old_status": 0, "status": 1, "updated_at": "2024-01-01T00:00:00Z" } ], "duplicated_phone": true, "order_currency": "VND", "charged_by_vnpay": 1, "charged_by_qrpay": 1, "custom_id": null, "last_editor": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "email": "hoang@example.com", "avatar_url": null, "phone_number": "0999999999" }, "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "charged_by_momo": 1, "bank_transfer_images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "transfer_money": 1, "lock_order_by_user": null, "assigning_care": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "fb_id": "2042723249341651", "name": "Care Name", "email": "care@example.com", "avatar_url": null, "phone_number": "0999999999" }, "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "time_assign_care": "2024-01-01T00:00:00Z", "assigning_seller": { "id": "340644fc-314d-450e-a45f-33343678cab6", "fb_id": "2042723249341651", "name": "Seller Name", "email": "seller@example.com", "avatar_url": null, "phone_number": "0999999999" }, "einvoices": [], "charged_by_card": 1, "estimate_delivery_date": "2024-01-01T00:00:00Z", "order_sources": "-1", "charged_by_fundiin": 1, "surcharge": 1, "is_linked_partner": true, "call_laters": [], "last_update_status_at": "2024-01-01T00:00:00Z", "discount_by_customer_level": 1, "viewing": [], "order_returned_ids": null, "cost_surcharge": 1, "time_send_partner": "2024-01-01T00:00:00Z", "charged_by_kredivo": 1, "discount": 1, "histories": [], "duplicated_customer": true, "tax": 1, "is_from_ecommerce": true, "note_image": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "shopify_draft_order_id": null, "display_id": 1, "shop_partner_id": 1, "is_locked": true }, "returned_items": [ { "id": 1, "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "returned_quantity": 1, "discount_each_product": 1, "is_discount_percent": true } ], "returned_fee": 1, "shop_customer_id": "96a8e283-3fba-492e-a35a-970f72a30a02", "shop_id": 1, "status": 1, "status_histories": [ { "id": 1, "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "old_status": 0, "status": 1, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ], "tags": [ 1 ], "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8" } ] } ``` ## Create return order `POST /shops/{SHOP_ID}/orders_returned` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing return order information - `discount_from_order_to_returned` (integer): Discount from order to returned - `order_additional` (object, required): Exchange order information - `bill_email` (string): Customer email - `bill_full_name` (string): Customer name - `bill_phone_number` (string): Phone number of customer - `cash` (integer): Cash payment - `discount` (integer): Discount total - `items` (object[], required): List of products in exchange order - `note` (string): Internal note - `note_print` (string): Note for printing - `order_currency` (string): Order currency - `payment_from_customers_exchange_order` (integer): Payment from customers exchange order - `prepaid` (integer): Prepaid amount - `received_at_shop` (boolean): true: Sales at counter, false: Sell online - `shipping_address` (object): Delivery address information - `shipping_fee` (integer): Shipping fee - `shop_customer_id` (string): Customer ID - `surcharge` (integer): Surcharge - `warehouse_id` (string, required): Warehouse ID - `order_to_returned` (object): Order to be returned - `id` (string): Order ID to returned - `returned_items` (object[], required): List of products in returned order - `product_id` (string, required): Product ID - `returned_quantity` (integer, required): Returned quantity - `variation_id` (string, required): Variation ID - `variation_info` (object, required): Variation information - `shop_customer_id` (string): Customer ID - `status` (integer, required): Order status - `warehouse_id` (string, required): Warehouse ID ```json { "discount_from_order_to_returned": 50000, "order_additional": { "bill_email": "", "bill_full_name": "Lê Văn Tám", "bill_phone_number": "0384596873", "cash": 1, "discount": 20000, "items": [ { "discount_each_product": 0, "product_id": "db7cb77a-64c4-4572-9cca-86e846c0897c", "quantity": 1, "returned_quantity": 1, "variation_id": "749f52be-2bd0-4e76-b9fd-a4914c53192a", "variation_info": { "detail": "size: XL, color: blue", "fields": [ { "id": "25698fb6-158e-472f-a8a7-fa48250337ae", "keyValue": "XL", "name": "size", "value": "XL" }, { "id": "c414ff3c-cba7-497c-a6f8-13355605b391", "keyValue": "BLUE", "name": "color", "value": "blue" } ], "images": [ "https://content.pancake.vn/2/2022/1/19/18c4500c320cb2e993b3ff4b3be81165df64d3ba.png" ], "name": "Sao chép Áo nam thời trang Pari", "retail_price": 500000, "weight": 100 } } ], "note": "đơn trả hàng", "note_print": "đơn trả hàng", "order_currency": "VND", "payment_from_customers_exchange_order": 150000, "prepaid": 123, "received_at_shop": false, "shipping_address": { "address": "BT2-12 ngõ 178910", "commune_id": "1012129", "country_code": "84", "district_id": "10121", "full_address": "BT2-12 ngõ 178, Phường Đại Mỗ, Quận Nam Từ Liêm, Hà Nội", "full_name": "Nguyễn Hải Nhạn", "new_full_address": "BT2-12 ngõ 178, Hà Nội", "phone_number": "0384596873", "province_id": "101", "render_type": "old" }, "shipping_fee": 0, "shop_customer_id": "ef9fc5ef-b4b5-4682-a1b9-b7ea259ae353", "surcharge": 0, "warehouse_id": "4051d111-a6b6-44fb-aca1-61fb954298cb" }, "order_to_returned": { "id": "123157" }, "returned_items": [ { "product_id": "6c998441-146b-4daa-b8e0-313a2a543623", "returned_quantity": 1, "variation_id": "efac90c8-0ba7-4aa0-bef6-8f4be3c0c6e6", "variation_info": { "name": "[HỎA TỐC] Phồng Tôm Cà Mau VITOT Bánh Phồng Tôm Loại Cao Cấp Với Tỉ Lệ Tôm 48%, Đậm Đà Vị Tôm", "retail_price": 200000, "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2024/12/31/a549582c91f1bee856f8a4383408de4f10585fac.jpg" ], "fields": [ { "id": "995a0b6d-4e08-493e-b776-0afb2138e8a7", "name": "PHÂN LOẠI", "value": "1 HỘP CÀ MAU" } ], "detail": "PHÂN LOẠI: 1 HỘP CÀ MAU" } } ], "shop_customer_id": "ef9fc5ef-b4b5-4682-a1b9-b7ea259ae353", "status": 2, "warehouse_id": "4051d111-a6b6-44fb-aca1-61fb954298cb" } ``` ### Responses - `200` Success (ReturnOrder) ```json { "id": 1, "display_id": 1, "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "custom_id": null, "discount": 1, "discount_from_order_to_returned": 1, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "order_id": 1, "order_id_to_returned": 1, "order": { "id": 1, "system_id": 1, "shop_id": 1, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "status": 1, "status_name": "Đã xác nhận", "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "bill_email": "hoang@example.com", "page_id": "104438181227821", "post_id": "185187094667903_477083092110915", "ad_id": "23851252560290199", "shipping_fee": 1, "partner_fee": 1, "fee_marketplace": 1, "customer_pay_fee": true, "is_free_shipping": true, "is_livestream": true, "is_live_shopping": true, "is_smc": true, "received_at_shop": true, "total_discount": 1, "note": "", "note_print": null, "returned_reason": 1, "returned_reason_name": "Do khách hàng", "sub_status": 1, "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "warehouse_info": { "name": "kho test ecod", "phone_number": "0999999999", "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu", "address": "hâhhha", "province_id": "717", "district_id": "71705", "commune_id": "7170510", "affiliate_id": null, "ffm_id": null, "has_snappy_service": true, "custom_id": null }, "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "items": [ { "id": 1, "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "quantity": 1, "returned_count": 1, "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6", "quantity_by_combo_products": [], "discount_each_product": 1, "is_bonus_product": true, "is_discount_percent": true, "is_wholesale": true, "is_composite": true, "one_time_product": true, "note": "", "note_product": "", "inserted_at": "2024-01-01T00:00:00Z", "measure_group_id": 1, "variation_info": { "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "name": "Ao so mi nam", "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "retail_price": 140000, "detail": "", "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "fields": [ { "id": "field-id-1", "name": "Màu", "value": "Trắng", "keyValue": "Màu" } ], "barcode": "BARCODE123", "brand_id": null, "category_ids": [ 1290021044 ], "display_id": "13109", "product_display_id": "a131092025", "last_imported_price": 30000, "weight": 0, "measure_info": { "measure_id": 1, "exchange_value": 1 }, "avg_price": 30000 }, "components": [ { "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "quantity": 1, "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7" } ] } ], "partner": { "partner_id": 1, "cod": 0, "extend_code": "S58824.MB25.C3.500020713", "total_fee": 0, "updated_at": "2020-05-12T05:18:16", "delivery_name": null, "delivery_tel": null, "picked_up_at": null, "sort_code": null, "paid_at": null, "system_created": true, "extend_update": [ { "key": "status", "status": "delivered", "tracking_id": "S58824.MB25.C3.500020713", "note": "", "update_at": "2020-05-12T05:18:16" } ] }, "shipping_address": { "full_name": "Hoang Anh", "phone_number": "0999999999", "address": "90 Cầu Giấy", "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội", "province_id": "101", "district_id": "10113", "commune_id": "1011309", "commnue_name": "Phường Dịch Vọng", "district_name": "Quận Cầu Giấy", "province_name": "Hà Nội", "country_code": "84", "post_code": null }, "payment_purchase_histories": [ { "amount": 1800000, "type": "cash", "inserted_at": "2024-01-01T00:00:00Z", "result_code": "00", "ipn_reply": true, "voucher_amount": 0, "tags": [ "payment" ] } ], "tags": [ { "id": 75, "name": "thẻ 4" } ], "marketer": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Marketer Name", "email": "marketer@example.com", "phone_number": "0999999999", "fb_id": "2042723249341651", "avatar_url": null }, "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097", "activated_combo_products": { "combo_product_id": 1, "quantity_combo_activated": 1 }, "activated_promotion_advances": [ { "id": 1, "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121" } ], "tracking_link": "https://tracking.example.com", "payment_link": "https://payment.example.com", "ads_source": null, "shopify_order_id": null, "shopify_abandon_checkout_id": 1, "is_abandoned_order": true, "cod": 0, "cash": 0, "account": 1, "account_name": "facebook321", "advanced_platform_fee": { "ads_top_up": 1, "affiliate_commission": 1, "diff_shipping_fee": 1, "marketplace_voucher": 1, "payment_fee": 1, "platform_commission": 1, "seller_transaction_fee": 1, "service_fee": 1, "sfp_service_fee": 1 }, "printing_count": 1, "money_to_collect": 1, "total_price": 1, "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857", "customer": { "fb_id": null, "id": "96a8e283-3fba-492e-a35a-970f72a30a02", "name": "Trần Văn Hoàng", "page_id": "104438181227821" }, "total_quantity": 1, "time_assign_marketer": "2024-01-01T00:00:00Z", "status_history": [ { "avatar_url": null, "editor_fb": "2042723249341651", "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "name": "Hoang Anh", "old_status": 0, "status": 1, "updated_at": "2024-01-01T00:00:00Z" } ], "duplicated_phone": true, "order_currency": "VND", "charged_by_vnpay": 1, "charged_by_qrpay": 1, "custom_id": null, "last_editor": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "email": "hoang@example.com", "avatar_url": null, "phone_number": "0999999999" }, "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "charged_by_momo": 1, "bank_transfer_images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "transfer_money": 1, "lock_order_by_user": null, "assigning_care": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "fb_id": "2042723249341651", "name": "Care Name", "email": "care@example.com", "avatar_url": null, "phone_number": "0999999999" }, "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "time_assign_care": "2024-01-01T00:00:00Z", "assigning_seller": { "id": "340644fc-314d-450e-a45f-33343678cab6", "fb_id": "2042723249341651", "name": "Seller Name", "email": "seller@example.com", "avatar_url": null, "phone_number": "0999999999" }, "einvoices": [], "charged_by_card": 1, "estimate_delivery_date": "2024-01-01T00:00:00Z", "order_sources": "-1", "charged_by_fundiin": 1, "surcharge": 1, "is_linked_partner": true, "call_laters": [], "last_update_status_at": "2024-01-01T00:00:00Z", "discount_by_customer_level": 1, "viewing": [], "order_returned_ids": null, "cost_surcharge": 1, "time_send_partner": "2024-01-01T00:00:00Z", "charged_by_kredivo": 1, "discount": 1, "histories": [], "duplicated_customer": true, "tax": 1, "is_from_ecommerce": true, "note_image": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "shopify_draft_order_id": null, "display_id": 1, "shop_partner_id": 1, "is_locked": true }, "order_to_returned": { "id": 1, "system_id": 1, "shop_id": 1, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z", "status": 1, "status_name": "Đã xác nhận", "bill_full_name": "Hoang Anh", "bill_phone_number": "0999999999", "bill_email": "hoang@example.com", "page_id": "104438181227821", "post_id": "185187094667903_477083092110915", "ad_id": "23851252560290199", "shipping_fee": 1, "partner_fee": 1, "fee_marketplace": 1, "customer_pay_fee": true, "is_free_shipping": true, "is_livestream": true, "is_live_shopping": true, "is_smc": true, "received_at_shop": true, "total_discount": 1, "note": "", "note_print": null, "returned_reason": 1, "returned_reason_name": "Do khách hàng", "sub_status": 1, "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "warehouse_info": { "name": "kho test ecod", "phone_number": "0999999999", "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu", "address": "hâhhha", "province_id": "717", "district_id": "71705", "commune_id": "7170510", "affiliate_id": null, "ffm_id": null, "has_snappy_service": true, "custom_id": null }, "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "avatar_url": null }, "items": [ { "id": 1, "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "quantity": 1, "returned_count": 1, "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6", "quantity_by_combo_products": [], "discount_each_product": 1, "is_bonus_product": true, "is_discount_percent": true, "is_wholesale": true, "is_composite": true, "one_time_product": true, "note": "", "note_product": "", "inserted_at": "2024-01-01T00:00:00Z", "measure_group_id": 1, "variation_info": { "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "name": "Ao so mi nam", "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "retail_price": 140000, "detail": "", "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "fields": [ { "id": "field-id-1", "name": "Màu", "value": "Trắng", "keyValue": "Màu" } ], "barcode": "BARCODE123", "brand_id": null, "category_ids": [ 1290021044 ], "display_id": "13109", "product_display_id": "a131092025", "last_imported_price": 30000, "weight": 0, "measure_info": { "measure_id": 1, "exchange_value": 1 }, "avg_price": 30000 }, "components": [ { "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "quantity": 1, "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7" } ] } ], "partner": { "partner_id": 1, "cod": 0, "extend_code": "S58824.MB25.C3.500020713", "total_fee": 0, "updated_at": "2020-05-12T05:18:16", "delivery_name": null, "delivery_tel": null, "picked_up_at": null, "sort_code": null, "paid_at": null, "system_created": true, "extend_update": [ { "key": "status", "status": "delivered", "tracking_id": "S58824.MB25.C3.500020713", "note": "", "update_at": "2020-05-12T05:18:16" } ] }, "shipping_address": { "full_name": "Hoang Anh", "phone_number": "0999999999", "address": "90 Cầu Giấy", "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội", "province_id": "101", "district_id": "10113", "commune_id": "1011309", "commnue_name": "Phường Dịch Vọng", "district_name": "Quận Cầu Giấy", "province_name": "Hà Nội", "country_code": "84", "post_code": null }, "payment_purchase_histories": [ { "amount": 1800000, "type": "cash", "inserted_at": "2024-01-01T00:00:00Z", "result_code": "00", "ipn_reply": true, "voucher_amount": 0, "tags": [ "payment" ] } ], "tags": [ { "id": 75, "name": "thẻ 4" } ], "marketer": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Marketer Name", "email": "marketer@example.com", "phone_number": "0999999999", "fb_id": "2042723249341651", "avatar_url": null }, "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097", "activated_combo_products": { "combo_product_id": 1, "quantity_combo_activated": 1 }, "activated_promotion_advances": [ { "id": 1, "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121" } ], "tracking_link": "https://tracking.example.com", "payment_link": "https://payment.example.com", "ads_source": null, "shopify_order_id": null, "shopify_abandon_checkout_id": 1, "is_abandoned_order": true, "cod": 0, "cash": 0, "account": 1, "account_name": "facebook321", "advanced_platform_fee": { "ads_top_up": 1, "affiliate_commission": 1, "diff_shipping_fee": 1, "marketplace_voucher": 1, "payment_fee": 1, "platform_commission": 1, "seller_transaction_fee": 1, "service_fee": 1, "sfp_service_fee": 1 }, "printing_count": 1, "money_to_collect": 1, "total_price": 1, "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857", "customer": { "fb_id": null, "id": "96a8e283-3fba-492e-a35a-970f72a30a02", "name": "Trần Văn Hoàng", "page_id": "104438181227821" }, "total_quantity": 1, "time_assign_marketer": "2024-01-01T00:00:00Z", "status_history": [ { "avatar_url": null, "editor_fb": "2042723249341651", "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "name": "Hoang Anh", "old_status": 0, "status": 1, "updated_at": "2024-01-01T00:00:00Z" } ], "duplicated_phone": true, "order_currency": "VND", "charged_by_vnpay": 1, "charged_by_qrpay": 1, "custom_id": null, "last_editor": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "fb_id": "2042723249341651", "name": "Hoang Anh", "email": "hoang@example.com", "avatar_url": null, "phone_number": "0999999999" }, "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "charged_by_momo": 1, "bank_transfer_images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "transfer_money": 1, "lock_order_by_user": null, "assigning_care": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "fb_id": "2042723249341651", "name": "Care Name", "email": "care@example.com", "avatar_url": null, "phone_number": "0999999999" }, "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "time_assign_care": "2024-01-01T00:00:00Z", "assigning_seller": { "id": "340644fc-314d-450e-a45f-33343678cab6", "fb_id": "2042723249341651", "name": "Seller Name", "email": "seller@example.com", "avatar_url": null, "phone_number": "0999999999" }, "einvoices": [], "charged_by_card": 1, "estimate_delivery_date": "2024-01-01T00:00:00Z", "order_sources": "-1", "charged_by_fundiin": 1, "surcharge": 1, "is_linked_partner": true, "call_laters": [], "last_update_status_at": "2024-01-01T00:00:00Z", "discount_by_customer_level": 1, "viewing": [], "order_returned_ids": null, "cost_surcharge": 1, "time_send_partner": "2024-01-01T00:00:00Z", "charged_by_kredivo": 1, "discount": 1, "histories": [], "duplicated_customer": true, "tax": 1, "is_from_ecommerce": true, "note_image": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "shopify_draft_order_id": null, "display_id": 1, "shop_partner_id": 1, "is_locked": true }, "returned_items": [ { "id": 1, "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "returned_quantity": 1, "discount_each_product": 1, "is_discount_percent": true } ], "returned_fee": 1, "shop_customer_id": "96a8e283-3fba-492e-a35a-970f72a30a02", "shop_id": 1, "status": 1, "status_histories": [ { "id": 1, "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "old_status": 0, "status": 1, "inserted_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ], "tags": [ 1 ], "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8" } ``` ## Partner list `GET /shops/{SHOP_ID}/partners` Get list of shipping partners ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "data": [ { "id": 1, "name": "Giao hàng tiết kiệm", "country_code": "84", "accounts": [ { "id": 46036, "name": "sonvu8910-224" } ] }, { "id": 2, "name": "EMS", "country_code": "84", "accounts": [] }, { "id": 3, "name": "VTP", "country_code": "84", "accounts": [ { "id": 10932, "name": "hà an" } ] }, { "id": 4, "name": "247 Express", "country_code": "84", "accounts": [] } ], "success": true } ``` ## Project list `GET /shops/{SHOP_ID}/projects` Get list of projects ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (Project) ```json { "data": [ { "id": 19, "image": null, "inserted_at": "2025-12-13T10:01:51", "name": "Project 1", "nodes": [ { "custom_id": null, "id": 292, "image": null, "inserted_at": "2024-03-28T04:52:28", "link_source_id": null, "name": "Source order 1", "nodes": [ { "custom_id": null, "id": 366, "image": null, "inserted_at": "2024-11-08T02:18:52", "link_source_id": null, "name": "Source order 2", "nodes": [], "parent_id": 292, "project_id": null, "shop_id": 20, "updated_at": "2025-07-02T02:52:14" } ], "parent_id": null, "project_id": 19, "shop_id": 20, "updated_at": "2025-12-13T10:02:02" } ], "shop_id": 20, "updated_at": "2025-12-13T10:01:51" } ], "success": true } ``` --- Source: https://pos.pancake.ph/developers/api/order-tag.md # Order tag > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of order tags `GET /shops/{SHOP_ID}/orders/tags` Get list of order tags ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "data": [ { "id": 75, "name": "thẻ 4", "color": "#123123", "is_system_tag": false, "groups": [ { "id": 13, "name": "nhom 1" }, { "id": 16, "name": "nhom 2" } ] }, { "id": 1, "name": "Giao không thành", "color": "#f04134", "is_system_tag": true, "groups": [ { "id": -1, "name": "Delivery Group" }, { "id": 13, "name": "nhom 1" } ] }, { "id": 2, "name": "Chờ cọc", "color": "#096dd9", "is_system_tag": true, "groups": [] } ], "success": true } ``` ## Create order tag `POST /shops/{SHOP_ID}/orders/tags` Create a new order tag ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing order tag information to create - `name` (string, required): Tag name - `tag_color` (string): Tag color code - `groups` (integer[]): List of tag group IDs. Get by API GET /shops/{SHOP_ID}/orders/tag_groups - `statuses` (integer[]): List of order statuses to apply the tag ```json { "name": "test 5.1", "tag_color": "#000", "groups": [ 1 ], "statuses": [ 1, 2, 3 ] } ``` ### Responses - `200` Success (object) ```json { "data": { "id": 50, "name": "test 5.1", "tag_color": "#000", "groups": [ 1 ], "statuses": [ 1, 2, 3 ] }, "success": true } ``` ## Update order tag `PUT /shops/{SHOP_ID}/orders/tags/{TAG_ID}` Update an order tag. Only applies to tags that are not system tags (is_system_tag = false) ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `TAG_ID` | path | integer | yes | Tag ID | ### Request body Request body containing order tag information to update - `name` (string, required): Tag name - `tag_color` (string): Tag color code - `groups` (integer[]): List of tag group IDs. Get by API GET /shops/{SHOP_ID}/orders/tag_groups - `statuses` (integer[]): List of order statuses to apply the tag ```json { "name": "test 4.4", "tag_color": "#000", "groups": [ 1, 2 ], "statuses": [ 1, 2, 3 ] } ``` ### Responses - `200` Success (object) ```json { "data": { "id": 45, "name": "test 4.4", "tag_color": "#000", "groups": [ 2, 1 ], "statuses": [ 1, 2, 3 ] }, "success": true } ``` ## List of order tag groups `GET /shops/{SHOP_ID}/orders/tag_groups` Get list of order tag groups ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "data": [ { "id": 1, "name": "nhóm 1", "add_multiple_tags": true, "tags": [ 41, 50, 45 ] } ], "success": true } ``` --- Source: https://pos.pancake.ph/developers/api/call-later.md # Call Later > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of call later and remind `GET /shops/{SHOP_ID}/order_call_laters` Get list of call later and remind ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page_number` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `key` | query | string | | Quick filter: `today` (scheduled today), `upcoming` (scheduled after today), `overdue` (scheduled before now), `completed` (successfully processed). Omit this parameter to filter only by the time range. If provided, it is combined with the time filters (AND). Values: `today`, `upcoming`, `overdue`, `completed`. | | `filter_by_time` | query | string | | Time filter as a JSON-encoded object. Send as a single query parameter (URL-encode the JSON), not nested query parameters. - `type`: `inserted_at` (creation time, default), `called_at` (processed time; excludes unprocessed reminders), or `appointment_time` (scheduled call time, field `needs_call_at`). - `start_time`, `end_time`: integer Unix timestamps in seconds (UTC), both required for the filter to apply. Both bounds are inclusive. Convert the desired local date range to Unix timestamps before sending. - `editor_ids`: array of user IDs, required when filtering by time. Use `["-1"]` for all staff. Filters by the last editor for `called_at`, otherwise by the creator. Examples below cover October 15, 2026, 00:00:00–23:59:59 in UTC+7. | | `start_needs_call` | query | integer (int64) | | Inclusive start of the scheduled call time range (`needs_call_at`), as a Unix timestamp in seconds. Must be sent with `end_needs_call`. Combined with other filters (AND). | | `end_needs_call` | query | integer (int64) | | Inclusive end of the scheduled call time range (`needs_call_at`), as a Unix timestamp in seconds. Must be sent with `start_needs_call`. | | `status` | query | integer | | Status Values: `-1` All status, `0` No process, `3` Calling / Processing, `1` Processed, `2` Not listening / Unsuccessful, `7` Removed. | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "called_at": "2024-01-30T01:54:17", "creator": { "avatar_url": null, "email": "vuson897654@gmail.com", "fb_id": "377936050731194", "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Vũ Sơn", "phone_number": null }, "display_id": 70, "id": "1885d8d4-e210-4e56-bb32-683988a032f5", "need_notify_users": [ "cee3c05e-5f85-43c4-b27e-889b99c50097" ], "needs_call_at": "2024-01-30T02:20:48", "notice_created": "Gọi lại cho khách", "order_display_id": "SOICUN-12943-02", "order_id": 106703, "status": 1, "type": "call" } ], "key": "today", "page_number": 1, "page_size": 30, "total_entries": 3, "total_pages": 1 } ``` ## Create call later and remind `POST /shops/{SHOP_ID}/order_call_laters` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing call later and remind information - `order_call_later` (object, required): - `status` (integer): Status - `need_notify_users` (string[]): Process staff - `notice_created` (string): Notice information - `needs_call_at` (string (date-time), required): Need call at - `phone_number` (string, required): Phone number - `order_ids` (string[]): Order IDs ```json { "order_call_later": { "status": 0, "need_notify_users": [ "cee3c05e-5f85-43c4-b27e-889b99c50097" ], "notice_created": "Gọi lại xác nhận", "needs_call_at": "2024-08-29T05:50:31.700Z", "phone_number": "0929911922", "order_ids": [ "106703" ] } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` --- Source: https://pos.pancake.ph/developers/api/ecommerce.md # eCommerce > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## eCommerce Platform Account `GET /shops/{SHOP_ID}/marketplace/get_account_info` Get eCommerce platform account information ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `account_id` | query | string | | Account ID | | `marketplace_id` | query | string | | Marketplace ID | | `name` | query | string | | Account name | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "1", "marketplace_id": "-3", "name": "Shopee", "shop_id": 1 } ] } ``` ## eCommerce Platform Products `GET /shops/{SHOP_ID}/marketplace/products` Get eCommerce platform products information ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | ### Responses - `200` Success (eCommerceProduct) ```json { "id": "46152996242", "linked_product_custom_id": "ANPR", "linked_product_name": "Áo nam Pari đẹp thời trang", "marketplace_id": "-3", "marketplace_shop_name": "Vũ Sơn shop", "name": "Áo nam Pari đẹp thời trang", "price": 0, "sku": "ANPR", "variations": [ { "id": "375286372857", "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2025/9/17/abad91b33fa9a051b86d415f6cf63aba00d360ac.jpg" ], "linked_product_custom_id": "ANPR", "linked_variation_custom_id": "TESTMATDOS", "linked_variation_fields": [ { "id": "2b61c249-35dc-4b79-a3aa-a173c63a8061", "keyValue": "BLUE", "name": "Màu sắcaa", "value": "blue" }, { "id": "b053dfb9-b7b6-4d8a-9fb4-197d7b0d7556", "keyValue": "L", "name": "Sizeaaa", "value": "L" } ], "linked_variation_price": 150000, "name": "blue L", "price": 165000, "quantity": 1025, "sku": "TESTMATDOS" } ], "warehouse": "Kho HN" } ``` ## Evaluation list `GET /shops/{SHOP_ID}/shopee/evaluate` Get list of evaluations on eCommerce platform ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `field_time` | query | string | | Filter evaluations by time Values: `evaluation_time` Creation time, `last_evaluation_time` Last evaluation time. | | `evaluation_time[]` | query | integer (unix)[] | | Filter time interval | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "buyer": "Vu Son", "comment": "Giao nhanh, gói cẩn thận Đúng loại và sản phẩm y như mô tả Mình mua nhiều lần rồi và rất ưng vị của shop", "create_at": "2024-08-12T08:31:22Z", "last_rating": 3, "order_id": "240806J7RNCBUB", "product": { "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2024/4/15/841a6d57f52f22176dea7a9a6fb35761c89fd4eb.jpg" ], "marketplace_product_name": "Áo thun nam form rộng 12 con giáp tuổi Sửu ATD478 Miucho Iconic cotton cổ tròn in graphic" }, "product_name": "Áo thun nam form rộng 12 con giáp tuổi Sửu ATD478 Miucho Iconic cotton cổ tròn in graphic", "rating": 5, "reply": { "hidden": false, "reply": "Cảm ơn quý khách đã mua hàng và đánh giá tốt cho shop!\nQuý khách thật tuyệt vời khi đã đặt hàng, nhận hàng và dành thời gian đánh giá tích cực.\nNếu có bất kể vấn đề gì quý khách cứ nhắn tin shop bảo đảm xử lý có lợi cho khách hàng.\nShop vô cùng cầu thị với mong muốn được phục vụ quý khách trong những đơn hàng tiếp theo.\nShop xin chúc quý khách cùng gia đình mạnh khoẻ, vui vẻ, may mắn, bình an!\n\n" }, "shop_id": 224, "variation": { "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2024/4/15/0636d7492a531270596064c3712b0e228a843c3b.jpg" ], "marketplace_sku": "ATD478-2X-CC-M" }, "marketplace": { "marketplace_shop_id": "20732730", "marketplace_shop_name": "Vũ Sơn shop" }, "marketplace_id": "-3" } ] } ``` ## List of reverse orders `GET /shops/{SHOP_ID}/marketplace/reverse_order` Get list of reverse orders on eCommerce platform ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `type_of_filter_time` | query | string | | Filter reverse orders by time Values: `inserted_at` Inserted at, `updated_at` Updated at. | | `time[]` | query | integer (unix)[] | | Filter time interval | ### Responses - `200` Success (object) ```json { "data": [ { "amount": 143834, "buyer": "phuongthaole28", "id": 21, "inserted_at": "2025-10-14T14:12:16", "items": [ { "amount": 1, "images": [ "https://cf.shopee.sg/file/4ecbb6fa567e42c1b1e02993ad53df12" ], "item_id": "ANPR", "item_price": 168630, "item_sku": "USB", "model_id": 297082992992, "name": "Áo nam Pari đẹp thời trang", "refund_amount": 143834, "variation_sku": "ANPR" } ], "marketplace_id": "-3", "marketplace_shop_name": "hoanganh230321131223", "note": null, "order_id": "2408280F4HVBQRA", "original_order": "HGL_RSO_1", "reason": "DIFFERENT_DESCRIPTION", "shop_id": 20, "status": "completed", "tracking_number": "fbjdnsdhuhwu", "updated_at": "2025-10-24T08:04:56" } ] } ``` --- Source: https://pos.pancake.ph/developers/api/livestream.md # Livestream > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of livestream sessions `GET /shops/{SHOP_ID}/livestream_manager` Get list of livestream sessions ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | ### Responses - `200` Success (LivestreamManager) ```json { "success": true, "data": [ { "creator": { "avatar_url": null, "fb_id": "101281316987922", "id": "b0097b97-8520-4a16-a89b-4ddcd76c3ec8", "name": "Trần Ngọc Hoa" }, "end_time": "2026-01-23T10:10:21", "finisher": { "avatar_url": null, "fb_id": "101281316987922", "id": "b0097b97-8520-4a16-a89b-4ddcd76c3ec8", "name": "Trần Ngọc Hoa" }, "id": "60cc3e38-f4e7-44d7-ba30-911ce398b46a", "inserted_at": "2026-01-22T12:26:13.000000", "name": "Live tối 22/1", "origin_post_id": null, "post_ids": [ "105112292515661_1080067970899442" ], "remain_warehouse_ids": [ "e2f0f8db-9937-4293-88a6-67637c6f4c25" ], "shop_id": 4, "start_time": "2026-01-22T12:31:10", "total_comments": 753, "total_customers": 262, "warehouse_id": "e2f0f8db-9937-4293-88a6-67637c6f4c25" } ], "page_number": 1, "page_size": 30, "total_entries": 1, "total_pages": 1 } ``` --- Source: https://pos.pancake.ph/developers/api/e-invoice.md # E-Invoice > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of e-invoices `GET /shops/{SHOP_ID}/list_einvoices/` Get list of e-invoices ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `account_id` | query | string | | Account ID | | `marketplace_id` | query | string | | Marketplace ID | | `name` | query | string | | Account name | | `startDate` | query | integer | | Start of creation time range (unix timestamp) | | `endDate` | query | integer | | End of creation time range (unix timestamp) | | `startDateRelease` | query | integer | | Start of release time range (unix timestamp) | | `endDateRelease` | query | integer | | End of release time range (unix timestamp) | ### Responses - `200` Success (EInvoice) ```json { "success": true, "data": [ { "actual_shipping_fee": 30000, "adjust_amount": null, "adjustment_criteria": null, "adjustment_type": null, "allocation_discounts": [], "allocation_type": 1, "bank_account_number": null, "bank_name": null, "budget_unit_code": null, "buyer_not_get_invoice": false, "creator": { "avatar_url": null, "fb_id": "377936050731194", "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Vũ Sơn" }, "discount": 100000, "display_id": 754, "einvoice_account_id": 66, "email": "acb@gmail.com", "full_name": "C. Hạnh", "id": 1656, "identity_code": null, "included_tax": 0, "invoice_no": "00000095", "invoice_series": "C25TPA", "invoice_type": 1, "is_adjust_amount": false, "is_included_tax": false, "items": [ { "adjust_amount": null, "discount": 0, "id": 3501, "is_calculation_tax": false, "is_component": false, "is_surcharge": null, "measure": null, "note": null, "order_id": 124409, "order_item_id": 70104, "quantity": 1, "retail_price": 200000, "tax": 5, "type": 1, "variation": { "custom_id": "TESTMATGREENS", "display_id": 16, "fields": [ { "id": "b8a37fc1-4479-480a-937a-e18e1a588aec", "keyValue": "RED", "name": "Màu sắcaa", "value": "red" }, { "id": "786371f1-8d23-4a45-9e83-d944892ad3ce", "keyValue": "L", "name": "Sizeaaa", "value": "L" } ], "product": { "custom_id": "ANPR", "display_id": 13038, "name": "Áo nam Pari đẹp thời trang 123" }, "product_id": "dee8f2c3-2ecc-4d9b-a9ff-603b5bde7e3d" }, "variation_id": "573e9406-07dd-44f7-9c26-28f95da9ad47", "variation_info": { "detail": "Màu sắcaa: red, Sizeaaa: L", "diff_discount": null, "discount": 10000000, "item_total_amount_with_tax": 10500000, "item_total_amount_without_tax": 10000000, "measure_info": null, "name": "Áo nam Pari đẹp thời trang 123", "product_id": "dee8f2c3-2ecc-4d9b-a9ff-603b5bde7e3d", "product_tags": [], "tax_amount": 500000, "tax_rate": 5, "unit_price": 20000000 } } ], "key_search": "KICKFUYUPUAOFF8", "last_editor_id": "d6e6a545-f102-439e-9943-8ac8369f9735", "note": null, "order_id": 124409, "order_info": { "account": null, "account_source": null, "cod": 130500, "custom_id": null, "display_id": 20456, "order_currency": "VND", "order_sources": null, "page": { "id": "117967746266487", "name": "Soicun", "username": null }, "page_id": "117967746266487", "partner": { "extend_code": null, "partner_id": 154 }, "shop_customer_id": "7869af18-f0f4-44d9-95e8-106c9731eef9", "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da" }, "original_einvoice": null, "payment_method": "TM/CK", "phone_number": "0983924977", "purchaser_tax_code": null, "purchaser_unit": null, "release_date": "2025-11-13T05:05:29.322669", "release_type": 1, "shipping_address": { "address": "123", "commnue_name": "Phường Cống Vị", "commune_id": "1010115", "country_code": "84", "district_id": "10101", "district_name": "Quận Ba Đình", "full_address": "123, Phường Cống Vị, Quận Ba Đình, Hà Nội", "full_name": "C. Hạnh", "new_full_address": "123, Hà Nội", "new_province_id": "84_VN101", "phone_number": "0983924977", "post_code": "", "province_id": "101", "province_name": "Hà Nội", "render_type": "old" }, "shipping_fee": 30000, "shop_id": 20, "signature_type": 0, "status": 2, "tax": 10, "template_code": "1", "total_amount": 130500, "verification_code": null, "voucher_book": null } ] } ``` --- Source: https://pos.pancake.ph/developers/api/auto-voice.md # Auto Voice > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Trigger auto voice call for an order `POST /shops/{SHOP_ID}/orders/{ORDER_ID}/trigger_call` Trigger an automated outbound call (Auto Voice) to the order's customer phone number and play the selected voice. Returns a background job id; the call outcome is delivered asynchronously. The SIP subscription must have the Auto Voice add-on enabled. ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `ORDER_ID` | path | string | yes | Order ID | ### Request body Request body containing the voice id to play - `voice_id` (string (uuid), required): Voice id (copied from the voice management screen) ```json { "voice_id": "3f7c2b9a-1e4d-4a2b-9c8e-2b1d0a9f6e5c" } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` --- Source: https://pos.pancake.ph/developers/api/product.md # Product > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Create product `POST /shops/{SHOP_ID}/products` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing product information to create - `product` (Product, required): - `measure_group_id` (integer): Measure group ID - `name` (string, required): Product name - `type` (string): Product type. `product`: Product (default). `accessory`: Accessory, comes with orders, has no retail price (retail price is reset to 0) and is not counted in sold quantity reports. `service`: Service, inventory is not managed. `LOT`: Product with expiry date, inventory is managed by lot and a lot must be chosen when importing or exporting stock (requires the shop to enable lot management). Values: `product`, `accessory`, `service`, `LOT`. - `category_ids` (integer[]): Category IDs - `note` (string): Internal note - `note_product` (string): Product note - `product_attributes` (object[]): Product attributes - `tags` (integer[]): Product tags - `weight` (integer, required): Product weight - `custom_id` (string): Product custom ID - `is_published` (boolean): Store cake status - `variations` (Variation[]): Product variations - `bonus_products` (object[]): Bonus products - `materials` (integer[]): Material IDs - `keyword` (string): Keyword - `brand_id` (string (uuid)): Brand ID ```json { "product": { "name": "Ao so mi nam", "type": "product", "category_ids": [ 1290021044, 201250699 ], "note_product": "Ghi chú sản phẩm", "product_attributes": [ { "name": "Màu", "values": [ "Đen", "Trắng", "Đỏ" ] }, { "name": "Size", "values": [ "S", "M", "L" ] } ], "tags": [ 193, 51 ], "variations": [ { "fields": [ { "name": "Màu", "value": "Trắng" }, { "name": "Size", "value": "M" } ], "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "last_imported_price": 30000, "retail_price": 140000, "price_at_counter": 123000, "retail_price_by_currency": [ { "currency": "VND", "retailPriceByCurrency": 140000 }, { "currency": "USD", "retailPriceByCurrency": 6 } ], "weight": 0, "barcode": "BARCODE123", "custom_id": "VCUSTOMID", "is_hidden": false, "variations_warehouses": [ { "remain_quantity": 10, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "batch_position": "lô 1", "shelf_position": "1.2" } ], "wholesale_price2": [ { "levelProduct": "1", "wholesalePrices": "100000" }, { "levelProduct": "2", "wholesalePrices": "200000" } ] } ], "weight": 1, "custom_id": "PCUSTOMID", "is_published": true, "materials": [ 182, 193 ], "bonus_products": [ { "quantity": 1, "variation_id": "61fb5d14-107d-4b78-908d-8dc04f59d2d6", "price_original": 11000, "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "variation_info": { "id": "1", "measure_group_id": "2220", "measure_info": { "exchange_value": 100000, "measure_id": 2252 }, "name": "Combo 10 cây giống Cải nhún", "product_id": "RAL10.2675", "weight": 1000 } } ], "keyword": "vai|cao cấp", "brand_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da" } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Update product information `PUT /shops/{SHOP_ID}/products/{PRODUCT_ID}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `PRODUCT_ID` | path | string | yes | Product ID | ### Request body Request body containing product information to update - `product` (Product, required): - `measure_group_id` (integer): Measure group ID - `name` (string, required): Product name - `type` (string): Product type. `product`: Product (default). `accessory`: Accessory, comes with orders, has no retail price (retail price is reset to 0) and is not counted in sold quantity reports. `service`: Service, inventory is not managed. `LOT`: Product with expiry date, inventory is managed by lot and a lot must be chosen when importing or exporting stock (requires the shop to enable lot management). Values: `product`, `accessory`, `service`, `LOT`. - `category_ids` (integer[]): Category IDs - `note` (string): Internal note - `note_product` (string): Product note - `product_attributes` (object[]): Product attributes - `tags` (integer[]): Product tags - `weight` (integer, required): Product weight - `custom_id` (string): Product custom ID - `is_published` (boolean): Store cake status - `variations` (Variation[]): Product variations - `bonus_products` (object[]): Bonus products - `materials` (integer[]): Material IDs - `keyword` (string): Keyword - `brand_id` (string (uuid)): Brand ID ```json { "product": { "name": "Ao so mi nam", "type": "product", "category_ids": [ 1290021044, 201250699 ], "note_product": "Ghi chú sản phẩm", "product_attributes": [ { "name": "Màu", "values": [ "Đen", "Trắng", "Đỏ" ] }, { "name": "Size", "values": [ "S", "M", "L" ] } ], "variations": [ { "id": "3c3aca82-030e-4708-a75b-b2eaf538a2f5", "fields": [ { "name": "Màu", "value": "Trắng" }, { "name": "Size", "value": "M" } ], "images": [], "last_imported_price": 30000, "retail_price": 140000, "price_at_counter": 123000, "retail_price_by_currency": [ { "currency": "VND", "retailPriceByCurrency": 140000 }, { "currency": "USD", "retailPriceByCurrency": 6 } ], "weight": 0, "barcode": "BARCODE123", "custom_id": "VCUSTOMID", "is_hidden": false, "variations_warehouses": [ { "remain_quantity": 10, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "batch_position": "lô 1", "shelf_position": "1.2" } ], "wholesale_price2": [ { "levelProduct": "1", "wholesalePrices": "100000" }, { "levelProduct": "2", "wholesalePrices": "200000" } ] }, { "fields": [ { "name": "Màu", "value": "Đỏ" }, { "name": "Size", "value": "L" } ], "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "last_imported_price": 30000, "retail_price": 140000, "price_at_counter": 123000, "retail_price_by_currency": [ { "currency": "VND", "retailPriceByCurrency": 140000 }, { "currency": "USD", "retailPriceByCurrency": 6 } ], "weight": 0, "barcode": "BARCODE123", "custom_id": "VCUSTOMID2", "is_hidden": false, "variations_warehouses": [ { "remain_quantity": 10, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "batch_position": "lô 1", "shelf_position": "1.2" } ], "wholesale_price2": [ { "levelProduct": "1", "wholesalePrices": "100000" }, { "levelProduct": "2", "wholesalePrices": "200000" } ] } ], "weight": 1, "custom_id": "PCUSTOMID", "is_published": true, "tags": [ 193, 51 ], "materials": [ 182, 193 ], "bonus_products": [ { "quantity": 1, "variation_id": "61fb5d14-107d-4b78-908d-8dc04f59d2d6", "price_original": 11000, "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "variation_info": { "id": "1", "measure_group_id": "2220", "measure_info": { "exchange_value": 100000, "measure_id": 2252 }, "name": "Combo 10 cây giống Cải nhún", "product_id": "RAL10.2675", "weight": 1000 } } ], "keyword": "vai|cao cấp" } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Update inventory `POST /shops/{SHOP_ID}/variations/{VARIATION_ID}/update_quantity` Update inventory quantity for a variation ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `VARIATION_ID` | path | string | yes | Variation ID | ### Request body Request body containing inventory update information for a variation - `variations_warehouses` (object[], required): Warehouse info - `remain_quantity` (integer, required): Remain quantity - `warehouse_id` (string, required): Warehouse ID ```json { "variations_warehouses": [ { "remain_quantity": 20, "warehouse_id": "a41b5d73-9236-4a5d-9954-4db6d93242d1" }, { "remain_quantity": 20, "warehouse_id": "a41b5d73-9236-4a5d-9954-4db6d93242d4" }, { "remain_quantity": 20, "warehouse_id": "a41b5d73-9236-4a5d-9954-4db6d93242d5" } ] } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Updated inventory of many variations `POST /shops/{SHOP_ID}/variations/update_quantity` Update inventory quantity for multiple variations ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing inventory update information for multiple variations - `is_actual_remain_quantity` (boolean): true: Update inventory, false: Update sellable quantity - `variations_warehouses` (object[], required): Variations warehouses information - `variation_id` (string, required): Variation ID - `remain_quantity` (integer, required): Remain quantity - `warehouse_id` (string, required): Warehouse ID ```json { "is_actual_remain_quantity": true, "variations_warehouses": [ { "variation_id": "20e7d183-c70c-445e-8ce2-4d7e3a378e34", "remain_quantity": 15, "warehouse_id": "229102e4-39c3-4523-bd57-4ed0a45a85ba" }, { "variation_id": "5f0cfb8d-aee9-4ec0-9ff0-b5668d3143d2", "remain_quantity": 15, "warehouse_id": "24c4447e-c35f-4acc-affa-70e49eb354d1" } ] } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Update composite product `POST /shops/{SHOP_ID}/variations/update_composite_product` Update composite product information ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing composite product update information - `variation_id` (string, required): Variation ID - `composite_products` (object[], required): Composite products - `quantity` (integer, required): Composite quantity - `component_id` (string, required): Composite variation ID ```json { "variation_id": "79aecce9-3b1e-4ad3-afe1-2ee658720687", "composite_products": [ { "quantity": 1, "component_id": "67b19856-3226-457e-a746-df26e4ec1360" } ] } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Product list `GET /shops/{SHOP_ID}/products/variations` Get list of products and variations, including per-warehouse stock, selling speed (for low-stock detection), and suppliers. ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page_size` | query | integer | | Page size | | `page_number` | query | integer | | Page number | | `search` | query | string | | Search keyword | | `selling_status` | query | string | | Selling speed Values: `none` Testing, `bad` Sell slow, `normal` Normal, `star` Sell fast. | | `product_status` | query | string | | Product status Values: `locked` Deactive, `not_locked` Active. | | `category_id[]` | query | integer[] | | Category IDs | | `is_filter_categories_by_or` | query | boolean | | Filter category by "or" condition | | `filter_exclude_categories` | query | boolean | | Filter exclude category | | `warehouse_until` | query | string (date-time) | | Get inventory information at time | | `promotion_advance[]` | query | string[] | | Promotion advance ID | | `manipulationWarehouse[]` | query | string[] | | Manipulation warehouse ID | | `startDate` | query | integer | | Product creation start time | | `endDate` | query | integer | | Product creation end time | | `start_time_update` | query | integer | | Product update start time | | `end_time_update` | query | integer | | Product update end time | | `included_composite` | query | string | | Filter composite products Values: `parent` Product is composed of other products, `children` Composite product for other products, `false` No filter. | | `variation_ids[]` | query | string[] | | Filter by variation ID | | `product_attributes[]` | query | string[] | | Filter by product attribute | | `remainQuantity` | query | string | | Filter variations by **remaining (sellable) quantity** (`remain_quantity`). JSON-encoded object: - `type`: `"greaterOrEqual"` \| `"smallerOrEqual"` \| `"between"` - `value`: threshold for `greaterOrEqual` / `smallerOrEqual` - `minValue`, `maxValue`: range for `between` - `warehouseId`: `"all"` \| a warehouse UUID \| array of UUIDs — restricts which warehouses participate - `isFilterTotal`: `false` (default) compares per-warehouse; `true` compares SUM across the selected warehouses When any quantity filter (`remainQuantity` / `actualQuantity` / `waittingQuantity` / `returningQuantity` / `pendingQuantity` / `totalQuantity`) is set, response variations include a `warehouse_ids` array listing the warehouses that matched. | | `actualQuantity` | query | string | | Filter variations by **actual on-hand quantity** (`actual_remain_quantity`). Same JSON shape as `remainQuantity`. | | `waittingQuantity` | query | string | | Filter variations by **waiting/pending-to-ship quantity** (`waitting_quantity`). Same JSON shape as `remainQuantity`. (Note: param name keeps the `waitt-` spelling for backward compatibility with existing clients.) | | `returningQuantity` | query | string | | Filter variations by **quantity in return process** (`returning_quantity`). Same JSON shape as `remainQuantity`. | | `pendingQuantity` | query | string | | Filter variations by **reserved/pending quantity** (`pending_quantity`). Same JSON shape as `remainQuantity`. | | `totalQuantity` | query | string | | Filter variations by **total quantity** (`total_quantity`). Same JSON shape as `remainQuantity`. | | `limit_quantity_to_warn` | query | boolean | | When `true`, return only products whose remaining stock has reached the per-product warning threshold — i.e. **"running out of stock"**. The threshold is configured per-product (`limit_quantity_to_warn` on Product or Variation, depending on the product's `warning_by_variation` setting). | | `defectQuantity` | query | boolean | | When `true`, return only variations that have **damaged/defective stock** (`defect_quantity > 0` in at least one warehouse). | | `nearly_out` | query | boolean | | When `true`, return only variations flagged as **nearly out of stock** in at least one warehouse (the precomputed `nearly_out` flag on the warehouse row). Similar to `limit_quantity_to_warn` but reads the stored per-warehouse flag instead of recomputing the threshold at query time. | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "average_imported_price": 50000, "barcode": null, "display_id": "ADXL", "is_hidden": false, "is_locked": false, "is_sell_negative_variation": true, "fields": [ { "id": "b032c515-3f71-4a1b-8e1d-77721ae72f37", "name": "màu", "value": "nâu" }, { "id": "677c14b5-458f-4af6-8d73-08bcb2245547", "name": "size", "value": "s" } ], "id": "e190db2b-1163-4cc3-b956-7a9528fbf5ef", "images": [ "https://cf.shopee.vn/file/03e670d02803fcfbb17b2b719762ee17", "https://cf.shopee.vn/file/9070bb1b0e6fcc84b46b6e5057544023" ], "inserted_at": "2024-01-10T14:34:44.000000", "last_imported_price": 55000, "price_at_counter": 123000, "product_id": "3b98a639-9d40-4faa-a692-6662f20e128d", "product": { "note": "Dễ vỡ", "note_product": "Ghi chú sản phẩm", "categories": [], "display_id": "ADXL", "image": "https://content.pancake.vn/user-content-dev2.pancake.vn/2024/11/7/1fdf82943574017240257bf9c88bc70a06a8813a.png", "inserted_at": "2024-01-10T14:34:44", "measure_group_id": 58, "name": "ASOS đen XL", "supplier_product_ids": [ 270 ], "tags": [ { "id": 51, "note": "the 3" }, { "id": 193, "note": "thẻ 1" } ], "is_published": true, "manipulation_warehouses": [ "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da" ], "product_attributes": [ { "name": "Color", "values": [ "black", "white" ] }, { "name": "Size", "values": [ "S", "M" ] } ], "bonus_products": [ { "quantity": 1, "variation_id": "61fb5d14-107d-4b78-908d-8dc04f59d2d6", "price_original": 11000, "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "variation_info": { "id": "1", "measure_group_id": "2220", "measure_info": { "exchange_value": 100000, "measure_id": 2252 }, "name": "Combo 10 cây giống Cải nhún", "product_id": "RAL10.2675", "weight": 1000 } } ] }, "remain_quantity": 20, "retail_price": 140000, "retail_price_by_currency": [ { "currency": "VND", "retailPriceByCurrency": "140000" }, { "currency": "USD", "retailPriceByCurrency": "6" } ], "size": { "length": 10, "width": 10, "height": 10 }, "total_purchase_price": 4500000, "variations_warehouses": [ { "actual_remain_quantity": 100, "pending_quantity": 0, "remain_quantity": 20, "returning_quantity": 0, "selling_avg": 0.23, "total_quantity": 102, "warehouse_id": "a41b5d73-9236-4a5d-9954-4db6d93242d1" } ], "wholesale_price": [], "price_table": [ { "id": "a07c-3f7b-2db0-8002-6a88-7d4c-e7c3", "name": "Giá bán sỉ", "price": 200000 }, { "id": "2251-43fa-9de5-765f-89ab-7246-c67b", "name": "Giá bán lẻ", "price": 150000 } ], "keyword": "ANPR", "updated_at": "2026-03-09T01:45:58.013616" } ], "page_number": 1, "page_size": 30, "total_entries": 751, "total_pages": 26 } ``` ## Get product information `GET /shops/{SHOP_ID}/products/{PRODUCT_SKU}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `PRODUCT_SKU` | path | string | yes | Product SKU or ID | ### Responses - `200` Success (Product) ```json { "measure_group_id": 58, "name": "Ao so mi nam", "category_ids": [ 1290021044, 201250699 ], "note": "dễ vỡ", "note_product": "Ghi chú sản phẩm", "product_attributes": [ { "name": "Color", "values": [ "black", "white" ] }, { "name": "Size", "values": [ "s", "m" ] } ], "tags": [ 193, 51 ], "weight": 1, "custom_id": "PCUSTOMID", "is_published": true, "variations": [ { "id": null, "fields": [ { "name": "Màu", "value": "Trắng" }, { "name": "Size", "value": "M" } ], "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "last_imported_price": 30000, "retail_price": 140000, "retail_price_by_currency": [ { "currency": "VND", "retailPriceByCurrency": "140000" }, { "currency": "USD", "retailPriceByCurrency": "6" } ], "price_at_counter": 123000, "weight": 0, "size": { "length": 10, "width": 10, "height": 10 }, "barcode": "BARCODE123", "custom_id": "VCUSTOMID", "is_hidden": false, "variations_warehouses": [ { "remain_quantity": 10, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "batch_position": "lô 1", "shelf_position": "1.2" } ], "is_removed": false, "keyword": "VCUSTOMID" } ], "variations_warehouses": [ { "remain_quantity": 10, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "batch_position": "lô 1", "shelf_position": "1.2" } ], "materials": [ 182, 193 ], "bonus_products": [ { "quantity": 1, "variation_id": "61fb5d14-107d-4b78-908d-8dc04f59d2d6", "price_original": 11000, "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "variation_info": { "id": "1", "measure_group_id": "2220", "measure_info": { "exchange_value": 100000, "measure_id": 2252 }, "name": "Combo 10 cây giống Cải nhún", "product_id": "RAL10.2675", "weight": 1000 } } ], "keyword": "vai|cao cấp" } ``` ## Hide product `PUT /shops/{SHOP_ID}/products/update_hide` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing product hide/show information - `is_hide` (boolean, required): Hide product - `product_ids` (string[], required): Product IDs ```json { "is_hide": true, "product_ids": [ "3cbf2227-0205-446e-8c0e-584995f3cb23", "36b1e64c-f1f7-4518-afeb-1f9d2edc0f3e" ] } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Product tags `GET /shops/{SHOP_ID}/tags_products` Get list of product tags (removed tags are excluded), sorted by index ascending ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": 358, "index": 0, "inserted_at": "2025-07-15T10:38:48", "updated_at": "2025-07-15T14:43:16", "note": "Hàng dễ vỡ", "shop_id": 224 }, { "id": 359, "index": 1, "inserted_at": "2025-07-15T11:05:21", "updated_at": "2025-07-15T14:43:16", "note": "Hàng mới về", "shop_id": 224 } ] } ``` ## Create product tag `POST /shops/{SHOP_ID}/tags_products` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing product tag information to create - `name` (string, required): Tag name ```json { "name": "Sản phẩm dễ vỡ" } ``` ### Responses - `200` Success (object) ```json { "success": true, "data": { "id": 368, "index": null, "inserted_at": "2025-09-19T10:26:38", "note": "Sản phẩm dễ vỡ", "shop_id": 20, "updated_at": "2025-09-19T10:26:38" } } ``` ## Product categories `GET /shops/{SHOP_ID}/categories` Get list of product categories ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": 865301, "nodes": [], "text": "AirSense Áo Khoác Siêu Nhẹ" }, { "id": 30163, "nodes": [ { "id": 30167, "nodes": [], "text": "Áo Thun" }, { "id": 30169, "nodes": [ { "id": 865293, "nodes": [], "text": "Áo Thun In Họa Tiết" } ], "text": "Áo Cardigan" }, { "id": 865292, "nodes": [], "text": "Áo Nỉ & Áo Hoodie" } ], "text": "ÁO" } ] } ``` ## Create product category `POST /shops/{SHOP_ID}/categories` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing product category information to create - `name` (string, required): Category name - `parent_id` (string): Parent category ID ```json { "name": "Sản phẩm dễ vỡ", "parent_id": 30163 } ``` ### Responses - `200` Success (Category) ```json { "success": true, "data": { "id": 3299, "name": "Sản phẩm dễ vỡ" } } ``` ## Product brand list `GET /shops/{SHOP_ID}/brand` Get list of product brands ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `search` | query | string | | Search by brand name or brand ID | ### Responses - `200` Success (object) ```json { "data": [ { "id": "921f6676-4103-4b63-8503-78737fa74d11", "name": "Movado", "description": "Brand of Viet Nam", "inserted_at": "2025-09-05T08:43:54", "updated_at": "2025-09-05T08:43:54", "shop_id": 2044252, "display_id": 170 } ] } ``` ## Product material `GET /shops/{SHOP_ID}/materials_products` Get list of product materials ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "description": "cao cấp", "id": 180, "name": "vai", "nodes": [ { "description": "chất liệu bò", "id": 181, "name": "vải bò", "nodes": [] } ] } ] } ``` ## List of measure groups `GET /shops/{SHOP_ID}/product_measurements/get_measure` Get list of measure groups ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": 58, "name": "Nước hoa 1", "nodes": [ { "exchange_value": 30, "id": 61, "is_default": false, "name": "30 ml", "parent_id": 58 } ], "shop_id": 20 } ] } ``` --- Source: https://pos.pancake.ph/developers/api/combo.md # Combo > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Combo list `GET /shops/{SHOP_ID}/combo_products` Get list of combo products ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [] } ``` ## Create combo `POST /shops/{SHOP_ID}/combo_products` Create combo product ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing combo product information to create - `combo_product` (object, required): - `name` (string, required): Combo name - `currency` (string): Currency - `start_time` (integer): Start time - `end_time` (integer): End time - `order_sources` (object[]): Order sources - `order_types` (string[], required): Order types - `livestream_manager_ids` (string[]): Livestream manager IDs - `is_value_combo` (boolean, required): Discount type (true: combo value / false: discount combo) - `value_combo` (integer): Combo value - `is_use_percent` (boolean, required): Discount by percent - `discount_amount` (integer): Discount value - `discount_by_percent` (integer): Percentage discount - `max_discount_by_percent` (integer): Maximum discount value - `is_free_shipping` (boolean): Is free shipping - `bonus_products` (object[]): Bonus products - `is_variation` (boolean, required): Apply to variation (true) / Apply to product (false) - `variations` (object[]): Applicable variation information - `is_categories` (boolean): Apply to category - `categories` (object[]): Applicable categories ```json { "combo_product": { "name": "Combo 1", "currency": "VND", "start_time": 1745946000, "end_time": 1746637199, "order_sources": [ { "key": "-3", "account": null }, { "key": "-1", "account": "406" } ], "order_types": [ "all" ], "is_value_combo": false, "value_combo": 0, "is_use_percent": false, "discount_amount": 100000, "discount_by_percent": 5, "max_discount_by_percent": 100000, "is_free_shipping": false, "is_variation": true, "variations": [ { "count": 1, "product_id": "0cffd0a6-0a06-4471-a139-cf81aa1fcc6f", "variation_id": "821e1337-a04b-473a-b07c-805a572c465a" } ] } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` --- Source: https://pos.pancake.ph/developers/api/lot.md # Lot > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Lot list (expiry date) `GET /shops/{SHOP_ID}/lots` Get the list of expiry-date lots of products (products with type `LOT`). Each lot has a lot code (`custom_id`), manufacturing date and expiry date, and is linked to one or more variations of the product via `lot_variations`. Datetime values (`expire_date`, `manufacturing_date`, ...) are in UTC. ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `search` | query | string | | Search by lot code, product code/display ID or variation code/display ID | | `warehouse_ids[]` | query | string[] | | Filter lots that have stock records in these warehouses (lots without any stock record are still returned) | | `remain_quantity` | query | string | | Filter by sellable quantity of the lot, JSON with fields: - `type`: `greaterOrEqual` \| `smallerOrEqual` \| `between` - `value`: quantity (for `greaterOrEqual` / `smallerOrEqual`) - `minValue`, `maxValue`: range (for `between`) - `warehouseId`: warehouse ID, `all` for all warehouses - `isFilterTotal`: `true` to compare the total across warehouses, otherwise compare each warehouse record | | `actual_remain_quantity` | query | string | | Filter by stock (quantity physically on hand) of the lot, same JSON format as `remain_quantity` | | `min_retail_price` | query | integer | | Filter lots having a linked variation with retail price greater than or equal to this value | | `max_retail_price` | query | integer | | Filter lots having a linked variation with retail price less than or equal to this value | | `expiry_date` | query | string | | Filter by expiry date, only lots that still have sellable stock (`remain_quantity > 0`) in at least one warehouse are returned: - `in_date`: not expired yet - `out_of_date`: already expired - JSON `{"start_date": , "end_date": }`: expiry date within the range (unix timestamp in seconds) | | `range` | query | string | | Filter by time range, JSON `{"key": ..., "since": , "until": }` (unix timestamp in seconds, `until` defaults to now). `key`: - `inserted_at`: by created time (default) - `manufacturing`: by manufacturing date - `expire`: by expiry date | | `sort_field` | query | string | | Sort, JSON `{"field": ..., "order": "ascend" \| "descend"}`. `field`: `mfg` (manufacturing date), `exp` (expiry date), `inserted_at` (created time), `updated_at` (updated time). Default: expiry date descending, then created time descending | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "d0e4a4b0-0c6d-4dc1-8252-447bba021b3e", "custom_id": "LO-XA", "expire_date": "2027-10-11T17:00:00", "manufacturing_date": "2026-10-11T17:00:00", "inserted_at": "2026-10-12T07:35:10.000000", "updated_at": "2026-10-12T07:35:10.000000", "product": { "id": "da9b9e28-af65-4456-916e-ac8f8eb00334", "name": "TEST6972#2", "type": "LOT", "image": null, "tags": [], "custom_id": "SP-L", "display_id": 13721, "bonus_products": [], "brand_id": null, "creator_id": "84616be7-7a6b-4f58-af37-2c64d9ee04a9", "inserted_at": "2026-10-12T07:29:45", "is_published": true, "is_sell_negative": null, "limit_quantity_to_warn": 0, "limit_quantity_to_warn_by_warehouse": null, "manipulation_warehouses": [], "materials": [], "measure_group_id": null, "note": null, "note_product": "", "product_attributes": [], "supplier_product_ids": [], "warning_by_variation": false, "categories": [] }, "lot_variations": [ { "id": "a560ac18-8d5b-46ef-82f6-bf1474ad1c8f", "variation_id": "daf62728-ae6f-4354-94e4-4a12855c4293", "inserted_at": "2026-10-12T07:35:10.000000", "updated_at": "2026-10-12T07:35:10.000000" } ] } ], "page_number": 1, "page_size": 30, "total_entries": 1, "total_pages": 1 } ``` --- Source: https://pos.pancake.ph/developers/api/warehouse.md # Warehouse > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Warehouse list `GET /shops/{SHOP_ID}/warehouses` Get list of warehouses ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "data": [ { "id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "name": "kho test ecod", "address": "hâhhha", "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu", "phone_number": "0999999999", "province_id": "717", "district_id": "71705", "commune_id": "7170510", "country_code": "84", "shop_id": 26290, "allow_create_order": true, "custom_id": null, "affiliate_shop_id": 26290, "affiliate_warehouse": "Kho gia dụng" }, { "id": "644b0063-e9a8-43cd-ba08-66a8066d462e", "name": "kho 2", "address": "19/349 Minh Khai , Hai bà Trưng, Hà Nội", "full_address": "19/349 Minh Khai , Hai bà Trưng, Hà Nội, Phường Minh Khai, Quận Hai Bà Trưng, Hà Nội", "phone_number": "01655809949", "province_id": "101", "district_id": "10107", "commune_id": "1010735", "country_code": "84", "shop_id": 26290, "allow_create_order": false, "custom_id": null }, { "id": "3cfcf3ab-dd77-4237-862f-356b3506fe8a", "name": "kho địa chỉ mới", "address": "34234234", "full_address": "34234234, Xã Cao Đức, Bắc Ninh", "phone_number": "0989965976", "province_id": "84_VN102", "district_id": null, "commune_id": "84_VN10236", "country_code": "84", "shop_id": 26290, "allow_create_order": true, "custom_id": null } ] } ``` ## Create warehouse `POST /shops/{SHOP_ID}/warehouses` Create warehouses ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing warehouse information to create - `name` (string, required): Warehouse name - `address` (string): Warehouse address - `phone_number` (string): Warehouse phone number - `province_id` (string): Province ID. Get by API GET /geo/provinces - `district_id` (string): District ID. Get by API GET /geo/districts - `commune_id` (string): Commune ID. Get by API GET /geo/communes - `country_code` (string): Country code - `shelf_config` (object, required): Shelf config - `col` (string): Column - `batch_config` (object): Batch config - `col` (string): Column - `line` (string): Line - `row` (string): Row - `custom_shelf_config` (object): Custom shelf config - `custom_config` (object): Custom config - `custom_batch_config` (object): Custom batch config - `custom_config` (object): Custom config - `hide_config_batch_shelf` (boolean): Open custom batch shelf config ```json { "name": "kho 2", "address": "19/349 Minh Khai , Hai bà Trưng, Hà Nội", "phone_number": "098765432", "province_id": "101", "district_id": "10107", "commune_id": "1010735", "country_code": "84", "shelf_config": { "col": "3" }, "batch_config": { "col": "0", "line": "3", "row": "3" }, "custom_batch_config": { "custom_config": { "0": "lô 1" } }, "custom_shelf_config": { "custom_config": { "0": "1.1", "1": "1.2", "2": "1.3", "3": "1.4" } }, "hide_config_batch_shelf": false } ``` ### Responses - `200` Success (Warehouse) ```json { "id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "name": "kho test ecod", "address": "hâhhha", "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu", "phone_number": "0999999999", "province_id": "717", "district_id": "71705", "commune_id": "7170510", "country_code": "84", "shop_id": 26290, "allow_create_order": true, "custom_id": null } ``` ## Update warehouse `PUT /shops/{SHOP_ID}/warehouses/{WAREHOUSE_ID}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `WAREHOUSE_ID` | path | string | yes | Warehouse ID | ### Request body Request body containing warehouse information to update - `name` (string, required): Warehouse name - `address` (string): Warehouse address - `phone_number` (string): Warehouse phone number - `province_id` (string): Province ID. Get by API GET /geo/provinces - `district_id` (string): District ID. Get by API GET /geo/districts - `commune_id` (string): Commune ID. Get by API GET /geo/communes - `country_code` (string): Country code - `shelf_config` (object, required): Shelf config - `col` (string): Column - `batch_config` (object): Batch config - `col` (string): Column - `line` (string): Line - `row` (string): Row - `custom_shelf_config` (object): Custom shelf config - `custom_config` (object): Custom config - `custom_batch_config` (object): Custom batch config - `custom_config` (object): Custom config - `hide_config_batch_shelf` (boolean): Open custom batch shelf config ```json { "name": "Kho mặc định", "address": "190 La Thành", "phone_number": "0366452565", "province_id": "101", "district_id": "10113", "commune_id": "1011309", "country_code": "84", "shelf_config": { "col": "3" }, "batch_config": { "col": "0", "line": "3", "row": "3" }, "custom_batch_config": { "custom_config": { "0": "lô 1" } }, "custom_shelf_config": { "custom_config": { "0": "1.1", "1": "1.2", "2": "1.3", "3": "1.4" } }, "hide_config_batch_shelf": false } ``` ### Responses - `200` Success (Warehouse) ```json { "id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "name": "kho test ecod", "address": "SCB", "full_address": "SCB, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu", "phone_number": "0999999999", "province_id": "717", "district_id": "71705", "commune_id": "7170510", "country_code": "84", "shop_id": 26290, "allow_create_order": true, "custom_id": null } ``` ## Inventory histories `GET /shops/{SHOP_ID}/inventory_histories` Get inventory history ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | yes | Page number | | `page_size` | query | integer | yes | Page size | | `warehouse_id` | query | string | | Warehouse ID | | `variation_ids[]` | query | string[] | | Variation IDs | | `startDate` | query | integer | | Start date (unix timestamp) | | `endDate` | query | integer | | End date (unix timestamp) | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "avg_price": 1, "current_inventory": [ { "actual_remain_quantity": 1, "avg_price": 1, "id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "name": "kho test ecod", "remain_quantity": 1, "total_quantity": 1 } ], "editor_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "id": 1, "inserted_at": "2024-01-01T00:00:00Z", "quantity": 1, "ref_display_id": "12345", "remain_quantity": 1, "table_name": "Purchase", "type": "import", "variation_now": { "barcode": "BARCODE123", "display_id": "13109", "fields": [ { "id": "field-id-1", "keyValue": "Màu", "name": "Màu", "value": "Trắng" } ], "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7", "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg" ], "is_hidden": true, "is_locked": true, "is_sell_negative_variation": true, "last_imported_price": 1, "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9", "retail_price": 1, "weight": 1 }, "warehouse": { "custom_id": null, "ffm_id": null, "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu", "id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8", "name": "kho test ecod", "phone_number": "0999999999" } } ] } ``` --- Source: https://pos.pancake.ph/developers/api/purchase.md # Purchase > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of purchases `GET /shops/{SHOP_ID}/purchases` Get list of purchases ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `status` | query | integer | | Status Values: `-2` All status, `-1` New, `0` Confirmed, `1` Imported goods, `2` Canceled. | | `type` | query | string | | Type | | `get_time_import` | query | boolean | | Get time import | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "96bbc665-3fd5-4efc-9d8a-0110ecfa1754", "display_id": 6392, "status": 0, "time_import": "2025-12-02T07:41:50.363889", "total_quantity": 1, "total_remain_quantity": 1, "total_price": 200000, "total_remain_price": 200000, "note": "nhập kho sản phẩm", "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "supplier_products_id": 293, "supplier": { "id": 724, "name": "CT TNHH Hồng Hà", "custom_id": "HH" }, "discount": 10000, "transport_fee": 10000, "prepaid_debt": 100000, "auto_create_debts": true, "not_create_transaction": true, "is_lock": null, "created_type": "actual_purchase", "tags": [ 1 ], "tag_info": [ { "id": 1, "name": "Nhập hàng để bán" } ], "items": [ { "id": "02cb1ff3-9b21-4e1c-9288-a29c16bd907d", "imported_price": 200000, "gross_price": 200000, "discount": 10000, "quantity": 1, "variation_id": "20e7d183-c70c-445e-8ce2-4d7e3a378e34", "product_name": "Áo nam", "note_purchase": "áo nam thời trang", "selling_status": "bad", "variation": { "id": "69416fa6-4c3d-451f-897d-9faa0420c060", "display_id": "mauma1", "barcode": "mauma1", "product_id": "f210413c-dc84-45e5-b722-9dc72ff7c9af", "retail_price": 10000, "retail_price_after_discount": 10000, "remain_quantity": 9, "weight": 0, "product": { "display_id": "Áo nam", "name": "Áo nam" }, "variations_warehouses": [] } } ], "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2022/7/7/eb376f0bf90f47d25396d49e4d547700f182981b.jpg" ], "bill_images": [], "user_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "user": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Vũ Sơn", "fb_id": "377936050731194", "avatar_url": null }, "inserted_at": "2023-09-20T02:21:51Z", "updated_at": "2023-09-20T02:22:05Z", "received_at": "2023-09-21T00:00:00Z", "separate_by_display_ids": null } ] } ``` ## Create purchase `POST /shops/{SHOP_ID}/purchases` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing purchase information to create - `purchase` (object, required): - `note` (string): Note - `status` (integer, required): Status - `not_create_transaction` (boolean): Not create transaction - `auto_create_debts` (boolean): Auto create debts - `supplier_products_id` (integer): Supplier products ID - `shop_id` (integer): Shop ID - `warehouse_id` (string, required): Warehouse ID - `change_received_at` (boolean): Change received at - `received_at` (integer): Received at (unix timestamp) - `images` (string (uri)[]): Purchase images - `items` (object[], required): List of products ```json { "purchase": { "note": "", "status": 1, "not_create_transaction": false, "auto_create_debts": true, "supplier_products_id": 169, "shop_id": 20, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "change_received_at": true, "received_at": 1651683600, "images": [ "https://statics.pancake.vn/user-content-dev2.pancake.vn/2021/12/27/18c4500c320cb2e993b3ff4b3be81165df64d3ba.png" ], "items": [ { "imported_price": 100000, "gross_price": 100000, "discount": 10000, "quantity": 1, "variation_id": "29044dcf-2f4c-492f-a0a9-e447b20e21da", "index": 0 } ] } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Get purchase `GET /shops/{SHOP_ID}/purchases/{PURCHASE_ID}` Get one purchase by ID or display ID, in the same shape as an item of the purchase list. Purchases in warehouses the caller cannot view are reported as not found. ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `PURCHASE_ID` | path | string | yes | Purchase ID (UUID) or display ID | ### Responses - `200` Success (object) - `404` The purchase does not exist or is not visible to the caller (ErrorResponse) ```json { "success": true, "data": { "id": "96bbc665-3fd5-4efc-9d8a-0110ecfa1754", "display_id": 6392, "status": 0, "time_import": "2025-12-02T07:41:50.363889", "total_quantity": 1, "total_remain_quantity": 1, "total_price": 200000, "total_remain_price": 200000, "note": "nhập kho sản phẩm", "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "supplier_products_id": 293, "supplier": { "id": 724, "name": "CT TNHH Hồng Hà", "custom_id": "HH" }, "discount": 10000, "transport_fee": 10000, "prepaid_debt": 100000, "auto_create_debts": true, "not_create_transaction": true, "is_lock": null, "created_type": "actual_purchase", "tags": [ 1 ], "tag_info": [ { "id": 1, "name": "Nhập hàng để bán" } ], "items": [ { "id": "02cb1ff3-9b21-4e1c-9288-a29c16bd907d", "imported_price": 200000, "gross_price": 200000, "discount": 10000, "quantity": 1, "variation_id": "20e7d183-c70c-445e-8ce2-4d7e3a378e34", "product_name": "Áo nam", "note_purchase": "áo nam thời trang", "selling_status": "bad", "variation": { "id": "69416fa6-4c3d-451f-897d-9faa0420c060", "display_id": "mauma1", "barcode": "mauma1", "product_id": "f210413c-dc84-45e5-b722-9dc72ff7c9af", "retail_price": 10000, "retail_price_after_discount": 10000, "remain_quantity": 9, "weight": 0, "product": { "display_id": "Áo nam", "name": "Áo nam" }, "variations_warehouses": [] } } ], "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2022/7/7/eb376f0bf90f47d25396d49e4d547700f182981b.jpg" ], "bill_images": [], "user_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "user": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Vũ Sơn", "fb_id": "377936050731194", "avatar_url": null }, "inserted_at": "2023-09-20T02:21:51Z", "updated_at": "2023-09-20T02:22:05Z", "received_at": "2023-09-21T00:00:00Z", "separate_by_display_ids": null } } ``` ## Update purchase `PUT /shops/{SHOP_ID}/purchases/{PURCHASE_ID}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `PURCHASE_ID` | path | string | yes | Purchase ID | ### Request body Request body containing purchase information to update - `purchase` (object, required): - `note` (string): Note - `status` (integer): Status Values: `-1` New, `0` Confirmed, `1` Imported goods, `2` Canceled. - `not_create_transaction` (boolean): Not create transaction - `auto_create_debts` (boolean): Auto create debts - `supplier_products_id` (integer): Supplier products ID - `warehouse_id` (string, required): Warehouse ID - `change_received_at` (boolean): Change received at - `received_at` (integer): Received at - `images` (string (uri)[]): Purchase images - `items` (object[]): List of products ```json { "purchase": { "note": "", "status": 1, "not_create_transaction": false, "auto_create_debts": true, "supplier_products_id": 169, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "change_received_at": true, "received_at": 1651683600, "images": [ "https://statics.pancake.vn/user-content-dev2.pancake.vn/2021/12/27/18c4500c320cb2e993b3ff4b3be81165df64d3ba.png" ], "items": [ { "imported_price": 100000, "quantity": 1, "variation_id": "29044dcf-2f4c-492f-a0a9-e447b20e21da" } ] } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Separate purchase `POST /shops/{SHOP_ID}/purchases/separate` Separate a purchase into multiple purchases ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing purchase separation information - `newPurchase` (object, required): New purchase information - `auto_create_debts` (boolean): Auto create debts - `discount` (integer): Discount - `images` (string (uri)[]): Purchase images - `items` (object[]): List of products - `not_create_transaction` (boolean): Not create transaction - `note` (string): Note - `prepaid_debt` (integer): Prepaid debt - `received_at` (integer): Received at - `status` (integer): Status - `supplier_products_id` (integer): Supplier products ID - `tags` (integer[]): Tag IDs - `transport_fee` (integer): Shipping fee - `warehouse_id` (string): Warehouse ID - `oldPurchase` (object, required): Old purchase information - `id` (string, required): Purchase ID - `auto_create_debts` (boolean): Auto create debts - `discount` (integer): Discount - `images` (string (uri)[]): Purchase images - `items` (object[]): List of products - `not_create_transaction` (boolean): Not create transaction - `note` (string): Note - `prepaid_debt` (integer): Prepaid debt - `received_at` (integer): Received at - `status` (integer): Status - `supplier_products_id` (integer): Supplier products ID - `tags` (integer[]): Tag IDs - `transport_fee` (integer): Shipping fee - `warehouse_id` (string): Warehouse ID ```json { "newPurchase": { "auto_create_debts": true, "discount": 500, "images": [ "https://statics.pancake.vn/user-content-dev2.pancake.vn/2021/12/27/18c4500c320cb2e993b3ff4b3be81165df64d3ba.png" ], "items": [ { "imported_price": 100000, "quantity": 1, "variation_id": "ddefd476-bc91-4151-8cd2-2cf5ad227f09", "index": 0 } ], "not_create_transaction": false, "note": "Tách phiếu nhập", "prepaid_debt": 20000, "received_at": 1683997200, "status": 0, "supplier_products_id": 293, "tags": [ 1 ], "transport_fee": 0, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da" }, "oldPurchase": { "auto_create_debts": true, "discount": 500, "id": "0ecbdb3b-a376-4a3d-9b8a-174ae15ae886", "images": [ "https://statics.pancake.vn/user-content-dev2.pancake.vn/2021/12/27/18c4500c320cb2e993b3ff4b3be81165df64d3ba.png" ], "items": [ { "imported_price": 100000, "quantity": 23, "variation_id": "ddefd476-bc91-4151-8cd2-2cf5ad227f09", "index": 0 } ], "not_create_transaction": false, "note": "Nhập hàng để bán", "prepaid_debt": 20000, "received_at": 1683997200, "status": 0, "supplier_products_id": 293, "tags": [ 1 ], "transport_fee": 0, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da" } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` --- Source: https://pos.pancake.ph/developers/api/export.md # Export > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of exports `GET /shops/{SHOP_ID}/export` Get list of exports ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `status` | query | integer | | Status Values: `-1` All status, `0` New, `1` Completed, `2` Canceled. | | `type` | query | integer | | Type of export Values: `0` Normal export, `1` Product defect export. | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "8095ca3c-a485-4378-9914-5013e1179d55", "display_id": 472, "status": 0, "type": 0, "total": 1, "total_price": 0, "note": "Xuất bán hàng", "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "supplier_products_id": 400037328, "tags": [ 1 ], "export_items": [ { "id": "78dfe47a-a3dd-4d47-8f8b-16eb1ccd69ee", "imported_price": 0, "quantity": 1, "variation_id": "76887a5b-8a27-472c-a15a-661ea59434dd", "display_id": 0, "inserted_at": "2024-01-25T16:18:20Z" } ], "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2022/7/7/eb376f0bf90f47d25396d49e4d547700f182981b.jpg" ], "user_id": "d6e6a545-f102-439e-9943-8ac8369f9735", "user": { "id": "d6e6a545-f102-439e-9943-8ac8369f9735", "name": "vudzung12", "fb_id": "1286585024855632", "avatar_url": null }, "inserted_at": "2024-01-25T16:18:20Z", "updated_at": "2024-01-25T16:18:20Z" } ] } ``` ## Create export `POST /shops/{SHOP_ID}/export` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing export information to create - `export_list` (object, required): - `note` (string): Note - `supplier_products_id` (integer): Supplier products ID - `tags` (integer[]): Export tags - `status` (integer, required): Export status Values: `0` New (type 0) / Defect export (type 1), `1` Completed (type 0) / Elimination export (type 1), `2` Canceled. - `type` (integer): Type of export Values: `0` Normal export, `1` Product defect export. - `shop_id` (integer): Shop ID - `warehouse_id` (string, required): Warehouse ID - `change_inserted_at` (boolean): Change date of create export - `inserted_at` (integer): Date of create export (unix timestamp) - `images` (string (uri)[]): Export images - `export_items` (object[], required): List of products ```json { "export_list": { "note": "", "supplier_products_id": 169, "tags": [ 1 ], "status": 0, "type": 0, "shop_id": 20, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "change_inserted_at": true, "inserted_at": 1651683600, "images": [ "https://statics.pancake.vn/user-content-dev2.pancake.vn/2021/12/27/18c4500c320cb2e993b3ff4b3be81165df64d3ba.png" ], "export_items": [ { "id": "13d7ddf6-4cd9-4e1f-a5c1-ac3cd7a7fc17", "imported_price": 100000, "quantity": 1, "variation_id": "29044dcf-2f4c-492f-a0a9-e447b20e21da" } ] } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Get export `GET /shops/{SHOP_ID}/export/{EXPORT_ID}` Get one export by ID or display ID, in the same shape as an item of the export list. Exports in warehouses the caller cannot view are reported as not found. ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `EXPORT_ID` | path | string | yes | Export ID (UUID) or display ID | ### Responses - `200` Success (object) - `404` The export does not exist or is not visible to the caller (ErrorResponse) ```json { "success": true, "data": { "id": "8095ca3c-a485-4378-9914-5013e1179d55", "display_id": 472, "status": 0, "type": 0, "total": 1, "total_price": 0, "note": "Xuất bán hàng", "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "supplier_products_id": 400037328, "tags": [ 1 ], "export_items": [ { "id": "78dfe47a-a3dd-4d47-8f8b-16eb1ccd69ee", "imported_price": 0, "quantity": 1, "variation_id": "76887a5b-8a27-472c-a15a-661ea59434dd", "display_id": 0, "inserted_at": "2024-01-25T16:18:20Z" } ], "user_id": "d6e6a545-f102-439e-9943-8ac8369f9735", "inserted_at": "2024-01-25T16:18:20Z", "updated_at": "2024-01-25T16:18:20Z" } } ``` ## Update export `PUT /shops/{SHOP_ID}/export/{EXPORT_ID}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `EXPORT_ID` | path | string | yes | Export ID | ### Request body Request body containing export information to create - `export_list` (object, required): - `images` (string (uri)[]): Export images - `inserted_at` (integer): Date of create export (unix timestamp) - `note` (string): Note - `status` (integer): Export status Values: `0` New (type 0) / Defect export (type 1), `1` Completed (type 0) / Elimination export (type 1), `2` Canceled. - `supplier_products_id` (integer): Supplier products ID - `tags` (integer[]): Export tags - `type` (integer): Type of export Values: `0` Normal export, `1` Product defect export. - `export_items` (object[]): List of products ```json { "export_list": { "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2022/5/27/ee3be79d1574735ed35539ca48f7f6e9d7137706.jpg" ], "inserted_at": 1695142800, "note": "xuất bán hàng", "status": 0, "supplier_products_id": 319, "tags": [ 1 ], "export_items": [ { "id": "13d7ddf6-4cd9-4e1f-a5c1-ac3cd7a7fc17", "imported_price": 1000, "quantity": 1, "variation_id": "d1e522eb-2f6f-4d22-b8a1-ec25df4a33a4" } ] } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` --- Source: https://pos.pancake.ph/developers/api/warehouse-transfer.md # Warehouse Transfer > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of warehouse transfers `GET /shops/{SHOP_ID}/transfers` Get list of warehouse transfers ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `status` | query | integer | | Status Values: `0` Waiting for pick up, `1` Shipping, `2` Completed. | | `startDate` | query | integer | | Start date | | `endDate` | query | integer | | End date | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "5c9ef4a6-2411-4d5f-9a91-1bc22dbb7eb1", "display_id": 309, "status": 0, "from_warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "from_warehouse_name": "Kho HCM", "to_warehouse_id": "229102e4-39c3-4523-bd57-4ed0a45a85ba", "to_warehouse_name": "Cho tao cơm", "total_quantity": 1, "shipping_fee": 30000, "note": "Chuyển kho bán hàng", "items": [ { "id": "f80bdc16-a000-4bf1-a979-c3fd4033f551", "variation_id": "3b11fb7b-9081-42c0-9546-dfac62b9c9ca", "quantity": 3, "product_display_id": "áo nam", "product_name": "áo nam", "variation_display_id": "XANH-M", "variation_fields": [ { "id": "beb75502-5a50-48d6-bed8-89ea8ddc9a66", "name": "màu", "value": "xanh dương", "keyValue": "xanh dương" }, { "id": "8eee6f85-0a76-46da-9dd7-6668bc6d8729", "name": "size", "value": "M", "keyValue": "M" } ] } ], "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2022/7/7/eb376f0bf90f47d25396d49e4d547700f182981b.jpg" ], "shop_id": 20, "creator_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "inserted_at": "2023-09-13T09:34:37Z", "updated_status_at": "2023-09-13T09:34:37Z" } ] } ``` ## Create warehouse transfer `POST /shops/{SHOP_ID}/transfers/multi` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing warehouse transfer information to create - `transfer` (object, required): - `from_warehouse_id` (string, required): From warehouse ID - `to_warehouse_ids` (string[], required): To warehouse IDs - `shipping_fee` (integer): Shipping fee - `note` (string): Note - `images` (string (uri)[]): Transfer images - `inserted_at` (string (date-time)): Inserted at - `items` (object[], required): List of products ```json { "transfer": { "from_warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "to_warehouse_ids": [ "229102e4-39c3-4523-bd57-4ed0a45a85ba" ], "shipping_fee": 20000, "items": [ { "quantity": 1, "variation_id": "20e7d183-c70c-445e-8ce2-4d7e3a378e34" } ], "note": "đây là ghi chú", "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2022/5/27/ee3be79d1574735ed35539ca48f7f6e9d7137706.jpg" ], "inserted_at": "2025-03-11T09:24:42" } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Get warehouse transfer `GET /shops/{SHOP_ID}/transfers/{TRANSFER_ID}` Get one warehouse transfer by ID or display ID, in the same shape as an item of the warehouse transfer list. A transfer is visible when the caller can view transfers in its source or destination warehouse; otherwise it is reported as not found. ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `TRANSFER_ID` | path | string | yes | Warehouse transfer ID (UUID) or display ID | ### Responses - `200` Success (object) - `404` The warehouse transfer does not exist or is not visible to the caller (ErrorResponse) ```json { "success": true, "data": { "id": "5c9ef4a6-2411-4d5f-9a91-1bc22dbb7eb1", "display_id": 309, "status": 0, "from_warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "from_warehouse_name": "Kho HCM", "to_warehouse_id": "229102e4-39c3-4523-bd57-4ed0a45a85ba", "to_warehouse_name": "Cho tao cơm", "total_quantity": 1, "shipping_fee": 30000, "note": "Chuyển kho bán hàng", "items": [ { "id": "f80bdc16-a000-4bf1-a979-c3fd4033f551", "variation_id": "3b11fb7b-9081-42c0-9546-dfac62b9c9ca", "quantity": 3, "product_display_id": "áo nam", "product_name": "áo nam", "variation_display_id": "XANH-M", "variation_fields": [ { "id": "beb75502-5a50-48d6-bed8-89ea8ddc9a66", "name": "màu", "value": "xanh dương", "keyValue": "xanh dương" }, { "id": "8eee6f85-0a76-46da-9dd7-6668bc6d8729", "name": "size", "value": "M", "keyValue": "M" } ] } ], "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2022/7/7/eb376f0bf90f47d25396d49e4d547700f182981b.jpg" ], "shop_id": 20, "creator_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "inserted_at": "2023-09-13T09:34:37Z", "updated_status_at": "2023-09-13T09:34:37Z" } } ``` ## Update warehouse transfer `PUT /shops/{SHOP_ID}/transfers/{TRANSFER_ID}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `TRANSFER_ID` | path | string | yes | Transfer ID | ### Request body Request body containing warehouse transfer information to update - `transfer` (object, required): - `status` (integer, required): Status Values: `0` Waiting for pick up, `1` Shipping, `2` Completed. - `from_warehouse_id` (string, required): From warehouse ID - `shipping_fee` (integer): Shipping fee - `note` (string): Note - `images` (string (uri)[]): Transfer images - `inserted_at` (string (date-time)): Inserted at - `change_inserted_at` (boolean): Change creation time - `items` (object[]): List of products ```json { "transfer": { "status": 1, "from_warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "shipping_fee": 10000, "items": [ { "variation_id": "51bb0bb7-77e9-407e-9f57-5072a0236cb4", "quantity": 1 } ], "note": "Chuyển kho bán hàng", "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2024/8/30/7886ccd76d3629808d21fa3e59849c8e79a28162.png" ], "inserted_at": "2025-03-11T09:24:42", "change_inserted_at": true } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## History of warehouse transfer status updates `GET /shops/{SHOP_ID}/transfers/get_status_history/{TRANSFER_ID}` Get history of warehouse transfer status updates ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `TRANSFER_ID` | path | string | yes | Transfer ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "4c961f28-9a1c-11f0-9d68-0242ac1a000a", "old_status": 0, "status": 1, "transfer_id": "ed386c72-ba0c-4b2a-85dd-c8b1903badc2", "updated_at": "2025-09-25T14:31:18Z", "user_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "user": { "avatar_url": null, "fb_id": "377936050731194", "name": "Vũ Sơn" } } ] } ``` --- Source: https://pos.pancake.ph/developers/api/stocktaking.md # Stocktaking > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Stocktaking list `GET /shops/{SHOP_ID}/stocktakings` Get list of stocktakings ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `status` | query | integer | | Status Values: `-2` All status, `-1` Creating, `0` Stocktaking, `1` Stocktook, `2` Canceled. | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "4d0f479d-feab-489b-bc82-4a656902a20b", "display_id": null, "status": 0, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "stocktaking_by": "category_ids", "stocktaking_by_value": [ "1315" ], "stocktaking_at": "2023-10-11T08:24:56Z", "progress": 0, "note": "Kiểm hàng tồn", "items": [ { "id": "cb244b25-100e-4eaa-8b8f-0e72c5642631", "variation_id": "27b3f94b-c945-4560-b694-a59526cae9a5", "changed_quantity": 12, "current_quantity": 0, "note": null, "variation": { "id": "27b3f94b-c945-4560-b694-a59526cae9a5", "display_id": "1", "barcode": "12ml-6291107458328", "product_id": "61894c4f-d759-45b7-acf7-ff5e88082016", "retail_price": 240000, "last_imported_price": 20000, "weight": 1000, "fields": [], "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2023/4/12/05138842c6f772cde332fd8e1be1bff58245f19e.png" ], "product": { "display_id": "12ml-6291107458328", "name": "12ml Badee Al Oud", "image": null, "note_product": "" } }, "inserted_at": "2024-12-02T10:42:39Z", "updated_at": "2024-12-02T10:42:39Z" } ], "shop_id": 20, "creator_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "inserted_at": "2023-10-11T08:25:18Z", "updated_at": "2023-10-11T09:03:03Z", "updated_status_at": "2023-10-11T08:25:18Z" } ] } ``` ## Create stocktaking `POST /shops/{SHOP_ID}/stocktakings` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing stocktaking information to create - `stocktaking` (object, required): - `warehouse_id` (string, required): Warehouse ID - `items` (object[], required): List of products - `note` (string): Note - `status` (integer, required): Status - `inserted_at` (string (date-time)): Inserted at - `stocktaking_at` (string (date-time)): Stocktaking at - `stocktaking_by` (string): Stocktaking by - `stocktaking_by_value` (string[]): Category ID / Supplier products ID / Brand ID ```json { "stocktaking": { "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "items": [ { "variation_id": "20e7d183-c70c-445e-8ce2-4d7e3a378e34", "changed_quantity": -1 } ], "note": "Kiểm hàng tồn", "status": 0, "inserted_at": "2025-04-04T10:42:40.100Z", "stocktaking_at": "2023-10-11T10:38:34.542Z", "stocktaking_by": "category_ids", "stocktaking_by_value": [ "1315" ] } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Get stocktaking information `GET /shops/{SHOP_ID}/stocktakings/{STOCKTAKING_ID}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `STOCKTAKING_ID` | path | string | yes | Stocktaking ID | ### Responses - `200` Success (object) ```json { "success": true, "data": { "id": "4d0f479d-feab-489b-bc82-4a656902a20b", "display_id": null, "status": 0, "warehouse_id": "c52e67ad-d9d0-4276-abe4-e0c9f1f7d2da", "stocktaking_by": "category_ids", "stocktaking_by_value": [ "1315" ], "stocktaking_at": "2023-10-11T08:24:56Z", "progress": 0, "note": "Kiểm hàng tồn", "items": [ { "id": "cb244b25-100e-4eaa-8b8f-0e72c5642631", "variation_id": "27b3f94b-c945-4560-b694-a59526cae9a5", "changed_quantity": 12, "current_quantity": 0, "note": null, "variation": { "id": "27b3f94b-c945-4560-b694-a59526cae9a5", "display_id": "1", "barcode": "12ml-6291107458328", "product_id": "61894c4f-d759-45b7-acf7-ff5e88082016", "retail_price": 240000, "last_imported_price": 20000, "weight": 1000, "fields": [], "images": [ "https://statics.pancake.vn/user-content.pancake.vn/2023/4/12/05138842c6f772cde332fd8e1be1bff58245f19e.png" ], "product": { "display_id": "12ml-6291107458328", "name": "12ml Badee Al Oud", "image": null, "note_product": "" } }, "inserted_at": "2024-12-02T10:42:39Z", "updated_at": "2024-12-02T10:42:39Z" } ], "shop_id": 20, "creator_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "inserted_at": "2023-10-11T08:25:18Z", "updated_at": "2023-10-11T09:03:03Z", "updated_status_at": "2023-10-11T08:25:18Z" } } ``` ## Update stocktaking `PUT /shops/{SHOP_ID}/stocktakings/{STOCKTAKING_ID}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `STOCKTAKING_ID` | path | string | yes | Stocktaking ID | ### Request body Request body containing stocktaking information to update - `stocktaking` (object, required): - `items` (object[]): List of products - `note` (string): Note - `status` (integer): Status - `stocktaking_at` (string (date-time)): Stocktaking at - `stocktaking_by` (string): Stocktaking by - `stocktaking_by_value` (string[]): Category ID / Supplier products ID / Brand ID ```json { "stocktaking": { "items": [ { "id": "cb244b25-100e-4eaa-8b8f-0e72c5642631", "variation_id": "27b3f94b-c945-4560-b694-a59526cae9a5", "changed_quantity": 12, "note": null } ], "note": "Kiểm hàng tồn", "status": 0, "stocktaking_at": "2023-10-11T10:38:34", "stocktaking_by": "category_ids", "stocktaking_by_value": [ "1315" ] } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` --- Source: https://pos.pancake.ph/developers/api/supplier.md # Supplier > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Supplier list `GET /shops/{SHOP_ID}/supplier` Get list of suppliers ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "address": "90 cầu giấy", "commune_id": "1011309", "country_code": 84, "custom_id": "HH", "debt_must_pay": "88334", "description": null, "district_id": "10113", "full_address": "90 cầu giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội", "id": 988, "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2025/7/9/8029d570d92ca81812c6ed59465fe75db042e7f9.png" ], "is_activated": true, "name": "CT TNHH Hồng Hà", "payment_info": { "account_name": "THANG LONG", "account_number": "123456789", "partner_code": "CTG" }, "phone_number": "0983239908", "province_id": "101", "tags": [ 5 ], "total_purchase": "344444", "type": 0 } ] } ``` --- Source: https://pos.pancake.ph/developers/api/customer.md # Customer > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Customer list `GET /shops/{SHOP_ID}/customers` Get list of customers ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page_size` | query | integer | | Page size | | `page_number` | query | integer | | Page number | | `search` | query | string | | Search keyword | | `start_time_inserted_at` | query | integer | | Start time inserted | | `end_time_inserted_at` | query | integer | | End time inserted | | `start_time_updated_at` | query | integer | | Start time updated | | `end_time_updated_at` | query | integer | | End time updated | | `customer_ids` | query | string | | Customer IDs (comma-separated) | | `selectedLevel[]` | query | string[] | | Customer level IDs | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "b0110315-b102-436b-8b3b-ed8d16740327", "name": "Trần Văn Hoàng", "gender": "male", "emails": [ "thudo@gmail.com" ], "phone_numbers": [ "0999999999" ], "date_of_birth": "1999-09-01", "reward_point": 10, "is_discount_by_level": true, "tags": [], "is_block": false, "assigned_user_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "level_id": null, "notes": [], "shop_customer_address": [ { "id": "0fefd213-7d0c-4d5b-bdbf-35694da80857", "country_code": null, "province_id": "101", "district_id": "10101", "commune_id": null, "address": "lê văn lương", "full_address": "lê văn lương, Quận Ba Đình, Hà Nội", "full_name": "test", "phone_number": "0999999999" } ], "order_count": 108, "purchased_amount": 0, "succeed_order_count": 8, "last_order_at": "2020-04-01T10:18:41Z", "conversation_link": "https://pancake.vn/2284322048329488?customer_id=fc0dda4f-8d2a-4e70-a34a-7a6a434c6475", "referral_code": "1nw4geGA", "fb_id": null, "customer_id": "96a8e283-3fba-492e-a35a-970f72a30a02", "pages_customers": [ { "id": 256469571170000, "name": "Clonners", "platform": "facebook" } ] } ] } ``` ## Create customer `POST /shops/{SHOP_ID}/customers` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing customer information to create - `name` (string, required): Customer name - `phoneNumber` (string, required): Phone number - `createType` (string): Create type - `dateOfBirth` (string (date)): Date of birth - `last_order_at` (integer): Last order timestamp - `shop_customer_address` (object[]): Customer addresses - `full_address` (string): Full address - `full_name` (string): Full name - `phone_number` (string): Phone number ```json { "name": "Hoang", "phoneNumber": "0909090909", "createType": "force", "dateOfBirth": "1995-02-01", "last_order_at": 1715878800, "shop_customer_address": [ { "full_address": "190, phường dịch vọng, cầu giấy, hà nội", "full_name": "hoang", "phone_number": "0972868874" }, { "full_address": "190, Mỹ đình 2, Nam từ liêm, hà nội", "full_name": "hoang", "phone_number": "0972868875" } ] } ``` ### Responses - `200` Success (object) ```json { "success": true, "data": { "id": "9e749e68-142f-4587-a3b1-70279c30b5c2", "name": "Nguyen Van Hoang", "gender": null, "emails": [], "phone_numbers": [ "0903924956" ], "date_of_birth": "1995-02-01", "reward_point": 0, "is_discount_by_level": true, "tags": [], "is_block": false, "assigned_user_id": "e4cec6de-96fa-4c16-9523-07910ddfee8e", "level_id": null, "notes": [], "shop_customer_address": [ { "id": "deeb419a-e7b6-42fd-9684-52ec6a72a41a", "country_code": 84, "province_id": null, "district_id": null, "commune_id": null, "address": null, "full_address": null, "full_name": null, "phone_number": "0903924956" } ], "order_count": 0, "purchased_amount": 0, "succeed_order_count": 0, "last_order_at": "2024-05-16T17:00:00Z", "conversation_link": null, "referral_code": "gqo7ulKf", "fb_id": null, "customer_id": "5b717afb-1856-48c9-9b6e-b8ac9db7d520" } } ``` ## Customer detail `GET /shops/{SHOP_ID}/customers/{CUSTOMER_ID}` Get detail information of a customer ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `CUSTOMER_ID` | path | string | yes | Customer ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "b0110315-b102-436b-8b3b-ed8d16740327", "name": "Trần Văn Hoàng", "gender": "male", "emails": [ "thudo@gmail.com" ], "phone_numbers": [ "0999999999" ], "date_of_birth": "1999-09-01", "reward_point": 10, "is_discount_by_level": true, "tags": [], "is_block": false, "assigned_user_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "level_id": null, "notes": [], "shop_customer_address": [ { "id": "0fefd213-7d0c-4d5b-bdbf-35694da80857", "country_code": null, "province_id": "101", "district_id": "10101", "commune_id": null, "address": "lê văn lương", "full_address": "lê văn lương, Quận Ba Đình, Hà Nội", "full_name": "test", "phone_number": "0999999999" } ], "order_count": 108, "purchased_amount": 0, "succeed_order_count": 8, "last_order_at": "2020-04-01T10:18:41Z", "conversation_link": "https://pancake.vn/2284322048329488?customer_id=fc0dda4f-8d2a-4e70-a34a-7a6a434c6475", "referral_code": "1nw4geGA", "fb_id": null, "customer_id": "96a8e283-3fba-492e-a35a-970f72a30a02", "pages_customers": [ { "id": 256469571170000, "name": "Clonners", "platform": "facebook" } ] } ] } ``` ## Update customer `PUT /shops/{SHOP_ID}/customers/{CUSTOMER_ID}` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `CUSTOMER_ID` | path | string | yes | Customer ID | ### Request body Request body containing customer information to update - `customer` (Customer, required): - `id` (string): Customer ID - `name` (string): Full name - `gender` (string): Gender - `emails` (string[]): Email addresses - `phone_numbers` (string[]): Phone numbers - `pages_customers` (object[]): Customer's linked pages - `date_of_birth` (string (date)): Date of birth - `reward_point` (number): Reward point - `is_discount_by_level` (boolean): Discount based on level - `tags` (string[]): Customer tags - `is_block` (boolean): Block customer - `assigned_user_id` (string): Assigned employee ID - `level_id` (string): Customer level ID - `notes` (object[]): Customer notes - `shop_customer_address` (object[]): Customer addresses - `order_count` (integer): Order count - `purchased_amount` (integer): Purchased amount - `succeed_order_count` (integer): Succeed order count - `last_order_at` (string (date-time)): Last order at - `conversation_link` (string (uri)): Conversation link - `referral_code` (string): Referral code - `fb_id` (string): Facebook ID - `customer_id` (string): Customer ID ```json { "customer": { "name": "Nguyễn Thị Hằng", "gender": "female", "emails": [ "pancake@gmail.com", "hoang@gmail.com" ], "phone_numbers": [ "0983925966" ], "date_of_birth": "1995-03-04", "reward_point": 20, "is_discount_by_level": false, "tags": [ "Hay hoàn" ], "is_block": false, "assigned_user_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "level_id": "f8dced06-965d-4070-a765-dd8268373f1e", "notes": [ { "id": "8a6f5380-4674-44e9-aaf2-40d898d460f5", "message": "Khách hàng thân thiết", "images": [ { "url": "https://content.pancake.vn/user-content-dev2.pancake.vn/2023/9/6/655ae9172118ba9ffde16fa129a7001a392d1fff.png" } ] } ], "shop_customer_address": [ { "id": "df631f21-3841-4d1c-8204-b85a7ecfce0c", "country_code": 84, "province_id": "101", "district_id": "10113", "commune_id": "1011309", "address": "190 Cầu Giấy", "full_name": "sơn", "phone_number": "0972868874" } ], "order_count": 7, "purchased_amount": 1000000 } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Customer reward point history `GET /shops/{SHOP_ID}/customers/point_logs` Get reward point history for a customer ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `shop_customer_id` | query | string | yes | Customer ID | | `page_size` | query | integer | | Page size | | `page_number` | query | integer | | Page number | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "amount": 10, "creator": { "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8", "name": "Hoang Anh", "fb_id": "2042723249341651", "avatar_url": null }, "current_point": 100, "inserted_at": "2024-01-01T00:00:00Z", "note": "Tích điểm từ đơn hàng" } ] } ``` ## Create promotions by customer `POST /shops/{SHOP_ID}/promotion_advance/create_multi` Create promotions for specific customers ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing promotion information to create for customers - `promotion_advance` (object, required): - `promotion` (object, required): - `shop_customer_ids` (string[], required): Customer IDs to apply ```json { "promotion_advance": { "promotion": { "start_time": "2024-09-30T04:58:30.020Z", "end_time": "2024-10-30T04:58:30.020Z", "warehouse_ids": [], "customer_tags": [], "type": "discount_by_coupon_id", "is_activated": true, "promo_code_info": { "discount": 5, "is_percent": true, "max_discount_by_percent": 100000, "disable": false, "order_price_min": 2000000, "order_price_max": 3000000, "no_applied_products_in_other_promotions": true, "discount_after_other_discount": true } }, "shop_customer_ids": [ "a8c1113d-55c2-4f7e-b33a-d4ecd76668fd" ] } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## List of notes `GET /shops/{SHOP_ID}/customers/{CUSTOMER_ID}/load_customer_notes` Get list of customer notes ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `CUSTOMER_ID` | path | string | yes | Customer ID | ### Responses - `200` Success (object) ```json { "customer_notes": [ { "notes": [ { "id": "8a6f5380-4674-44e9-aaf2-40d898d460f5", "message": "Khách hàng thân thiết", "images": [ { "url": "https://content.pancake.vn/user-content-dev2.pancake.vn/2023/9/6/655ae9172118ba9ffde16fa129a7001a392d1fff.png" } ], "created_at": 1693987200, "updated_at": 1693987200, "order_id": "116947", "created_by": { "uid": "cee3c05e-5f85-43c4-b27e-889b99c50097", "fb_id": "377936050731194", "fb_name": "Vũ Sơn" }, "edit_history": [] } ] } ] } ``` ## Add note `POST /shops/{SHOP_ID}/customers/{CUSTOMER_ID}/create_note` Add a note to customer ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `CUSTOMER_ID` | path | string | yes | Customer ID | ### Request body Request body containing customer note information - `conversation_id` (string): Conversation ID - `page_id` (string): Page ID - `message` (string): Note content - `images` (object[]): Note image information - `url` (string (uri)): Image URL - `preview_url` (string (uri)): Preview URL - `name` (string): Image name - `image_data` (object): - `order_id` (integer): Order ID ```json { "conversation_id": "117967746266487_9306266852780716", "page_id": "117967746266487", "message": "khách hàng mua nhiều lần", "images": [ { "image_data": { "height": 225, "width": 225 }, "name": "iship thai.jpeg", "preview_url": "https://content.pancake.vn/user-content-dev2.pancake.vn/2025/2/25/2488ecb12514520d9828390f695abc9db69a1452.jpg", "url": "https://content.pancake.vn/user-content-dev2.pancake.vn/2025/2/25/2488ecb12514520d9828390f695abc9db69a1452.jpg" } ], "order_id": 116947 } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Customer level list `GET /shops/{SHOP_ID}/customer_levels` Get list of customer levels ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `search` | query | string | | Customer level name | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "84fdef8b-8e4b-44e7-8d61-8553ee7f5833", "name": "cap 1", "color_customer_level": "#87d068", "discount": 5, "discount_type": 3, "shop_id": 20, "upgrade_by_order_count": 10, "upgrade_by_point": 100, "upgrade_by_total_purchase": 30000000 } ] } ``` --- Source: https://pos.pancake.ph/developers/api/promotion.md # Promotion > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Get promotion product list `GET /shops/{SHOP_ID}/promotion_advance` Get list of promotions ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `textSearch` | query | string | | Text search | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "260a0d45-ba88-457b-8b31-afa3fda0ce0e", "display_id": 50, "name": "km 345", "type": "discount_by_product", "start_time": "2022-03-10T05:04:11Z", "end_time": "2022-03-11T05:04:13Z", "warehouse_ids": [], "customer_tags": [], "order_sources": [], "group_name": "Nhóm 1", "is_activated": true, "is_variation": true, "is_used": null, "is_free_shipping": false, "is_discount_in_birthday_customer": false, "coupon_info": { "discount": 0, "is_percent": false }, "promo_code_info": { "discount": 0, "is_percent": false, "max_discount_by_percent": 0 }, "discount_by_quantity": 1, "items": [ { "id": "bd11e48a-6fec-4e3a-a1b7-8ef834a98dae", "promotion_advance_id": "260a0d45-ba88-457b-8b31-afa3fda0ce0e", "shop_id": 3, "product_id": null, "variation_id": "2f3aea54-5c0c-44db-9f9b-2c987c298795", "category_id": null, "product": null, "variation": { "id": "2f3aea54-5c0c-44db-9f9b-2c987c298795", "display_id": "SB21-M-DEN", "product_id": "d6d13d0b-320e-4651-a368-de2c9e30ae66", "retail_price": 250000, "retail_price_after_discount": 238000 }, "level_info": [ { "discount": 30000, "is_percent": false, "from_quantity": 1, "to_quantity": 4 } ], "fixed_prices": 0, "coupon_item_info": { "discount": 0, "is_percent": false }, "limited_quantity": 0, "limited_quantity_used": 0, "attachment_product_info": [], "discount_info_by_attachment_product": null } ], "bonus_items": [], "total_quantity_bonus": 0, "arr_level_promotion": [], "level_order_prices": [], "priority_level": null, "type_employee": "all", "post_ids": [], "shop_id": 3, "creator_id": "4eab0efc-2994-4b96-acf0-e4c847668555", "inserted_at": "2022-03-10T05:04:33Z", "updated_at": "2022-04-08T08:14:58Z" } ] } ``` ## Create promotion product `POST /shops/{SHOP_ID}/promotion_advance` Create promotion ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing promotion information to create - `promotion_advance` (object, required): - `name` (string, required): Promotion name - `start_time` (integer): Start time - `end_time` (integer): End time - `warehouse_ids` (string[]): Warehouse IDs - `customer_tags` (string[]): Customer tags - `order_sources` (object[]): Order sources - `type` (string, required): Promotion type Values: `discount_by_product`, `discount_by_order_price`, `fixed_prices`, `coupon`, `double_reward_point`, `discount_by_coupon_id`, `discount_by_attachment_products`. - `group_name` (string): Promotion group - `is_activated` (boolean): Is activated - `is_variation` (boolean): Is variation - `coupon_info` (object): Coupon information - `promo_code_info` (object): Promotion code information - `items` (object[]): Promotion items - `is_free_shipping` (boolean): Is free shipping - `discount_by_quantity` (integer): Discount by quantity - `bonus_items` (object[]): Bonus items - `is_discount_in_birthday_customer` (boolean): Is discount in birthday customer - `arr_level_promotion` (object[]): Level promotion array - `total_quantity_bonus` (integer): Total quantity bonus - `priority_level` (integer): Priority level - `type_employee` (string): Type employee - `free_products` (object[]): Free products ```json { "promotion_advance": { "name": "string", "type": "discount_by_product" } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Update promotion product `PUT /shops/{SHOP_ID}/promotion_advance/{PROMOTION_ID}` Update promotion ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `PROMOTION_ID` | path | string | yes | Promotion ID | ### Request body Request body containing promotion information to update - `promotion_advance` (Promotion, required): - `id` (string): Promotion ID - `display_id` (string): Promotion display ID - `name` (string): Promotion name - `type` (string): Promotion type - `start_time` (string (date-time)): Start time - `end_time` (string (date-time)): End time - `warehouse_ids` (string[]): Warehouse IDs - `customer_tags` (string[]): Customer tags - `order_sources` (object[]): Order sources - `group_name` (string): Promotion group - `is_activated` (boolean): Is activated - `is_variation` (boolean): Is variation - `is_used` (boolean): Is used - `is_free_shipping` (boolean): Is free shipping - `is_discount_in_birthday_customer` (boolean): Is discount in birthday customer - `coupon_info` (object): Coupon information - `promo_code_info` (object): Promotion code information - `discount_by_quantity` (integer): Discount by quantity - `items` (object[]): List of promotion items (products/variations the promotion applies to) - `bonus_items` (object[]): Bonus items - `total_quantity_bonus` (integer): Total quantity bonus - `arr_level_promotion` (object[]): Level promotion array - `level_order_prices` (object[]): Level order prices - `priority_level` (integer): Priority level - `type_employee` (string): Type employee - `post_ids` (string[]): Post IDs - `shop_id` (integer): Shop ID - `creator_id` (string): Creator ID - `inserted_at` (string (date-time)): Inserted at - `updated_at` (string (date-time)): Updated at ```json { "promotion_advance": { "id": "string", "display_id": "string", "name": "string", "type": "string", "start_time": "2026-01-01T00:00:00Z", "end_time": "2026-01-01T00:00:00Z" } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Activate/Deactivate/Delete promotions `POST /shops/{SHOP_ID}/promotion_advance/delete_multi` Activate, deactivate or delete multiple promotions ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing promotion IDs to delete - `ids` (string[], required): Promotion IDs - `type_action` (string, required): Action type Values: `DEACTIVE_PROMOTIONS` Deactivate promotions, `ACTIVE_PROMOTIONS` Activate promotions, `DELETE_PROMOTIONS` Delete promotions. ```json { "ids": [ "0fe988a1-26a5-4772-b4b6-a9c17c9f40cd" ], "type_action": "DEACTIVE_PROMOTIONS" } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` --- Source: https://pos.pancake.ph/developers/api/voucher.md # Voucher > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of voucher `GET /shops/{SHOP_ID}/vouchers` Get list of vouchers ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "9589b791-013f-4a5b-b8d1-164fad73d84e", "display_id": 7, "name": "d5IvGYtj", "type": "discount_by_coupon_id", "start_time": "2021-12-09T04:27:23Z", "end_time": "2021-12-10T04:27:26Z", "promo_code_info": { "discount": 4534, "is_percent": false, "max_discount_by_percent": 0 }, "is_free_shipping": false, "is_activated": true, "is_used": null, "customer_tags": [ "Tiềm năng" ], "shop_id": 3, "creator_id": "d6e6a545-f102-439e-9943-8ac8369f9735", "inserted_at": "2021-12-06T04:27:40Z", "updated_at": "2021-12-10T02:26:59Z" } ] } ``` ## Create voucher `POST /shops/{SHOP_ID}/vouchers` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing voucher information to create - `name` (string, required): Voucher name - `promo_code_info` (object, required): Voucher promo code information - `discount` (integer, required): Discount value - `is_percent` (boolean, required): Is percent - `max_discount_by_percent` (integer): Maximum discount by percent - `is_free_shipping` (boolean): Is free shipping - `is_activated` (boolean): Is activated - `customer_tags` (string[]): Customer tags - `start_time` (string (date-time), required): Voucher start time - `end_time` (string (date-time), required): Voucher end time ```json { "name": "test_voucher_5", "promo_code_info": { "discount": 53635, "is_percent": false }, "is_free_shipping": false, "is_activated": true, "customer_tags": [ "New tag" ], "start_time": "2021-12-09T04:27:23", "end_time": "2021-12-10T04:27:26" } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Get voucher info `GET /shops/{SHOP_ID}/vouchers/{VOUCHER_ID}` Get voucher information ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `VOUCHER_ID` | path | string | yes | Voucher ID | ### Responses - `200` Success (object) ```json { "success": true, "data": { "id": "9589b791-013f-4a5b-b8d1-164fad73d84e", "display_id": 7, "name": "d5IvGYtj", "type": "discount_by_coupon_id", "start_time": "2021-12-09T04:27:23Z", "end_time": "2021-12-10T04:27:26Z", "promo_code_info": { "discount": 4534, "is_percent": false, "max_discount_by_percent": 0 }, "is_free_shipping": false, "is_activated": true, "is_used": null, "customer_tags": [ "Tiềm năng", "Hay hoàn" ], "shop_id": 3, "creator_id": "d6e6a545-f102-439e-9943-8ac8369f9735", "inserted_at": "2021-12-06T04:27:40Z", "updated_at": "2021-12-06T04:27:40Z" } } ``` --- Source: https://pos.pancake.ph/developers/api/transaction.md # Transaction > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of transaction `GET /shops/{SHOP_ID}/transactions` Get list of transactions ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `status` | query | integer | | Status Values: `-1` All status, `0` New, `1` Effective, `2` Canceled, `3` Deleted. | | `startDateTime` | query | integer | | Start time | | `endDateTime` | query | integer | | End time | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "5b6bbae4-56b4-4189-a84d-d2ecfecead3e", "display_id": "KH6815", "name": "Giao dịch công nợ #1692 trả nhà cung cấp", "note": "trả nhà cung cấp", "amount": -70000, "status": 1, "is_locked": false, "is_canceled": false, "is_accounting": false, "payment_debts_to_suppliers": false, "payments": [ "cash" ], "tag_ids": [ "193a-e877-359a-b340-01d8-4d2e-2050", "55f6-111c-2fd5-38e8-5b9d-009f-d3b1" ], "supplier_products_id": 293, "advertising_cost_id": null, "shop_id": 20, "creator_id": "d6e6a545-f102-439e-9943-8ac8369f9735", "creator": { "id": "d6e6a545-f102-439e-9943-8ac8369f9735", "name": "vudzung12", "fb_id": "1286585024855632", "avatar_url": null }, "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2022/7/7/eb376f0bf90f47d25396d49e4d547700f182981b.jpg" ], "inserted_at": "2023-09-23T05:00:20Z", "time_incurred": "2023-09-23T05:00:20Z", "table_name": "debts", "orderId": null } ] } ``` ## Create transaction `POST /shops/{SHOP_ID}/transactions` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing transaction information to create - `transaction` (object, required): - `name` (string, required): Transaction name - `note` (string): Note - `amount` (integer): Amount of money - `is_locked` (boolean): Locked - `tag_ids` (string[]): Transaction tags - `payments` (string[]): Payment method - `supplier_products_id` (integer): Supplier products ID - `is_accounting` (boolean): Financial accounting - `time_incurred` (string (date-time)): Time incurred - `payment_debts_to_suppliers` (boolean): Paying off debts to suppliers - `images` (string (uri)[]): Image links - `orderId` (string): Order ID ```json { "transaction": { "name": "Thanh toán tiền hàng", "note": "thanh toán tiền hàng", "amount": -1000000, "is_locked": false, "tag_ids": [ "193a-e877-359a-b340-01d8-4d2e-2050" ], "payments": [ "transfer_money" ], "supplier_products_id": 293, "is_accounting": true, "time_incurred": "2023-09-23T08:41:54.404Z", "payment_debts_to_suppliers": true, "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2022/7/7/eb376f0bf90f47d25396d49e4d547700f182981b.jpg" ], "orderId": "19785" } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Create advertising cost `POST /shops/{SHOP_ID}/adv_costs` ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Request body Request body containing advertising cost information to create - `params` (object, required): - `cost_date` (string (date-time), required): Cost date - `transaction` (object, required): - `items` (object[], required): Advertising items ```json { "params": { "cost_date": "2023-09-07 22:00:00", "transaction": { "name": "Chi phí quảng cáo", "is_locked": false, "note": "example", "status": "0", "time_incurred": "2023-09-07 15:00:00", "tags": [ "Thẻ 1", "Thẻ 2" ] }, "items": [ { "cost": 10000, "tax": 5, "warehouse_id": "IS", "is_livestream": true, "product": "1", "pke_mkter": "test@gmail.com", "source": { "key": "-3", "account": "3" }, "is_wholesale": true, "post_ids": [ "127967746288487_545680607828820" ] } ] } } ``` ### Responses - `200` Success (object) ```json { "success": true } ``` ## Transaction history `GET /shops/{SHOP_ID}/payment_accounts/get_payment_histories` Get payment transaction history ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [] } ``` --- Source: https://pos.pancake.ph/developers/api/debt.md # Debt > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of debt `GET /shops/{SHOP_ID}/debt` Get list of debts ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `status` | query | integer | | Status Values: `-1` All status, `0` Not transacted / Partial payment, `1` Traded, `2` Canceled. | | `shop_customer_id` | query | string | | Customer ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "3990cdc9-3f40-4086-9267-cd98a9d39a99", "display_id": 3597, "name_debt": "Công nợ tạo tự động", "description": "Công nợ được tạo tự động từ tiền nợ khách đơn hàng #19872", "status": 1, "type": 0, "money_must_pay_or_collect": 100000, "money_payed_or_collected": 100000, "currency": null, "shop_id": 20, "shop_customer_id": "9f222ccc-920d-47f5-89b9-edd10b488b3b", "shop_customer": { "id": "9f222ccc-920d-47f5-89b9-edd10b488b3b", "name": "C. Hạnh", "phone_numbers": [ "0334913933" ], "customer": { "id": "6ef36ea4-08f6-42db-ba7b-6e5198ede786", "name": "C. Hạnh", "fb_id": null, "global_id": null, "psid": null } }, "order_id": 123106, "order": { "id": 123106, "display_id": 19872, "custom_id": null, "total_price": 147485, "cod": -332536, "assigning_seller_id": "3b782812-babe-482c-b520-cd0bc9728062" }, "purchase_id": null, "export_id": null, "supplier_products_id": null, "transaction_id": null, "partner_id": null, "creator_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "last_editor_id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "user": { "id": "cee3c05e-5f85-43c4-b27e-889b99c50097", "name": "Vũ Sơn", "fb_id": "377936050731194", "phone_number": null }, "inserted_at": "2025-09-23T07:11:10Z", "updated_at": "2025-09-23T07:11:10Z", "expired_at": "2025-10-23T07:11:10Z", "is_locked": null, "link": "https://pos.pancake.vn/shop/product/show-debt?link_key=c8a60d30-a147-4015-b5d8-3ad95f3a59aa" } ] } ``` --- Source: https://pos.pancake.ph/developers/api/reconciliation.md # Reconciliation > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of reconciliation sessions `GET /shops/{SHOP_ID}/reconciliations` Get list of reconciliation sessions. Each session includes its orders in the `orders` array ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size. Default 10, maximum 50 (larger values are clamped to 50) | | `sort_by` | query | string | | Sort by `updated_at` ascending (then `system_id`) for incremental sync. If omitted, sessions are sorted by creation time descending Values: `updated_at`. | | `startDateUpdatedAt` | query | integer (int64) | | Only sessions with `updated_at` >= this time (unix timestamp in seconds). Can be sent alone without `endDateUpdatedAt` | | `endDateUpdatedAt` | query | integer (int64) | | Only sessions with `updated_at` <= this time (unix timestamp in seconds) | | `include_removed` | query | boolean | | Include removed sessions (`is_removed: true`). Send `true` to enable | | `system_id[]` | query | integer[] | | Filter by internal session ID. Also accepts a single value as `system_id=123` | | `display_id` | query | integer | | Filter by session code shown on the shop | | `search` | query | string | | Search by `display_id` or `custom_id` of the session. Multiple codes can be separated by space or comma; matches any of them | | `partner_id[]` | query | string[] | | Shipping partner ID on Pancake system (see Partner list). Also accepts a single value as `partner_id=1` | | `creator_id` | query | string (uuid) | | Filter by creator user ID | | `order_id` | query | integer | | Only sessions containing this order (internal order ID, `system_id` of the order) | | `startDate` | query | integer (int64) | | Start of the session creation time range (unix timestamp in seconds). Applied only when both `startDate` and `endDate` are sent | | `endDate` | query | integer (int64) | | End of the session creation time range (unix timestamp in seconds) | | `startDatePaidAt` | query | integer (int64) | | Start of the payment time range (unix timestamp in seconds). Applied only when both `startDatePaidAt` and `endDatePaidAt` are sent; sessions without `paid_at` are excluded | | `endDatePaidAt` | query | integer (int64) | | End of the payment time range (unix timestamp in seconds) | ### Responses - `200` Success (object) - `403` The API key is invalid or disabled (ErrorResponse) ```json { "success": true, "page_number": 1, "page_size": 10, "total_entries": 1, "total_pages": 1, "data": [ { "system_id": 123, "display_id": 92, "custom_id": "7358901234567890123", "partner_id": "1", "control_type": "control_cod", "note": "Đối soát COD tuần 38", "excel_cod": 1250000, "excel_fee": 65000, "pos_cod": 1250000, "paid_at": "2026-09-18T08:06:55", "payment_status": "paid", "creator": { "id": "d6e6a545-f102-439e-9943-8ac8369f9735", "name": "vudzung12" }, "updater": { "id": "d6e6a545-f102-439e-9943-8ac8369f9735", "name": "vudzung12" }, "inserted_at": "2026-09-17T03:12:40.512345", "updated_at": "2026-09-18T08:06:55.000000", "is_removed": false, "orders": [ { "order_id": 1418, "display_id": 1418, "custom_id": null, "extend_code": "S58824.MB25.C3.500020713", "order_number_vtp": null, "order_status": 4, "result": "succeed", "message": null, "cod_amount": 750000, "partner_fee": 35000, "pos_cod": 750000, "currency": "VND", "reconciliation_at": "2026-09-17T03:12:40" }, { "order_id": 1419, "display_id": 1419, "custom_id": null, "extend_code": "S58824.MB25.C3.500020714", "order_number_vtp": null, "order_status": 4, "result": "mismatch", "message": null, "cod_amount": 500000, "partner_fee": 30000, "pos_cod": 520000, "currency": "VND", "reconciliation_at": "2026-09-17T03:12:40" } ] } ] } ``` --- Source: https://pos.pancake.ph/developers/api/statistics.md # Statistics > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Order statistics `GET /shops/{SHOP_ID}/analytics/sale` Get order statistics ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `since` | query | string (date-time) | | Start date | | `until` | query | string (date-time) | | End date | | `split_by[]` | query | string[] | | Group statistics by one or more dimensions. Each value is a `.` key. - `Time.hour` / `Time.day` / `Time.month` / `Time.year` — by date bucket - `Order.source` / `Order.order_sources` — by order source / account - `Order.status` — by order status code - `Order.warehouse_id` — by warehouse - `Order.post_id` — by Facebook post - `Order.partner_id` — by shipping carrier - `Order.marketplace_id` — by e-commerce marketplace - `Order.country_code` / `Order.province_id` / `Order.district_id` / `Order.commune_id` / `Order.region_filter` — by shipping geography - `Order.tag` — by order tag - `Order.is_wholesale` / `Order.is_livestream` — wholesale / livestream flag - `Order.livestream_manager_ids` — by livestream manager - `Order.total_price` — by order total price bucket - `Order.ads_or_normal` / `Order.ad_account_id` / `Order.ad_id` — ad partitioning - `User.id` / `User.sale_group` / `User.department_id` — by staff / sale group / department - `Customer.id` / `Customer.level_id` / `Customer.new` — by customer / level / new vs. old - `Variation.id` / `Variation.product_id` — by variation / product - `Variation.category` / `Variation.supplier` / `Variation.brand_id` / `Variation.tag` — by product taxonomy - `Variation.price_range` / `Variation.quantity_range` — by product price/quantity bucket - `Variation.upsale` / `Variation.quantity` — upsell flag / sold quantity - `UTM.p_utm_source` / `UTM.p_utm_campaign` / `UTM.p_utm_medium` / `UTM.p_utm_term` / `UTM.p_utm_content` — by UTM tag - `Promotion.default` / `Promotion.advance` / `Promotion.combo` — by promotion / combo - `Ads.ad_id` / `Ads.ad_set_id` / `Ads.ad_campaign_id` — by ad / ad set / campaign | | `filter` | query | object | | Filter applied to the order set. Object keyed by `
.`; each value is an array of strings. Append `_exclude` to a key to negate it (e.g. `Order.status_exclude`, `Variation.category_exclude`). Append `_and` to AND-combine multi-valued list filters (e.g. `Variation.tags_and`). Common keys: - `Variation.id` / `Variation.product_id` — by variation / product - `Variation.category` / `Variation.supplier` / `Variation.brand_id` / `Variation.brand` — by product taxonomy - `Variation.tag` / `Variation.tags` / `Variation.attribute` — by product tag / attribute - `Variation.price_range` / `Variation.quantity_range` / `Variation.quantity` — by product price/quantity - `Variation.upsale` / `Variation.one_time_product` / `Variation.is_bonus_product` / `Variation.product_price_of_zero` / `Variation.unlink_ecommerce` — flag filters - `Order.source` / `Order.source_exclude` / `Order.order_sources` — order source - `Order.status` — order status code - `Order.warehouse_id` / `Order.post_id` / `Order.partner_id` / `Order.shop_partner_id` / `Order.marketplace_id` — operational filters - `Order.country_code` / `Order.province_id` / `Order.district_id` / `Order.commune_id` / `Order.region_filter` / `Order.region_filter_phil` — shipping geography - `Order.tag` / `Order.is_wholesale` / `Order.is_livestream` / `Order.received_at_shop` / `Order.is_upsale_order` — order flags - `Order.total_price` / `Order.revenue` — by total/revenue bucket - `Order.ad_id` / `Order.ads_source` / `Order.ad_account_id` / `Order.ads_or_normal` — ads filters - `Order.order_currency` — order currency - `Order.id` / `Order.project` — by order id / project - `Order.p_utm_source` / `Order.p_utm_campaign` / `Order.p_utm_medium` / `Order.p_utm_term` / `Order.p_utm_content` / `Order.utm_affiliate` / `Order.link` — UTM filters - `Order.instant` / `Order.N24H` / `Order.GSGN` — service partner filters - `Order.livestream_manager_id` / `Order.livestream_manager_ids` — livestream manager - `User.id` / `User.sale_group` / `User.department_id` / `User.pke_mkter` / `User.assigning_seller_id` / `User.assigning_care_id` / `User.item_assign_seller_id` — staff filters - `Customer.id` / `Customer.level_id` / `Customer.gender` / `Customer.tag` / `Customer.conversation_tags` / `Customer.new` / `Customer.referral_code` — customer filters - `Promotion.default` / `Promotion.advance` / `Promotion.id` / `Promotion.combo` — promotion filters | | `success_status` | query | string | | Success status | | `success_record` | query | string | | Success record | | `user_type` | query | string | | User type | | `returned_record` | query | string | | Returned record | | `select_fields[]` | query | string[] | | Select fields | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "Time.day": "2020-07-22", "returned": null, "success": { "cod": 1710000, "discount": 0, "order_count": 3, "price": 1800000, "product_count": 18, "shipping_fee": 0, "custom_formula_d6ae-ad02-be3d-b26e-3f65-d497-33c4": 1000000 } }, { "Time.day": "2020-07-27", "returned": null, "success": { "cod": 570000, "discount": 0, "order_count": 1, "price": 600000, "avg_price": 600000, "product_count": 6, "shipping_fee": 0, "custom_formula_d6ae-ad02-be3d-b26e-3f65-d497-33c4": 1000000 } }, { "Time.day": "2020-07-28", "returned": null, "success": { "cod": 5130000, "discount": 0, "order_count": 9, "price": 5400000, "avg_price": 600000, "product_count": 54, "shipping_fee": 0, "custom_formula_d6ae-ad02-be3d-b26e-3f65-d497-33c4": 1200000 } }, { "Time.day": "2020-07-30", "returned": null, "success": { "cod": 570000, "discount": 0, "order_count": 1, "price": 600000, "avg_price": 600000, "product_count": 6, "shipping_fee": 0, "custom_formula_d6ae-ad02-be3d-b26e-3f65-d497-33c4": 1200000 } } ] } ``` ## List of customized formulas `GET /shops/{SHOP_ID}/analytics/get_list_formula` Get list of customized formulas ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "formula": "{price} - {shipping_fee}", "id": "0ea7-bc72-ae51-0769-a7c9-ca34-fff6", "name": "tien hang - phi ship", "unit": "currency" }, { "formula": "{revenue} + {transfer_money}", "id": "3db3-72a7-c426-066a-4eed-a63b-be49", "name": "doanh thu + ck$", "unit": "currency" } ] } ``` ## List of analytic fields `GET /shops/{SHOP_ID}/analytics/get_analytic_fields` Get list of analytic fields ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "price", "name": "Tiền hàng" }, { "id": "avg_price", "name": "Giá bán trung bình" }, { "id": "shipping_fee", "name": "Phí VC thu của khách", "description": "Tiền vận chuyển thu của khách." }, { "id": "discount", "name": "Chiết khấu", "description": "Tổng số tiền giảm giá trên từng sản phẩm." }, { "id": "product_count", "name": "SL bán thực", "description": "Hàng bán ra đã trừ SL hoàn/đổi trả" }, { "id": "close_rate", "name": "Tỷ lệ chốt", "description": "Số đơn chốt / (Tổng số đơn - SL đơn xoá)." }, { "id": "commissions", "name": "Hoa hồng", "description": "Hoa hồng cho nhân viên, có thể cài đặt trong phần cấu hình." } ] } ``` ## List of custom statistic folders `GET /shops/{SHOP_ID}/statistic_custom/folders` Get list of custom statistic folders and their report items (folder_items). Each folder groups related custom reports configured for the shop (e.g. revenue, orders, products, finance, debts). ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | ### Responses - `200` Success (object) ```json { "success": true, "folders": [ { "name": "OtherReports", "label": "Báo cáo khác", "order": -1, "shop_id": 4, "creator_id": null, "last_editor_id": null, "can_remove": false, "is_removed": null, "setting": null, "total_price_ranges": null, "inserted_at": "2024-02-26T08:21:01", "updated_at": "2024-02-26T08:21:01", "folder_items": [ { "id": "9d80f8b9-1c68-4026-81e6-70ed2381d360", "name": "pages.shop.statistic.salesStatistics", "label": "Doanh số", "description": null, "folder_name": "employee", "parent_id": null, "order": 0, "shop_id": 4, "creator_id": null, "last_editor_id": null, "can_remove": false, "is_removed": null, "attributes": null, "fields": [ "total_order_count", "order_count", "price", "shipping_fee", "discount", "capital", "product_count" ], "filter": null, "children": [], "charts": null, "compare_ranges": { "chart": "bar-chart", "field": "product_count", "ranges": [ { "range": "7" }, { "range": "-7" } ] }, "fill_color": false, "setting": { "returned_record": "success_record", "success_record": "inserted_at", "success_status": 0, "user_type": "assign" }, "sort_by_field": null, "time_range": [ "90" ], "users_can_see": null, "inserted_at": "2024-02-26T08:21:01", "updated_at": "2024-02-26T08:21:01" } ] }, { "name": "Revenue", "label": "Báo cáo doanh thu", "order": 1, "shop_id": 4, "creator_id": null, "last_editor_id": null, "can_remove": false, "is_removed": null, "setting": null, "total_price_ranges": null, "inserted_at": "2023-09-20T03:01:25", "updated_at": "2023-09-20T03:01:25", "folder_items": [ { "id": "9783d2e9-d973-4f6f-a735-f5883f4e678f", "name": "commons.time", "label": "Thời gian", "description": null, "folder_name": "Revenue", "parent_id": null, "order": 0, "shop_id": 4, "creator_id": null, "last_editor_id": null, "can_remove": false, "is_removed": null, "attributes": [ "Variation.product_id" ], "fields": [ "success_order_count", "returned_order_count", "price", "sales", "revenue", "capital", "profit" ], "filter": [], "children": [], "charts": [ { "field": "success_order_count", "top": "all", "type": "bar-chart", "width": 100 } ], "compare_ranges": { "chart": "bar-chart", "field": "profit", "ranges": [ { "range": "7" }, { "range": "-7" } ] }, "fill_color": false, "setting": { "returned_record": "success_record", "success_record": "updated_at", "success_status": 1, "user_type": "update" }, "sort_by_field": { "multi": [ { "columnKey": "product_count", "field": "product_count", "order": "descend" } ] }, "time_range": [ "30" ], "users_can_see": null, "inserted_at": "2023-09-20T03:01:25", "updated_at": "2026-05-05T04:33:58" } ] } ] } ``` --- Source: https://pos.pancake.ph/developers/api/statistics-inventory-analytics.md # Statistics inventory analytics > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Statistics by variant `GET /shops/{SHOP_ID}/inventory_analytics/inventory` Get inventory statistics grouped by product variant ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `start_date` | query | integer (unix timestamp) | yes | Start date (unix timestamp) | | `end_date` | query | integer (unix timestamp) | yes | End date (unix timestamp) | | `type` | query | string | yes | Statistics by Values: `actual` inventory, `remain` Remain quantity. | | `warehouse_ids[]` | query | string (uuid)[] | | Filter histories by warehouse ID(s). Restricts the inventory movements considered to the listed warehouses. | | `variation_ids[]` | query | string (uuid)[] | | Filter by variation IDs. When `is_exclude_variation=true`, this list becomes an exclusion list. | | `is_exclude_variation` | query | boolean | | When true, treat `variation_ids[]` as an exclusion list instead of an inclusion list. | | `product_ids[]` | query | string (uuid)[] | | Filter by product IDs. When `is_exclude_product=true`, this list becomes an exclusion list. | | `is_exclude_product` | query | boolean | | When true, treat `product_ids[]` as an exclusion list instead of an inclusion list. | | `category_ids[]` | query | integer[] | | Filter by category IDs. A single integer value is also accepted (`category_ids=567`). | | `brand_ids[]` | query | string[] | | Filter by brand IDs (UUID). Special value `no_value` matches products without a brand. | | `product_tags[]` | query | string[] | | Filter by product tag IDs (integers serialized as strings). Special value `no_value` matches products without any tag. Combine with `filter_exclude_tag=true` to negate the filter. | | `filter_exclude_tag` | query | boolean | | When true, treat `product_tags[]` as an exclusion list. Products with any of the listed tags are excluded. | | `supplier_product_ids[]` | query | string[] | | Filter by supplier IDs (integers serialized as strings). Special value `no_value` matches products without a supplier. By default the product must contain ALL listed supplier IDs; set `is_filter_supplier_by_or=true` to match ANY. | | `is_filter_supplier_by_or` | query | boolean | | When true, OR-combine the `supplier_product_ids[]` filter (match any) instead of AND (match all). | | `manipulation_warehouse_ids[]` | query | string (uuid)[] | | Filter by manipulation warehouses configured on the product. By default the product must contain ALL listed warehouses; set `is_filter_manipulation_warehouse_by_or=true` to match ANY. Products without any manipulation warehouse are always included. | | `is_filter_manipulation_warehouse_by_or` | query | boolean | | When true, OR-combine the `manipulation_warehouse_ids[]` filter (match any) instead of AND (match all). | | `data_sort` | query | string | | JSON-encoded sort spec `{"sort_by": , "asc_desc": "asc"\|"desc"}`. Supported `sort_by` values: `product_id`, `product_name`, `variation`, `purchase_import`, `purchase_export`, `return_import`, `transfer_import`, `transfer_export`, `sell_export`, `stocktaking_import`, `stocktaking_export`, `other_import`, `other_export`, `total_import_value`, `total_export_value`, `early_actual`, `late_actual`, `early_actual_value`, `late_actual_value`. | ### Responses - `200` Success (object) ```json { "success": true, "data": [ { "id": "d9005a9f-257b-4ce7-af6e-bad339598ea6", "begin_inventory": 1099, "begin_inventory_value": 109900000, "end_inventory": 1128, "end_inventory_value": 112800000, "purchase_import": 30, "return_import": 0, "stocktaking_import": 2, "transfer_import": 5, "total_import": 37, "total_import_value": 3700000, "purchase_export": 0, "transfer_export": -5, "sell_export": 0, "stocktaking_export": 0, "total_export": -8, "total_export_value": 800000, "variation": { "id": "d9005a9f-257b-4ce7-af6e-bad339598ea6", "product_id": "dee8f2c3-2ecc-4d9b-a9ff-603b5bde7e3d", "shop_id": 20, "custom_id": "TESTMATDOS", "display_id": 15, "barcode": null, "images": [ "https://content.pancake.vn/user-content-dev2.pancake.vn/2025/9/30/d05f44dcf2b9f96312d88b718da35aa5317242d6.jpg" ], "fields": [ { "id": "2b61c249-35dc-4b79-a3aa-a173c63a8061", "keyValue": "BLUE", "name": "Color", "value": "blue" }, { "id": "b053dfb9-b7b6-4d8a-9fb4-197d7b0d7556", "keyValue": "L", "name": "Size", "value": "L" } ], "product": { "category_ids": [ 567 ], "custom_id": "ANTT", "display_id": 13038, "images": [], "inserted_at": "2024-11-18T03:18:03", "name": "Áo nam Pari đẹp thời trang" } } } ], "page_number": 1, "page_size": 30, "total_entries": 4, "total_pages": 1 } ``` ## Statistics by product `GET /shops/{SHOP_ID}/inventory_analytics/inventory_by_product` Get inventory statistics grouped by product ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Page size | | `start_date` | query | integer (unix timestamp) | yes | Start date (unix timestamp) | | `end_date` | query | integer (unix timestamp) | yes | End date (unix timestamp) | | `type` | query | string | yes | Statistics by Values: `actual` inventory, `remain` Remain quantity. | | `warehouse_ids[]` | query | string (uuid)[] | | Filter histories by warehouse ID(s). Restricts the inventory movements considered to the listed warehouses. | | `variation_ids[]` | query | string (uuid)[] | | Filter by variation IDs. When `is_exclude_variation=true`, this list becomes an exclusion list. | | `is_exclude_variation` | query | boolean | | When true, treat `variation_ids[]` as an exclusion list instead of an inclusion list. | | `product_ids[]` | query | string (uuid)[] | | Filter by product IDs. When `is_exclude_product=true`, this list becomes an exclusion list. | | `is_exclude_product` | query | boolean | | When true, treat `product_ids[]` as an exclusion list instead of an inclusion list. | | `category_ids[]` | query | integer[] | | Filter by category IDs. A single integer value is also accepted (`category_ids=567`). | | `brand_ids[]` | query | string[] | | Filter by brand IDs (UUID). Special value `no_value` matches products without a brand. | | `product_tags[]` | query | string[] | | Filter by product tag IDs (integers serialized as strings). Special value `no_value` matches products without any tag. Combine with `filter_exclude_tag=true` to negate the filter. | | `filter_exclude_tag` | query | boolean | | When true, treat `product_tags[]` as an exclusion list. Products with any of the listed tags are excluded. | | `supplier_product_ids[]` | query | string[] | | Filter by supplier IDs (integers serialized as strings). Special value `no_value` matches products without a supplier. By default the product must contain ALL listed supplier IDs; set `is_filter_supplier_by_or=true` to match ANY. | | `is_filter_supplier_by_or` | query | boolean | | When true, OR-combine the `supplier_product_ids[]` filter (match any) instead of AND (match all). | | `manipulation_warehouse_ids[]` | query | string (uuid)[] | | Filter by manipulation warehouses configured on the product. By default the product must contain ALL listed warehouses; set `is_filter_manipulation_warehouse_by_or=true` to match ANY. Products without any manipulation warehouse are always included. | | `is_filter_manipulation_warehouse_by_or` | query | boolean | | When true, OR-combine the `manipulation_warehouse_ids[]` filter (match any) instead of AND (match all). | | `data_sort` | query | string | | JSON-encoded sort spec `{"sort_by": , "asc_desc": "asc"\|"desc"}`. Supported `sort_by` values: `product_id`, `product_name`, `variation`, `purchase_import`, `purchase_export`, `return_import`, `transfer_import`, `transfer_export`, `sell_export`, `stocktaking_import`, `stocktaking_export`, `other_import`, `other_export`, `total_import_value`, `total_export_value`, `early_actual`, `late_actual`, `early_actual_value`, `late_actual_value`. | ### Responses - `200` Success (object) ```json { "success": true, "page_number": 1, "page_size": 30, "total_entries": 1, "total_pages": 1, "data": [ { "id": "dee8f2c3-2ecc-4d9b-a9ff-603b5bde7e3d", "product_id": "dee8f2c3-2ecc-4d9b-a9ff-603b5bde7e3d", "begin_inventory": 2597, "begin_inventory_value": 259700000, "end_inventory": 2870, "end_inventory_value": 287000000, "purchase_import": 130, "return_import": 5, "stocktaking_import": 2, "transfer_import": 5, "total_import": 296, "total_import_value": 29600000, "purchase_export": 0, "transfer_export": -5, "sell_export": -15, "stocktaking_export": 0, "total_export": -23, "total_export_value": 2300000, "product": { "category_ids": [ 567 ], "custom_id": "ANTT", "display_id": 13038, "images": [], "inserted_at": "2024-11-18T03:18:03", "name": "Áo nam Pari đẹp thời trang" } } ] } ``` --- Source: https://pos.pancake.ph/developers/api/statistics-customer-analytics.md # Statistics customer analytics > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## Customer overview report `GET /shops/{SHOP_ID}/customer_analytics/report` Get all figures of the Customer overview report (Statistics -> Customer screen) in a single call: new/old customer counts and spending, gender, age groups, customer levels, distribution by successful order count, purchase cycle and the paginated customer list. To paginate / sort / search the customer list only (without recomputing the summary blocks), call the same endpoint with `section=customer_orders` — the response then contains only `customer_orders`. ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `startDate` | query | integer | | Start of the reporting period (unix timestamp, seconds). Customers created from this time are counted as new customers. | | `endDate` | query | integer | | End of the reporting period (unix timestamp, seconds) | | `page` | query | integer | | Page number of the customer list (default 1) | | `pageSize` | query | integer | | Number of customers per page (default 10) | | `data_sort` | query | string | | Sort the customer list. JSON-encoded object: - `sort_by`: `order_count` \| `order_success` \| `order_return` \| `order_success_amount` (default) - `asc_desc`: `asc` \| `desc` (default) | | `search` | query | string | | Search the customer list by customer name or phone number | | `section` | query | string | | Set to `customer_orders` to return only the paginated customer list Values: `customer_orders`. | | `sale_form` | query | string | | Filter by sale form (retail / wholesale customers, based on shop wholesale tag settings) Values: `all`, `retail`, `wholesale`. | | `warehouse_id[]` | query | string[] | | Filter orders by warehouse | | `order_sources[]` | query | string[] | | Filter by order source. Each item is a JSON-encoded object `{"order_sources": "", "account": ""}`. Source values are the same as on web (see the `/shops/{SHOP_ID}/order_source` endpoint). | | `is_filter_exclude_source` | query | string | | Exclude (instead of include) the sources in `order_sources[]` Values: `true`, `false`. | | `order_tag[]` | query | string[] | | Filter orders by order tag IDs. Special value `no_tag` filters orders without tags. | | `is_filter_tag_by_or` | query | string | | `true` (default): order matches ANY tag in `order_tag[]`; `false`: order must contain ALL tags Values: `true`, `false`. | | `is_filter_exclude` | query | string | | Exclude (instead of include) the tags in `order_tag[]` Values: `true`, `false`. | | `selectedLevel[]` | query | string[] | | Filter by customer level IDs (see the `/shops/{SHOP_ID}/customer_levels` endpoint) | | `gender[]` | query | string[] | | Filter by customer gender (`none` = no gender information) | | `typeCustomer[]` | query | string[] | | Filter by customer type: `online` (has a linked social account) / `offline` | ### Responses - `200` Success (object) ```json { "success": true, "data": { "customer": { "new_customer": 2, "old_customer": 6 }, "customer_purchased": { "new_customer": "1006000", "old_customer": "5870098" }, "customer_gender": { "male": 0, "female": 0, "unknown": 8 }, "customer_age": { "under_18": 0, "revenue_under_18": null, "from_18_to_24": 0, "revenue_from_18_to_24": null, "from_25_to_34": 0, "revenue_from_25_to_34": null, "from_35_to_44": 0, "revenue_from_35_to_44": null, "from_45_to_54": 0, "revenue_from_45_to_54": null, "over_55": 0, "revenue_over_55": null, "havent_birthday": 8, "revenue_total": 6824089 }, "customer_level": [ { "id": "2d058084-4219-4ef3-bf4c-e7b77889224c", "count": 2, "total_amount": "4070000" }, { "id": "6c7f0d31-4f5a-43b1-a0d6-b30081e48f5a", "count": 1, "total_amount": "1050000" }, { "id": null, "count": 5, "total_amount": "1756098" } ], "customer_order_count": [ { "order_success_quantity": 0, "customer_count": 8, "amount": "0" } ], "new_customer": { "old_customer": 6, "analytic_new_customer": { "count": 2, "count_1": 2, "count_2": 0, "count_tags": 0 } }, "customer_analytic": [ { "range": 0, "from_1_to_30": 0, "from_31_to_60": 7, "from_61_to_90": 0, "under_90": 121, "total": 128 }, { "range": 1, "from_1_to_30": 0, "from_31_to_60": 2, "from_61_to_90": 0, "under_90": 7, "total": 9 }, { "range": 31, "from_1_to_30": 0, "from_31_to_60": 2, "from_61_to_90": 0, "under_90": 3, "total": 5 }, { "range": 61, "from_1_to_30": 0, "from_31_to_60": 0, "from_61_to_90": 0, "under_90": 1, "total": 1 }, { "range": 91, "from_1_to_30": 0, "from_31_to_60": 0, "from_61_to_90": 0, "under_90": 3, "total": 3 } ], "customer_orders": { "success": true, "page_number": 1, "page_size": 30, "total_entries": 8, "total_pages": null, "data": [ { "id": "330fdf15-7301-4d9c-86e6-f6ea21ed37bf", "name": "khách colombia", "currency": null, "phone_number": [ "0982342873" ], "customer": { "id": "af55aee2-3846-43d7-8f46-13d768462731", "name": "khách colombia", "global_id": null, "fb_id": null, "psid": null }, "order_count": 1, "order_return_count": 0, "order_success_amount": 0, "order_success_count": 0 }, { "id": "941e822e-fc98-4852-bdea-3a8f806cf362", "name": "Hoang Anhbcde", "currency": "VND", "phone_number": [ "0999999999" ], "customer": { "id": "db647f48-b20d-4fcf-95b4-eb277a2087b9", "name": "Hoang Anh", "global_id": null, "fb_id": null, "psid": null }, "order_count": 7, "order_return_count": 0, "order_success_amount": 0, "order_success_count": 0 } ] } } } ``` --- Source: https://pos.pancake.ph/developers/api/ads-manager.md # Ads Manager > Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter. ## List of ad accounts `GET /shops/{SHOP_ID}/ads_manager/ad_accounts` Get list of ad accounts ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Number of records per page | ### Responses - `200` Success (AdAccount) ```json { "success": true, "data": [ { "id": "786374497414442", "name": "Jen Nhung", "account_status": 1, "currency": "VND", "is_business": false, "sync_succeed_at": "2026-05-21T02:00:10", "tags": [ "thẻ 2" ] } ], "page_number": 1, "page_size": 30, "total_entries": 14, "total_pages": 1 } ``` ## List of ad campaigns `GET /shops/{SHOP_ID}/ads_manager/campaigns_v2` Get list of ad campaigns ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Number of records per page | | `start_time` | query | integer (int64) | | Start of the statistics period, as a Unix timestamp (seconds). The `insights` metrics are aggregated from this time. | | `end_time` | query | integer (int64) | | End of the statistics period, as a Unix timestamp (seconds). The `insights` metrics are aggregated up to this time. | | `select_fields` | query | string | | Comma-separated list of additional `insights` fields to include in the response. When specified, only the listed fields are returned inside `insights` (in addition to the always-present base metrics). **Performance** - `ad_performance_session` — Overall performance - `spend` — Amount spent - `reach` — Instant Experience reach - `impressions` — Impressions - `clicks` — Clicks (all) - `frequency` — Frequency - `cpp` — CPP - `cpm` — CPM - `cpc` — CPC - `ctr` — CTR - `cost_per_1000_accounts_center_reach` — Cost per 1000 accounts center reach - `cost_per_result` — Cost per result - `avg_purchase_conversion_value` — Average purchase conversion value - `indicator_result` — Result - `result_roas` — Result ROAS **Engagement** - `ad_engagement_session` — Engagement - `link_click` — Link clicks - `like` — Facebook likes - `comment` — Post comments - `post_engagement` — Post engagements - `post_reaction` — Post reactions - `post` — Post shares - `onsite_conversion_post_save` — Post saves - `photo_view` — Photo views - `video_view` — Video plays (≥3s) - `inline_link_click_ctr` — CTR (link click-through rate) - `outbound_click` — Outbound clicks - `onsite_conversion_messaging_conversation_started_7d` — Messaging conversations started - `onsite_conversion_messaging_first_reply` — New messaging contacts - `onsite_conversion_messaging_block` — Messaging blocks - `video_thruplay_watched_actions` — ThruPlays - `video_play_actions` — Video plays - `video_p25_watched_actions` — Video plays at 25% - `video_p50_watched_actions` — Video plays at 50% - `video_p75_watched_actions` — Video plays at 75% - `video_p95_watched_actions` — Video plays at 95% - `video_p100_watched_actions` — Video plays at 100% - `estimated_ad_recallers` — Estimated ad recall lift (people) - `cost_per_outbound_click` — Cost per outbound click - `cost_per_thruplay` — Cost per ThruPlay - `outbound_clicks_ctr` — Outbound CTR - `cost_per_post_engagement` — Cost per post engagement - `estimated_ad_recall_rate` — Estimated ad recall lift rate - `cost_per_estimated_ad_recallers` — Cost per estimated ad recall lift - `cost_per_messaging_conversation_started` — Cost per messaging conversation started **Conversion** *Leads* - `lead` — Leads - `website_lead` — Website leads - `offline_lead` — Offline leads - `meta_lead` — Meta leads - `lead_conversion_value` — Lead conversion value - `website_lead_conversion_value` — Website lead conversion value - `offline_lead_conversion_value` — Offline lead conversion value - `meta_lead_conversion_value` — Meta lead conversion value - `cost_per_lead` — Cost per lead *Purchases* - `omni_purchase` — Purchases - `inapp_omni_purchase` — In-app purchases - `website_omni_purchase` — Website purchases - `offline_omni_purchase` — Offline purchases - `meta_omni_purchase` — Meta purchases - `omni_purchase_conversion_value` — Purchase conversion value - `inapp_omni_purchase_conversion_value` — In-app purchase conversion value - `website_omni_purchase_conversion_value` — Website purchase conversion value - `offline_omni_purchase_conversion_value` — Offline purchase conversion value - `meta_omni_purchase_conversion_value` — Meta purchase conversion value - `cost_per_omni_purchase` — Cost per purchase *Checkout initiated* - `omni_initiated_checkout` — Checkout initiated - `inapp_omni_initiated_checkout` — In-app checkout initiated - `website_omni_initiated_checkout` — Website checkout initiated - `offline_omni_initiated_checkout` — Offline checkout initiated - `meta_omni_initiated_checkout` — Meta checkout initiated - `omni_initiated_checkout_conversion_value` — Checkout initiation conversion value - `inapp_omni_initiated_checkout_conversion_value` — In-app checkout initiation conversion value - `website_omni_initiated_checkout_conversion_value` — Website checkout initiation conversion value - `offline_omni_initiated_checkout_conversion_value` — Offline checkout initiation conversion value - `meta_omni_initiated_checkout_conversion_value` — Meta checkout initiation conversion value - `cost_per_omni_initiated_checkout` — Cost per checkout initiated *Registrations completed* - `omni_complete_registration` — Registrations completed - `inapp_omni_complete_registration` — In-app registrations completed - `website_omni_complete_registration` — Website registrations completed - `offline_omni_complete_registration` — Offline registrations completed - `omni_complete_registration_conversion_value` — Registration completion conversion value - `inapp_omni_complete_registration_conversion_value` — In-app registration completion conversion value - `website_omni_complete_registration_conversion_value` — Website registration completion conversion value - `offline_omni_complete_registration_conversion_value` — Offline registration completion conversion value - `cost_per_omni_complete_registration` — Cost per registration completed *Content views* - `omni_view_content` — Content views - `inapp_omni_view_content` — In-app content views - `website_omni_view_content` — Website content views - `offline_omni_view_content` — Offline content views - `meta_omni_view_content` — Meta content views - `omni_view_content_conversion_value` — Content view conversion value - `inapp_omni_view_content_conversion_value` — In-app content view conversion value - `website_omni_view_content_conversion_value` — Website content view conversion value - `offline_omni_view_content_conversion_value` — Offline content view conversion value - `meta_omni_view_content_conversion_value` — Meta content view conversion value - `cost_per_omni_view_content` — Cost per content view *Searches* - `omni_search` — Searches - `inapp_omni_search` — In-app searches - `website_omni_search` — Website searches - `offline_omni_search` — Offline searches - `omni_search_conversion_value` — Search conversion value - `inapp_omni_search_conversion_value` — In-app search conversion value - `website_omni_search_conversion_value` — Website search conversion value - `offline_omni_search_conversion_value` — Offline search conversion value - `cost_per_omni_search` — Cost per search *Add to cart* - `omni_add_to_cart` — Add to cart - `inapp_omni_add_to_cart` — In-app add to cart - `website_omni_add_to_cart` — Website add to cart - `offline_omni_add_to_cart` — Offline add to cart - `meta_omni_add_to_cart` — Meta add to cart - `omni_add_to_cart_conversion_value` — Add-to-cart conversion value - `inapp_omni_add_to_cart_conversion_value` — In-app add-to-cart conversion value - `website_omni_add_to_cart_conversion_value` — Website add-to-cart conversion value - `offline_omni_add_to_cart_conversion_value` — Offline add-to-cart conversion value - `meta_omni_add_to_cart_conversion_value` — Meta add-to-cart conversion value - `cost_per_omni_add_to_cart` — Cost per add to cart *Add to wishlist* - `omni_add_to_wishlist` — Add to wishlist - `inapp_omni_add_to_wishlist` — In-app add to wishlist - `website_omni_add_to_wishlist` — Website add to wishlist - `offline_omni_add_to_wishlist` — Offline add to wishlist - `meta_omni_add_to_wishlist` — Meta add to wishlist - `omni_add_to_wishlist_conversion_value` — Add-to-wishlist conversion value - `inapp_omni_add_to_wishlist_conversion_value` — In-app add-to-wishlist conversion value - `website_omni_add_to_wishlist_conversion_value` — Website add-to-wishlist conversion value - `offline_omni_add_to_wishlist_conversion_value` — Offline add-to-wishlist conversion value - `meta_omni_add_to_wishlist_conversion_value` — Meta add-to-wishlist conversion value - `cost_per_omni_add_to_wishlist` — Cost per add to wishlist *Product customizations* - `customize_product_total` — Product customizations - `inapp_customize_product_total` — In-app product customizations - `website_customize_product_total` — Website product customizations - `offline_customize_product_total` — Offline product customizations - `customize_product_total_conversion_value` — Product customization conversion value - `inapp_customize_product_total_conversion_value` — In-app product customization conversion value - `website_customize_product_total_conversion_value` — Website product customization conversion value - `offline_customize_product_total_conversion_value` — Offline product customization conversion value - `cost_per_customize_product_total` — Cost per product customization *Trials started* - `start_trial_total` — Trials started - `inapp_start_trial_total` — In-app trials started - `website_start_trial_total` — Website trials started - `offline_start_trial_total` — Offline trials started - `start_trial_total_conversion_value` — Trial start conversion value - `inapp_start_trial_total_conversion_value` — In-app trial start conversion value - `website_start_trial_total_conversion_value` — Website trial start conversion value - `offline_start_trial_total_conversion_value` — Offline trial start conversion value - `cost_per_start_trial_total` — Cost per trial started *Subscriptions* - `subscribe_total` — Subscriptions - `inapp_subscribe_total` — In-app subscriptions - `website_subscribe_total` — Website subscriptions - `offline_subscribe_total` — Offline subscriptions - `subscribe_total_conversion_value` — Subscription conversion value - `inapp_subscribe_total_conversion_value` — In-app subscription conversion value - `website_subscribe_total_conversion_value` — Website subscription conversion value - `offline_subscribe_total_conversion_value` — Offline subscription conversion value - `cost_per_subscribe_total` — Cost per subscription *Applications submitted* - `submit_application_total` — Applications submitted - `inapp_submit_application_total` — In-app applications submitted - `website_submit_application_total` — Website applications submitted - `offline_submit_application_total` — Offline applications submitted - `meta_submit_application_total` — Meta applications submitted - `submit_application_total_conversion_value` — Application submission conversion value - `inapp_submit_application_total_conversion_value` — In-app application submission conversion value - `website_submit_application_total_conversion_value` — Website application submission conversion value - `offline_submit_application_total_conversion_value` — Offline application submission conversion value - `meta_submit_application_total_conversion_value` — Meta application submission conversion value - `cost_per_submit_application_total` — Cost per application submitted *Contacts* - `contact_total` — Contacts - `inapp_contact_total` — In-app contacts - `website_contact_total` — Website contacts - `offline_contact_total` — Offline contacts - `contact_total_conversion_value` — Contact conversion value - `inapp_contact_total_conversion_value` — In-app contact conversion value - `website_contact_total_conversion_value` — Website contact conversion value - `offline_contact_total_conversion_value` — Offline contact conversion value - `cost_per_contact_total` — Cost per contact *Landing page views* - `landing_page_view` — Landing page views - `inapp_landing_page_view` — In-app landing page views - `website_landing_page_view` — Website landing page views - `cost_per_landing_page_view` — Cost per landing page view *Orders* - `order_created` — Orders created - `order_shipped` — Orders shipped *Purchase ROAS* - `purchase_roas` — Purchase ROAS - `inapp_purchase_roas` — In-app purchase ROAS - `website_purchase_roas` — Website purchase ROAS | ### Responses - `200` Success (CampaignListResponse) ```json { "success": true, "data": [ { "id": "120239433707310738", "name": "Chiến dịch Valentine 2026", "status": "ACTIVE", "effective_status": "ACTIVE", "objective": "OUTCOME_TRAFFIC", "created_time": "2026-02-02T10:00:29", "start_time": "2026-02-02T16:00:00", "end_time": "2026-02-03T16:00:00", "marketer_id": null, "product_id": "8d5e65f5-f1da-42bc-95b4-380f356388a9", "product_category_id": null, "ad_account": { "id": "1427880307614733", "name": "Quỳnh Dương", "currency": "VND" }, "insights": { "ad_ids": [ "120239433707300738" ], "impressions": 572, "clicks": 14, "reach": 512, "spend": 59381, "cpc": 4241.5, "cpm": 103812.937063, "cpp": 115978.515625, "ctr": 2.44755244755245, "frequency": 1.117188, "order_statistics": [ { "id": 0, "order_count": 0 }, { "id": 1, "order_count": 0 } ] } } ], "summary": { "impressions": 11462, "clicks": 19, "reach": 11243, "spend": 135140, "cpc": 6827.631579, "cpm": 11790.263479, "cpp": 54927.700908, "ctr": 0.165765137, "frequency": 1.019478774 }, "page_number": 1, "page_size": 30, "total_entries": 3, "total_pages": 1 } ``` ## List of ad sets `GET /shops/{SHOP_ID}/ads_manager/ad_sets_v2` Get list of ad sets ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Number of records per page | | `start_time` | query | integer (int64) | | Start of the statistics period, as a Unix timestamp (seconds). The `insights` metrics are aggregated from this time. | | `end_time` | query | integer (int64) | | End of the statistics period, as a Unix timestamp (seconds). The `insights` metrics are aggregated up to this time. | | `select_fields` | query | string | | Comma-separated list of additional `insights` fields to include in the response. When specified, only the listed fields are returned inside `insights` (in addition to the always-present base metrics). **Performance** - `ad_performance_session` — Overall performance - `spend` — Amount spent - `reach` — Instant Experience reach - `impressions` — Impressions - `clicks` — Clicks (all) - `frequency` — Frequency - `cpp` — CPP - `cpm` — CPM - `cpc` — CPC - `ctr` — CTR - `cost_per_1000_accounts_center_reach` — Cost per 1000 accounts center reach - `cost_per_result` — Cost per result - `avg_purchase_conversion_value` — Average purchase conversion value - `indicator_result` — Result - `result_roas` — Result ROAS **Engagement** - `ad_engagement_session` — Engagement - `link_click` — Link clicks - `like` — Facebook likes - `comment` — Post comments - `post_engagement` — Post engagements - `post_reaction` — Post reactions - `post` — Post shares - `onsite_conversion_post_save` — Post saves - `photo_view` — Photo views - `video_view` — Video plays (≥3s) - `inline_link_click_ctr` — CTR (link click-through rate) - `outbound_click` — Outbound clicks - `onsite_conversion_messaging_conversation_started_7d` — Messaging conversations started - `onsite_conversion_messaging_first_reply` — New messaging contacts - `onsite_conversion_messaging_block` — Messaging blocks - `video_thruplay_watched_actions` — ThruPlays - `video_play_actions` — Video plays - `video_p25_watched_actions` — Video plays at 25% - `video_p50_watched_actions` — Video plays at 50% - `video_p75_watched_actions` — Video plays at 75% - `video_p95_watched_actions` — Video plays at 95% - `video_p100_watched_actions` — Video plays at 100% - `estimated_ad_recallers` — Estimated ad recall lift (people) - `cost_per_outbound_click` — Cost per outbound click - `cost_per_thruplay` — Cost per ThruPlay - `outbound_clicks_ctr` — Outbound CTR - `cost_per_post_engagement` — Cost per post engagement - `estimated_ad_recall_rate` — Estimated ad recall lift rate - `cost_per_estimated_ad_recallers` — Cost per estimated ad recall lift - `cost_per_messaging_conversation_started` — Cost per messaging conversation started **Conversion** *Leads* - `lead` — Leads - `website_lead` — Website leads - `offline_lead` — Offline leads - `meta_lead` — Meta leads - `lead_conversion_value` — Lead conversion value - `website_lead_conversion_value` — Website lead conversion value - `offline_lead_conversion_value` — Offline lead conversion value - `meta_lead_conversion_value` — Meta lead conversion value - `cost_per_lead` — Cost per lead *Purchases* - `omni_purchase` — Purchases - `inapp_omni_purchase` — In-app purchases - `website_omni_purchase` — Website purchases - `offline_omni_purchase` — Offline purchases - `meta_omni_purchase` — Meta purchases - `omni_purchase_conversion_value` — Purchase conversion value - `inapp_omni_purchase_conversion_value` — In-app purchase conversion value - `website_omni_purchase_conversion_value` — Website purchase conversion value - `offline_omni_purchase_conversion_value` — Offline purchase conversion value - `meta_omni_purchase_conversion_value` — Meta purchase conversion value - `cost_per_omni_purchase` — Cost per purchase *Checkout initiated* - `omni_initiated_checkout` — Checkout initiated - `inapp_omni_initiated_checkout` — In-app checkout initiated - `website_omni_initiated_checkout` — Website checkout initiated - `offline_omni_initiated_checkout` — Offline checkout initiated - `meta_omni_initiated_checkout` — Meta checkout initiated - `omni_initiated_checkout_conversion_value` — Checkout initiation conversion value - `inapp_omni_initiated_checkout_conversion_value` — In-app checkout initiation conversion value - `website_omni_initiated_checkout_conversion_value` — Website checkout initiation conversion value - `offline_omni_initiated_checkout_conversion_value` — Offline checkout initiation conversion value - `meta_omni_initiated_checkout_conversion_value` — Meta checkout initiation conversion value - `cost_per_omni_initiated_checkout` — Cost per checkout initiated *Registrations completed* - `omni_complete_registration` — Registrations completed - `inapp_omni_complete_registration` — In-app registrations completed - `website_omni_complete_registration` — Website registrations completed - `offline_omni_complete_registration` — Offline registrations completed - `omni_complete_registration_conversion_value` — Registration completion conversion value - `inapp_omni_complete_registration_conversion_value` — In-app registration completion conversion value - `website_omni_complete_registration_conversion_value` — Website registration completion conversion value - `offline_omni_complete_registration_conversion_value` — Offline registration completion conversion value - `cost_per_omni_complete_registration` — Cost per registration completed *Content views* - `omni_view_content` — Content views - `inapp_omni_view_content` — In-app content views - `website_omni_view_content` — Website content views - `offline_omni_view_content` — Offline content views - `meta_omni_view_content` — Meta content views - `omni_view_content_conversion_value` — Content view conversion value - `inapp_omni_view_content_conversion_value` — In-app content view conversion value - `website_omni_view_content_conversion_value` — Website content view conversion value - `offline_omni_view_content_conversion_value` — Offline content view conversion value - `meta_omni_view_content_conversion_value` — Meta content view conversion value - `cost_per_omni_view_content` — Cost per content view *Searches* - `omni_search` — Searches - `inapp_omni_search` — In-app searches - `website_omni_search` — Website searches - `offline_omni_search` — Offline searches - `omni_search_conversion_value` — Search conversion value - `inapp_omni_search_conversion_value` — In-app search conversion value - `website_omni_search_conversion_value` — Website search conversion value - `offline_omni_search_conversion_value` — Offline search conversion value - `cost_per_omni_search` — Cost per search *Add to cart* - `omni_add_to_cart` — Add to cart - `inapp_omni_add_to_cart` — In-app add to cart - `website_omni_add_to_cart` — Website add to cart - `offline_omni_add_to_cart` — Offline add to cart - `meta_omni_add_to_cart` — Meta add to cart - `omni_add_to_cart_conversion_value` — Add-to-cart conversion value - `inapp_omni_add_to_cart_conversion_value` — In-app add-to-cart conversion value - `website_omni_add_to_cart_conversion_value` — Website add-to-cart conversion value - `offline_omni_add_to_cart_conversion_value` — Offline add-to-cart conversion value - `meta_omni_add_to_cart_conversion_value` — Meta add-to-cart conversion value - `cost_per_omni_add_to_cart` — Cost per add to cart *Add to wishlist* - `omni_add_to_wishlist` — Add to wishlist - `inapp_omni_add_to_wishlist` — In-app add to wishlist - `website_omni_add_to_wishlist` — Website add to wishlist - `offline_omni_add_to_wishlist` — Offline add to wishlist - `meta_omni_add_to_wishlist` — Meta add to wishlist - `omni_add_to_wishlist_conversion_value` — Add-to-wishlist conversion value - `inapp_omni_add_to_wishlist_conversion_value` — In-app add-to-wishlist conversion value - `website_omni_add_to_wishlist_conversion_value` — Website add-to-wishlist conversion value - `offline_omni_add_to_wishlist_conversion_value` — Offline add-to-wishlist conversion value - `meta_omni_add_to_wishlist_conversion_value` — Meta add-to-wishlist conversion value - `cost_per_omni_add_to_wishlist` — Cost per add to wishlist *Product customizations* - `customize_product_total` — Product customizations - `inapp_customize_product_total` — In-app product customizations - `website_customize_product_total` — Website product customizations - `offline_customize_product_total` — Offline product customizations - `customize_product_total_conversion_value` — Product customization conversion value - `inapp_customize_product_total_conversion_value` — In-app product customization conversion value - `website_customize_product_total_conversion_value` — Website product customization conversion value - `offline_customize_product_total_conversion_value` — Offline product customization conversion value - `cost_per_customize_product_total` — Cost per product customization *Trials started* - `start_trial_total` — Trials started - `inapp_start_trial_total` — In-app trials started - `website_start_trial_total` — Website trials started - `offline_start_trial_total` — Offline trials started - `start_trial_total_conversion_value` — Trial start conversion value - `inapp_start_trial_total_conversion_value` — In-app trial start conversion value - `website_start_trial_total_conversion_value` — Website trial start conversion value - `offline_start_trial_total_conversion_value` — Offline trial start conversion value - `cost_per_start_trial_total` — Cost per trial started *Subscriptions* - `subscribe_total` — Subscriptions - `inapp_subscribe_total` — In-app subscriptions - `website_subscribe_total` — Website subscriptions - `offline_subscribe_total` — Offline subscriptions - `subscribe_total_conversion_value` — Subscription conversion value - `inapp_subscribe_total_conversion_value` — In-app subscription conversion value - `website_subscribe_total_conversion_value` — Website subscription conversion value - `offline_subscribe_total_conversion_value` — Offline subscription conversion value - `cost_per_subscribe_total` — Cost per subscription *Applications submitted* - `submit_application_total` — Applications submitted - `inapp_submit_application_total` — In-app applications submitted - `website_submit_application_total` — Website applications submitted - `offline_submit_application_total` — Offline applications submitted - `meta_submit_application_total` — Meta applications submitted - `submit_application_total_conversion_value` — Application submission conversion value - `inapp_submit_application_total_conversion_value` — In-app application submission conversion value - `website_submit_application_total_conversion_value` — Website application submission conversion value - `offline_submit_application_total_conversion_value` — Offline application submission conversion value - `meta_submit_application_total_conversion_value` — Meta application submission conversion value - `cost_per_submit_application_total` — Cost per application submitted *Contacts* - `contact_total` — Contacts - `inapp_contact_total` — In-app contacts - `website_contact_total` — Website contacts - `offline_contact_total` — Offline contacts - `contact_total_conversion_value` — Contact conversion value - `inapp_contact_total_conversion_value` — In-app contact conversion value - `website_contact_total_conversion_value` — Website contact conversion value - `offline_contact_total_conversion_value` — Offline contact conversion value - `cost_per_contact_total` — Cost per contact *Landing page views* - `landing_page_view` — Landing page views - `inapp_landing_page_view` — In-app landing page views - `website_landing_page_view` — Website landing page views - `cost_per_landing_page_view` — Cost per landing page view *Orders* - `order_created` — Orders created - `order_shipped` — Orders shipped *Purchase ROAS* - `purchase_roas` — Purchase ROAS - `inapp_purchase_roas` — In-app purchase ROAS - `website_purchase_roas` — Website purchase ROAS | ### Responses - `200` Success (AdSetListResponse) ```json { "success": true, "data": [ { "id": "120239433707290738", "name": "Nhóm nam giới", "status": "ACTIVE", "effective_status": "ACTIVE", "created_time": "2026-02-02T10:00:30", "start_time": "2026-02-02T16:00:00", "end_time": "2026-02-03T16:00:00", "bid_amount": 0, "bid_strategy": null, "billing_event": "IMPRESSIONS", "daily_budget": 0, "lifetime_budget": 0, "destination_type": "FACEBOOK_PAGE", "optimization_goal": "PROFILE_VISIT", "marketer_id": null, "product_id": null, "product_category_id": null, "ad_account": { "id": "1427880307614733", "name": "Quỳnh Dương", "currency": "VND" }, "ad_campaign": { "id": "120239433707310738", "name": "Chiến dịch Valentine 2026" }, "insights": { "ad_ids": [ "120239433707300738" ], "impressions": 572, "clicks": 14, "reach": 512, "spend": 59381, "cpc": 4241.5, "cpm": 103812.937063, "cpp": 115978.515625, "ctr": 2.44755244755245, "frequency": 1.117188 }, "targeting": { "age_min": 18, "age_max": 65, "age_range": [ 18, 45 ], "genders": [ 1 ], "device_platforms": [ "mobile", "desktop" ], "publisher_platforms": [ "facebook" ], "facebook_positions": [ "feed", "facebook_reels", "story" ], "locales": [ 27 ], "geo_locations": { "countries": [ "VN" ], "location_types": [ "home", "recent" ] }, "flexible_spec": [ { "interests": [ { "id": "6003070856229", "name": "Game (giải trí)" } ], "behaviors": [ { "id": "6002714895372", "name": "Frequent Travelers" } ], "life_events": [ { "id": "6002714398172", "name": "Newlywed (1 year)" } ], "relationship_statuses": [ 2, 4, 3 ] } ], "targeting_automation": { "advantage_audience": 1 } } } ], "summary": { "impressions": 11462, "clicks": 19, "reach": 11243, "spend": 135140, "cpc": 6827.631579, "cpm": 11790.263479, "cpp": 54927.700908, "ctr": 0.165765137, "frequency": 1.019478774 }, "page_number": 1, "page_size": 30, "total_entries": 4, "total_pages": 1 } ``` ## List of ads `GET /shops/{SHOP_ID}/ads_manager/ads_v2` Get list of ads ### Parameters | Name | In | Type | Required | Description | |---|---|---|---|---| | `SHOP_ID` | path | integer | yes | Shop ID | | `page` | query | integer | | Page number | | `page_size` | query | integer | | Number of records per page | | `start_time` | query | integer (int64) | | Start of the statistics period, as a Unix timestamp (seconds). The `insights` metrics are aggregated from this time. | | `end_time` | query | integer (int64) | | End of the statistics period, as a Unix timestamp (seconds). The `insights` metrics are aggregated up to this time. | | `select_fields` | query | string | | Comma-separated list of additional `insights` fields to include in the response. When specified, only the listed fields are returned inside `insights` (in addition to the always-present base metrics). **Performance** - `ad_performance_session` — Overall performance - `spend` — Amount spent - `reach` — Instant Experience reach - `impressions` — Impressions - `clicks` — Clicks (all) - `frequency` — Frequency - `cpp` — CPP - `cpm` — CPM - `cpc` — CPC - `ctr` — CTR - `cost_per_1000_accounts_center_reach` — Cost per 1000 accounts center reach - `cost_per_result` — Cost per result - `avg_purchase_conversion_value` — Average purchase conversion value - `indicator_result` — Result - `result_roas` — Result ROAS **Engagement** - `ad_engagement_session` — Engagement - `link_click` — Link clicks - `like` — Facebook likes - `comment` — Post comments - `post_engagement` — Post engagements - `post_reaction` — Post reactions - `post` — Post shares - `onsite_conversion_post_save` — Post saves - `photo_view` — Photo views - `video_view` — Video plays (≥3s) - `inline_link_click_ctr` — CTR (link click-through rate) - `outbound_click` — Outbound clicks - `onsite_conversion_messaging_conversation_started_7d` — Messaging conversations started - `onsite_conversion_messaging_first_reply` — New messaging contacts - `onsite_conversion_messaging_block` — Messaging blocks - `video_thruplay_watched_actions` — ThruPlays - `video_play_actions` — Video plays - `video_p25_watched_actions` — Video plays at 25% - `video_p50_watched_actions` — Video plays at 50% - `video_p75_watched_actions` — Video plays at 75% - `video_p95_watched_actions` — Video plays at 95% - `video_p100_watched_actions` — Video plays at 100% - `estimated_ad_recallers` — Estimated ad recall lift (people) - `cost_per_outbound_click` — Cost per outbound click - `cost_per_thruplay` — Cost per ThruPlay - `outbound_clicks_ctr` — Outbound CTR - `cost_per_post_engagement` — Cost per post engagement - `estimated_ad_recall_rate` — Estimated ad recall lift rate - `cost_per_estimated_ad_recallers` — Cost per estimated ad recall lift - `cost_per_messaging_conversation_started` — Cost per messaging conversation started **Conversion** *Leads* - `lead` — Leads - `website_lead` — Website leads - `offline_lead` — Offline leads - `meta_lead` — Meta leads - `lead_conversion_value` — Lead conversion value - `website_lead_conversion_value` — Website lead conversion value - `offline_lead_conversion_value` — Offline lead conversion value - `meta_lead_conversion_value` — Meta lead conversion value - `cost_per_lead` — Cost per lead *Purchases* - `omni_purchase` — Purchases - `inapp_omni_purchase` — In-app purchases - `website_omni_purchase` — Website purchases - `offline_omni_purchase` — Offline purchases - `meta_omni_purchase` — Meta purchases - `omni_purchase_conversion_value` — Purchase conversion value - `inapp_omni_purchase_conversion_value` — In-app purchase conversion value - `website_omni_purchase_conversion_value` — Website purchase conversion value - `offline_omni_purchase_conversion_value` — Offline purchase conversion value - `meta_omni_purchase_conversion_value` — Meta purchase conversion value - `cost_per_omni_purchase` — Cost per purchase *Checkout initiated* - `omni_initiated_checkout` — Checkout initiated - `inapp_omni_initiated_checkout` — In-app checkout initiated - `website_omni_initiated_checkout` — Website checkout initiated - `offline_omni_initiated_checkout` — Offline checkout initiated - `meta_omni_initiated_checkout` — Meta checkout initiated - `omni_initiated_checkout_conversion_value` — Checkout initiation conversion value - `inapp_omni_initiated_checkout_conversion_value` — In-app checkout initiation conversion value - `website_omni_initiated_checkout_conversion_value` — Website checkout initiation conversion value - `offline_omni_initiated_checkout_conversion_value` — Offline checkout initiation conversion value - `meta_omni_initiated_checkout_conversion_value` — Meta checkout initiation conversion value - `cost_per_omni_initiated_checkout` — Cost per checkout initiated *Registrations completed* - `omni_complete_registration` — Registrations completed - `inapp_omni_complete_registration` — In-app registrations completed - `website_omni_complete_registration` — Website registrations completed - `offline_omni_complete_registration` — Offline registrations completed - `omni_complete_registration_conversion_value` — Registration completion conversion value - `inapp_omni_complete_registration_conversion_value` — In-app registration completion conversion value - `website_omni_complete_registration_conversion_value` — Website registration completion conversion value - `offline_omni_complete_registration_conversion_value` — Offline registration completion conversion value - `cost_per_omni_complete_registration` — Cost per registration completed *Content views* - `omni_view_content` — Content views - `inapp_omni_view_content` — In-app content views - `website_omni_view_content` — Website content views - `offline_omni_view_content` — Offline content views - `meta_omni_view_content` — Meta content views - `omni_view_content_conversion_value` — Content view conversion value - `inapp_omni_view_content_conversion_value` — In-app content view conversion value - `website_omni_view_content_conversion_value` — Website content view conversion value - `offline_omni_view_content_conversion_value` — Offline content view conversion value - `meta_omni_view_content_conversion_value` — Meta content view conversion value - `cost_per_omni_view_content` — Cost per content view *Searches* - `omni_search` — Searches - `inapp_omni_search` — In-app searches - `website_omni_search` — Website searches - `offline_omni_search` — Offline searches - `omni_search_conversion_value` — Search conversion value - `inapp_omni_search_conversion_value` — In-app search conversion value - `website_omni_search_conversion_value` — Website search conversion value - `offline_omni_search_conversion_value` — Offline search conversion value - `cost_per_omni_search` — Cost per search *Add to cart* - `omni_add_to_cart` — Add to cart - `inapp_omni_add_to_cart` — In-app add to cart - `website_omni_add_to_cart` — Website add to cart - `offline_omni_add_to_cart` — Offline add to cart - `meta_omni_add_to_cart` — Meta add to cart - `omni_add_to_cart_conversion_value` — Add-to-cart conversion value - `inapp_omni_add_to_cart_conversion_value` — In-app add-to-cart conversion value - `website_omni_add_to_cart_conversion_value` — Website add-to-cart conversion value - `offline_omni_add_to_cart_conversion_value` — Offline add-to-cart conversion value - `meta_omni_add_to_cart_conversion_value` — Meta add-to-cart conversion value - `cost_per_omni_add_to_cart` — Cost per add to cart *Add to wishlist* - `omni_add_to_wishlist` — Add to wishlist - `inapp_omni_add_to_wishlist` — In-app add to wishlist - `website_omni_add_to_wishlist` — Website add to wishlist - `offline_omni_add_to_wishlist` — Offline add to wishlist - `meta_omni_add_to_wishlist` — Meta add to wishlist - `omni_add_to_wishlist_conversion_value` — Add-to-wishlist conversion value - `inapp_omni_add_to_wishlist_conversion_value` — In-app add-to-wishlist conversion value - `website_omni_add_to_wishlist_conversion_value` — Website add-to-wishlist conversion value - `offline_omni_add_to_wishlist_conversion_value` — Offline add-to-wishlist conversion value - `meta_omni_add_to_wishlist_conversion_value` — Meta add-to-wishlist conversion value - `cost_per_omni_add_to_wishlist` — Cost per add to wishlist *Product customizations* - `customize_product_total` — Product customizations - `inapp_customize_product_total` — In-app product customizations - `website_customize_product_total` — Website product customizations - `offline_customize_product_total` — Offline product customizations - `customize_product_total_conversion_value` — Product customization conversion value - `inapp_customize_product_total_conversion_value` — In-app product customization conversion value - `website_customize_product_total_conversion_value` — Website product customization conversion value - `offline_customize_product_total_conversion_value` — Offline product customization conversion value - `cost_per_customize_product_total` — Cost per product customization *Trials started* - `start_trial_total` — Trials started - `inapp_start_trial_total` — In-app trials started - `website_start_trial_total` — Website trials started - `offline_start_trial_total` — Offline trials started - `start_trial_total_conversion_value` — Trial start conversion value - `inapp_start_trial_total_conversion_value` — In-app trial start conversion value - `website_start_trial_total_conversion_value` — Website trial start conversion value - `offline_start_trial_total_conversion_value` — Offline trial start conversion value - `cost_per_start_trial_total` — Cost per trial started *Subscriptions* - `subscribe_total` — Subscriptions - `inapp_subscribe_total` — In-app subscriptions - `website_subscribe_total` — Website subscriptions - `offline_subscribe_total` — Offline subscriptions - `subscribe_total_conversion_value` — Subscription conversion value - `inapp_subscribe_total_conversion_value` — In-app subscription conversion value - `website_subscribe_total_conversion_value` — Website subscription conversion value - `offline_subscribe_total_conversion_value` — Offline subscription conversion value - `cost_per_subscribe_total` — Cost per subscription *Applications submitted* - `submit_application_total` — Applications submitted - `inapp_submit_application_total` — In-app applications submitted - `website_submit_application_total` — Website applications submitted - `offline_submit_application_total` — Offline applications submitted - `meta_submit_application_total` — Meta applications submitted - `submit_application_total_conversion_value` — Application submission conversion value - `inapp_submit_application_total_conversion_value` — In-app application submission conversion value - `website_submit_application_total_conversion_value` — Website application submission conversion value - `offline_submit_application_total_conversion_value` — Offline application submission conversion value - `meta_submit_application_total_conversion_value` — Meta application submission conversion value - `cost_per_submit_application_total` — Cost per application submitted *Contacts* - `contact_total` — Contacts - `inapp_contact_total` — In-app contacts - `website_contact_total` — Website contacts - `offline_contact_total` — Offline contacts - `contact_total_conversion_value` — Contact conversion value - `inapp_contact_total_conversion_value` — In-app contact conversion value - `website_contact_total_conversion_value` — Website contact conversion value - `offline_contact_total_conversion_value` — Offline contact conversion value - `cost_per_contact_total` — Cost per contact *Landing page views* - `landing_page_view` — Landing page views - `inapp_landing_page_view` — In-app landing page views - `website_landing_page_view` — Website landing page views - `cost_per_landing_page_view` — Cost per landing page view *Orders* - `order_created` — Orders created - `order_shipped` — Orders shipped *Purchase ROAS* - `purchase_roas` — Purchase ROAS - `inapp_purchase_roas` — In-app purchase ROAS - `website_purchase_roas` — Website purchase ROAS | ### Responses - `200` Success (AdListResponse) ```json { "success": true, "data": [ { "id": "120238954106070738", "name": "Quảng cáo sale nam giới", "status": "ACTIVE", "effective_status": "ACTIVE", "created_time": "2026-01-21T09:12:15", "marketer_id": null, "product_id": null, "product_category_id": null, "ad_account": { "id": "1427880307614733", "name": "Quỳnh Dương", "currency": "VND" }, "ad_campaign": { "id": "120238946624470738", "name": "Chiến dịch siêu sale tháng 2/2026" }, "ad_set": { "id": "120238954106080738", "name": "Nhóm nam giới" }, "ad_creative": { "id": "1175732824344796", "name": "✨ CƠ HỘI DUY NHẤT ĐỂ SỞ HỮU TRANG SỨC NIMORA VỚI ƯU ĐÃI ĐẾN 70% ✨", "object_story_id": "926757717191948_122108102433202138", "object_story_spec": null }, "insights": { "ad_ids": [ "120238954106070738" ], "impressions": 8252, "clicks": 4, "reach": 8121, "spend": 57381, "cpc": 14345.25000025, "cpm": 6953.58700888221, "cpp": 7078.91138298451, "ctr": 0.0484730974309258, "frequency": 1.011012 } } ], "summary": { "impressions": 11462, "clicks": 19, "reach": 11243, "spend": 135140, "cpc": 6827.631579, "cpm": 11790.263479, "cpp": 54927.700908, "ctr": 0.165765137, "frequency": 1.019478774 }, "page_number": 1, "page_size": 30, "total_entries": 4, "total_pages": 1 } ``` --- Source: https://pos.pancake.ph/developers/api/schemas.md # Data models ## ErrorResponse Business or request error response - `success` (boolean, required): Success status Values: `false`. - `message` (string): Human-readable error message - `error` (string): Stable machine-readable error name, when provided - `error_code` (integer): Machine-readable error code, when provided - `message_code` (integer): POS business message code, when provided - `permission` (string): Required permission, when access is denied ## OrderMessage A rendered message from the conversation associated with an order. Properties can be omitted when `fields[]` is specified. - `id` (string): Message identifier - `type` (string,null): Platform-specific message type, such as `INBOX` or `COMMENT` - `message` (string): Rendered message content, which may contain HTML - `original_message` (string,null): Original message text before rendering - `message_tags` (object[]): Extensible metadata for entities detected in the message - `from` (object): Extensible sender information supplied by the messaging platform - `seen` (boolean): Whether the message has been seen - `can_like` (boolean): Whether the page can like the message - `user_likes` (boolean): Whether the page has liked the message - `like_count` (integer,null): Number of likes - `can_comment` (boolean): Whether the page can comment on the message - `comment_count` (integer,null): Number of replies - `can_remove` (boolean): Whether the message can be removed - `is_removed` (boolean): Whether the message was removed - `is_hidden` (boolean): Whether the message is hidden - `can_hide` (boolean): Whether the message can be hidden - `can_reply_privately` (boolean): Whether the message supports a private reply - `private_reply_conversation` (object,null): Conversation metadata created by a private reply - `attachments` (object[]): Extensible platform-specific message attachments - `type` (string): Extensible platform-specific attachment type - `payload` (object,null): Extensible structured attachment payload - `has_phone` (boolean): Whether a phone number was detected in the message - `phone_info` (object[]): Extensible metadata for phone numbers detected in the message - `is_parent` (boolean): Whether the message is a top-level comment - `inserted_at` (string): ISO 8601 timestamp emitted at runtime without a timezone suffix - `page_id` (string): Page identifier - `show_info` (boolean): Whether sender information should be displayed for this message - `parent_id` (string,null): Parent message identifier for a reply - `is_parent_hidden` (boolean): Whether the parent message is hidden - `edit_history` (array,null): Extensible message edit history - `removed_by` (object,null): Information about the actor who removed the message - `rich_message` (object,null): Extensible rich-message metadata - `conversation_id` (string): Conversation identifier - `is_livestream_order` (boolean,null): Whether the message was recognized as a livestream order ## Order Order information - `id` (integer): Order ID - `system_id` (integer): System ID - `shop_id` (integer): Shop ID - `inserted_at` (string (date-time)): Order creation time - `updated_at` (string (date-time)): Order update time - `status` (integer): Order status Values: `0` New, `17` Waiting for confirmation, `11` Restocking, `12` Wait for printing, `13` Printed, `20` Purchased, `1` Confirmed, `8` Packaging, `9` Waiting for pick up, `2` Shipped, `3` Received, `16` Collected money, `4` Returning, `15` Partial return, `5` Returned, `6` Canceled, `7` Deleted recently. - `status_name` (string): Order status name - `bill_full_name` (string): Customer name - `bill_phone_number` (string): Phone number of customer - `bill_email` (string): Customer email - `conversation_id` (string): Conversation ID - `page_id` (string): Facebook page ID - `post_id` (string): Post ID - `ad_id` (string): Ad ID - `shipping_fee` (integer): Shipping fee - `partner_fee` (integer): Fee from shipping partner - `fee_marketplace` (integer): Fees from e-commerce platforms - `customer_pay_fee` (boolean): Customer pay shipping fee - `is_free_shipping` (boolean): Free shipping - `is_livestream` (boolean): Is livestream order - `is_live_shopping` (boolean): Is live shopping order - `is_smc` (boolean): Shopping on Messenger - `received_at_shop` (boolean): true: Sales at counter, false: Sell online - `total_discount` (integer): Discount total - `note` (string): Internal note - `note_print` (string): Note for printing - `returned_reason` (integer): Return reason code (1: Customer, 2: Staff, 3: Defective product, 4: Shipping carrier, 5: Exchange). Other values are shop-defined custom reasons, see returned_reason_name for the display name - `returned_reason_name` (string): Return reason name - `sub_status` (integer): Reason for delivery delay - `warehouse_id` (string): Warehouse ID - `warehouse_info` (object): Warehouse information - `name` (string): Warehouse name - `phone_number` (string): Warehouse phone number - `full_address` (string): Warehouse full address - `address` (string): Warehouse address - `province_id` (string): Province ID - `district_id` (string): District ID - `commune_id` (string): Commune ID - `affiliate_id` (string): Affiliate ID - `ffm_id` (string): FFM ID - `has_snappy_service` (boolean): Has Snappy service - `custom_id` (string): Custom ID - `creator_id` (string): Creator ID - `creator` (object): Order creator - `id` (string): Creator ID - `fb_id` (string): Facebook ID of creator - `name` (string): Creator name - `avatar_url` (string): Creator avatar URL - `items` (object[]): Product list - `product_id` (string): Product ID - `quantity` (integer, required): Quantity - `returned_count` (integer): Returned count - `assigning_seller_id` (string): Assigning seller ID - `quantity_by_combo_products` (object[]): Quantity by combo products - `discount_each_product` (integer): Discount for each product - `is_bonus_product` (boolean): Is bonus product - `is_discount_percent` (boolean): Is discount by percent - `is_wholesale` (boolean): Is wholesale - `is_composite` (boolean): Is composite product - `one_time_product` (boolean): One time product - `note` (string): Product note - `note_product` (string): Product note - `inserted_at` (string (date-time)): Inserted at - `measure_group_id` (integer): Measure group ID - `variation_info` (object): Variation information. Optional when creating/updating an order (the backend defaults it to an empty object if omitted). Its inner fields are not individually required, but sending `retail_price` is recommended so the line price is correct. - `components` (object[]): Product components - `partner` (object): Partner information When updating an order that already has shipping info, only the fields you send are written; omitted fields keep their current values. Send `null` to clear `partner_id`, `extend_code` or `shop_partner_id`. - `partner_id` (integer): Partner ID - `cod` (integer): Reconciliation COD - `extend_code` (string): Shipping order ID on partner system - `total_fee` (integer): Total fee - `updated_at` (string (date-time)): Updated at - `delivery_name` (string): Shipper name - `delivery_tel` (string): Delivery phone - `picked_up_at` (string (date-time)): Picked up at - `sort_code` (string): Sort code - `paid_at` (string (date-time)): Paid at - `system_created` (boolean): System created - `extend_update` (object[]): Update from courier - `partner_status` (string): Partner shipping status Values: `waiting` Waiting for processing, `request_received` Carrier received the request, `processing_picked_up` Processing pickup, `picking_up` Picking up, `delay_pickup` Delayed pickup, `picked_up` Picked up, `waiting_on_the_way` Waiting for transit, `on_the_way` In transit, `contact_delivery_company` Contact the carrier, `out_for_delivery` Out for delivery, `delay_delivery` Delayed delivery, `inform_recipient` Notify the recipient, `undeliverable` Undeliverable, `waiting_for_return` Waiting for return, `delivered` Delivered, `delivered_cod` Delivered, COD reconciled, `returning` Returning, `returned` Returned, `returned_cod` Returned, COD reconciled, `canceled` Canceled. - `partner_name` (string): Partner name - `first_delivery_at` (string (date-time)): First delivery time - `first_undeliverable_at` (string (date-time)): First failed delivery time - `count_of_delivery` (integer): Number of delivery attempts. Courier updates add 1 each time the shipment moves to `out_for_delivery` or `delay_delivery`. Can be set when creating or updating an order (integer 0-32767); omitted or invalid values keep the current value, and later courier updates keep counting from the value you set. - `order_number_vtp` (string): Viettel Post tracking number - `printed_form` (object): Printed form - `shipping_address` (ShippingAddress): - `address` (string): Street address. When creating an order via API, if `address` is provided but `province_id` is left empty, the system automatically parses this free-text address to fill in `province_id`, `district_id` and `commune_id`. Auto-fill is skipped when the parsed location is in Thailand (country code 66) or when no commune can be resolved from the text. - `commnue_name` (string): Commune name - `commune_id` (string): Commune ID - `country_code` (string): Country code - `district_id` (string): District ID - `district_name` (string): District name - `full_address` (string): Full address - `full_name` (string): Full name - `new_full_address` (string): New full address - `new_province_id` (string): New province ID - `phone_number` (string): Phone number - `post_code` (string): Post code - `province_id` (string): Province ID - `province_name` (string): Province name - `render_type` (string): Render type - `payment_purchase_histories` (object[]): Payment histories - `amount` (integer): Amount of money - `type` (string): Payment type - `inserted_at` (string (date-time)): Transaction time - `result_code` (string): Result code - `ipn_reply` (boolean): IPN reply - `voucher_amount` (integer): Voucher amount - `tags` (string[]): Tags - `tags` (object[]): Tags list - `id` (integer): Tag ID - `name` (string): Tag name - `marketer` (object): Marketer information - `id` (string): Marketer ID - `name` (string): Marketer name - `email` (string): Marketer email - `phone_number` (string): Marketer phone number - `fb_id` (string): Marketer Facebook ID - `avatar_url` (string): Marketer avatar URL - `pke_mkter` (string): Marketer ID - `activated_combo_products` (object): Activated combo products information - `combo_product_id` (integer): Combo product ID - `quantity_combo_activated` (integer): Quantity combo activated - `combo_product_info` (object): Combo product information - `activated_promotion_advances` (object[]): Activated promotion advances information - `id` (integer): ID - `promotion_advance_id` (string): Promotion advance ID - `promotion_advance_info` (object): Promotion advance information - `invoice_info_list` (object[]): Invoice information list - `error` (string): Error message if any - `invoice_detail` (object): Invoice detail information. The fields to send depend on `invoice_type`: - `company`: use `company_name`, `company_tax_id`, `company_address`, `company_email` (and optionally `company_address_breakdown`). - `personal`: use `name`, `phone_number`, `identity_code`, `tax_id`, `email`. - `invoice_type` (string): Invoice type: `company` for an organization, `personal` for an individual. Determines which `invoice_detail` fields are used. Values: `company`, `personal`. - `is_requested` (boolean): Customer requests an e-invoice for this order. Set `true` together with `invoice_type` and `invoice_detail` to request invoice issuance. - `order_sn` (string): Order code on the marketplace - `reports_by_phone` (object): Reports by phone number - `order_fail` (integer): Number of failed orders - `order_success` (integer): Number of successful orders - `warning` (integer): Number of warnings orders - `tracking_link` (string): Link confirm order - `payment_link` (string): Payment link - `ads_source` (string): Advertising source - `bank_payments` (object): Payment method - `transfer_proofs` (object[]): Bank transfer payment proofs, including verification time, amount and receipt images - `id` (integer): Transfer proof ID - `order_id` (integer): Order ID - `shop_id` (integer): Shop ID - `payment_id` (string): Bank payment method ID (matches a key in `bank_payments`) - `amount` (integer): Transferred amount - `images` (string[]): Transfer receipt images - `note` (string): Note - `is_income` (boolean): Money received (true) or paid out (false) - `is_verify` (boolean): Whether the transfer has been verified - `verify_at` (string (date-time)): Verification time - `verifier` (object): Verifier information - `creator` (object): Creator information - `last_editor` (object): Last editor information - `order_info` (object): Additional order information - `inserted_at` (string (date-time)): Transfer proof creation time - `updated_at` (string (date-time)): Transfer proof update time - `shopify_order_id` (string): Shopify order ID - `shopify_abandon_checkout_id` (integer): Shopify abandon checkout ID - `is_abandoned_order` (boolean): Abandoned-cart flag for creating or updating an order. Send it directly in the request body, not inside `third_party` or `third_party_infomation`. An explicit value, including `false`, takes precedence over automatic detection. If omitted on creation, the flag is determined automatically; if omitted on update, the current value is preserved. Only boolean `true` or string `"true"` is normalized to `true`; all other submitted values become `false`. - `cod` (integer): Cash on delivery - `cash` (integer): Cash payment - `account` (integer): Order source ID - `account_name` (string): Order source name - `advanced_platform_fee` (object): Fees from e-commerce platforms - `ads_top_up` (integer): Ads wallet top-up - `affiliate_commission` (integer): Affiliate commission - `diff_shipping_fee` (integer): Difference shipping fee - `marketplace_voucher` (integer): Marketplace voucher - `payment_fee` (integer): Payment fee - `platform_commission` (integer): Platform commission - `seller_transaction_fee` (integer): Seller transaction fee - `service_fee` (integer): Service fee - `sfp_service_fee` (integer): SFP service fee - `printing_count` (integer): Printing count - `money_to_collect` (integer): Money to collect - `marketplace_id` (string): Marketplace ID Values: `-2`, `-3`, `-4`, `-9`, `-16`, `-17`, `-20`, `-25`, `-27`, `-28`. - `total_price` (integer): Total price - `shop_customer_address_id` (string): Customer address ID - `customer` (object): Customer information - `fb_id` (string): Customer Facebook ID - `id` (string): Customer ID - `name` (string): Customer name - `page_id` (string): Page ID - `total_quantity` (integer): Total quantity - `time_assign_marketer` (string (date-time)): Time assign marketer - `p_utm_source` (string): UTM Source - `p_utm_medium` (string): UTM Medium - `p_utm_campaign` (string): UTM Campaign - `p_utm_term` (string): UTM Term - `p_utm_content` (string): UTM Content - `p_utm_id` (string): UTM ID - `utm_affiliate` (string): Affiliate - `link` (string): Link - `status_history` (object[]): Status update history - `avatar_url` (string): Avatar URL - `editor` (object): Editor information - `editor_fb` (string): Editor Facebook ID - `editor_id` (string): Editor ID - `name` (string): Name - `old_status` (integer): Old status - `status` (integer): Status - `updated_at` (string (date-time)): Updated at - `duplicated_phone` (boolean): Duplicated phone - `order_currency` (string): Order currency - `charged_by_vnpay` (integer): Charged by VNPay - `charged_by_qrpay` (integer): Charged by QRPay - `custom_id` (string): Custom ID - `last_editor` (object): Last editor information - `id` (string): Editor ID - `fb_id` (string): Facebook ID of editor - `name` (string): Editor name - `email` (string): Editor email - `avatar_url` (string): Editor avatar URL - `phone_number` (string): Editor phone number - `last_editor_id` (string): Last editor ID - `charged_by_momo` (integer): Charged by MoMo - `prepaid_by_point` (object): Prepaid by point - `money` (integer): Money amount - `point` (integer): Point amount - `bank_transfer_images` (string (uri)[]): Bank transfer images - `transfer_money` (integer): Transfer money - `lock_order_by_user` (string): Lock order by user ID - `assigning_care` (object): Assigning care information - `id` (string): Care ID - `fb_id` (string): Facebook ID of care - `name` (string): Care name - `email` (string): Care email - `avatar_url` (string): Care avatar URL - `phone_number` (string): Care phone number - `assigning_care_id` (string): Assigning care ID - `time_assign_care` (string (date-time)): Time assign care - `assigning_seller` (object): Assigning seller information - `id` (string): Seller ID - `fb_id` (string): Facebook ID of seller - `name` (string): Seller name - `email` (string): Seller email - `avatar_url` (string): Seller avatar URL - `phone_number` (string): Seller phone number - `einvoices` (EInvoice[]): - `actual_shipping_fee` (integer): Shipping fee - `adjust_amount` (integer): Percentage reduction on revenue - `adjustment_criteria` (integer): Adjustment criteria Values: `1` Quantity adjustment, `2` Price adjustment, `3` Tax rate adjustment, `4` Tax amount adjustment. - `adjustment_type` (integer): Adjustment type Values: `1` Increase adjustment, `2` Decrease adjustment, `3` Information. - `allocation_discounts` (object[]): Allocation discounts - `allocation_type` (integer): Allocation type Values: `1` By unit price, `2` custom. - `bank_account_number` (string): Bank account number - `bank_name` (string): Bank name - `budget_unit_code` (string): Budget unit code - `buyer_not_get_invoice` (boolean): Buyer not get invoice - `creator` (object): Creator information - `discount` (integer): General discount amount - `display_id` (integer): Display ID - `einvoice_account_id` (integer): E-invoice account ID - `email` (string): Email address - `full_name` (string): Buyer's name - `id` (integer): Invoice ID - `identity_code` (string): Buyer's identity code - `included_tax` (integer): Included tax - `invoice_no` (string): Invoice number - `invoice_series` (string): Invoice series - `invoice_type` (integer): Invoice type - `is_adjust_amount` (boolean): Is adjust amount - `is_included_tax` (boolean): Is included tax - `items` (object[]): Invoice items - `key_search` (string): Key search - `last_editor_id` (string): Last editor ID - `note` (string): Note - `order_id` (integer): Order ID - `order_info` (object): Order information - `original_einvoice` (object): Original e-invoice ID - `payment_method` (string): Payment method - `phone_number` (string): Phone number - `purchaser_tax_code` (string): Purchaser tax code - `purchaser_unit` (string): Purchaser unit - `release_date` (string (date-time)): Release date - `release_type` (integer): Release type - `shipping_address` (ShippingAddress): - `shipping_fee` (integer): Shipping fee - `shop_id` (integer): Shop ID - `signature_type` (integer): Signature type - `status` (integer): Status Values: `0` Not released, `1` Pending release, `2` Released, `3` Canceled, `4` Replacement invoice, `5` Replaced invoice, `6` Adjustment invoice, `7` Adjusted. - `tax` (integer): Tax rate - `template_code` (string): Template code - `total_amount` (integer): Total amount - `verification_code` (string): Tax Authority Code - `voucher_book` (object): Voucher book - `charged_by_card` (integer): Charged by card - `estimate_delivery_date` (string (date-time)): Estimate delivery date - `order_sources` (string): Order sources ID - `charged_by_fundiin` (integer): Charged by Fundiin - `surcharge` (integer): Surcharge - `is_linked_partner` (boolean): Is linked partner - `call_laters` (object[]): Call laters - `last_update_status_at` (string (date-time)): Last update status at - `discount_by_customer_level` (integer): Discount by customer level - `viewing` (object[]): Viewing - `additional_info` (object): Additional info - `service_partner` (string): Service partner Values: `instant` Instant. - `delivery_deadline` (string (date-time)): Delivery deadline (ISO8601, no timezone). - `ship_by_date` (integer): Marketplace ship-by deadline (Unix timestamp, seconds) for Shopee/TikTok orders — the order must be handed over to the carrier before this time, otherwise the marketplace may cancel it automatically. Shopee `ship_by_date`, TikTok `collection_due_time`. `0` = the marketplace has not returned it yet; `null` for non-marketplace orders. - `order_returned_ids` (string): Order returned IDs - `cost_surcharge` (integer): Cost surcharge - `time_send_partner` (string (date-time)): Time send partner - `charged_by_kredivo` (integer): Charged by Kredivo - `discount` (integer): Discount - `histories` (object[]): Histories - `duplicated_customer` (boolean): Duplicated customer - `customer_referral_code` (object): Customer referral code - `active` (string): Active status - `customer_id` (string (uuid)): Customer ID - `discount` (string): Discount value - `format` (string): Referral code format - `free_products_priced_between_approx` (object): Free products priced between approximately - `is_percent` (string): Discount is percentage - `only_customers_with_level_will_have_referral_code` (string): Only customers with level will have referral code - `referral_code` (string): Referral code - `reward_points_for_old_customers` (object): Reward points for customers - `shop_customer_id` (string (uuid)): Shop customer ID - `tax` (integer): Tax - `is_from_ecommerce` (boolean): Is from e-commerce - `note_image` (string (uri)[]): Note images - `shopify_draft_order_id` (string): Shopify draft order ID - `display_id` (integer): Display ID - `shop_partner_id` (integer): Shop partner ID - `is_locked` (boolean): Order lock - `merge_order` (boolean): Allows merging orders ## OrderInfo - `id` (integer): Order ID - `system_id` (integer): System ID - `shop_id` (integer): Shop ID - `inserted_at` (string (date-time)): Order creation time - `updated_at` (string (date-time)): Order update time - `status` (integer): Order status Values: `0` New, `17` Waiting for confirmation, `11` Restocking, `12` Wait for printing, `13` Printed, `20` Purchased, `1` Confirmed, `8` Packaging, `9` Waiting for pick up, `2` Shipped, `3` Received, `16` Collected money, `4` Returning, `15` Partial return, `5` Returned, `6` Canceled, `7` Deleted recently. - `status_name` (string): Order status name - `bill_full_name` (string): Customer name - `bill_phone_number` (string): Phone number of customer - `bill_email` (string): Customer email - `conversation_id` (string): Conversation ID - `page_id` (string): Facebook page ID - `post_id` (string): Post ID - `ad_id` (string): Ad ID - `shipping_fee` (integer): Shipping fee - `partner_fee` (integer): Fee from shipping partner - `fee_marketplace` (integer): Fees from e-commerce platforms - `customer_pay_fee` (boolean): Customer pay shipping fee - `is_free_shipping` (boolean): Free shipping - `is_livestream` (boolean): Is livestream order - `is_live_shopping` (boolean): Is live shopping order - `is_smc` (boolean): Shopping on Messenger - `received_at_shop` (boolean): true: Sales at counter, false: Sell online - `total_discount` (integer): Discount total - `note` (string): Internal note - `note_print` (string): Note for printing - `returned_reason` (integer): Return reason code (1: Customer, 2: Staff, 3: Defective product, 4: Shipping carrier, 5: Exchange). Other values are shop-defined custom reasons, see returned_reason_name for the display name - `returned_reason_name` (string): Return reason name - `sub_status` (integer): Reason for delivery delay - `warehouse_id` (string): Warehouse ID - `warehouse_info` (object): Warehouse information - `name` (string): Warehouse name - `phone_number` (string): Warehouse phone number - `full_address` (string): Warehouse full address - `address` (string): Warehouse address - `province_id` (string): Province ID - `district_id` (string): District ID - `commune_id` (string): Commune ID - `affiliate_id` (string): Affiliate ID - `ffm_id` (string): FFM ID - `has_snappy_service` (boolean): Has Snappy service - `custom_id` (string): Custom ID - `creator_id` (string): Creator ID - `creator` (object): Order creator - `id` (string): Creator ID - `fb_id` (string): Facebook ID of creator - `name` (string): Creator name - `avatar_url` (string): Creator avatar URL - `items` (object[]): Product list. When creating or updating an order, each entry must include `variation_id` and `quantity`. `variation_info` is optional — if omitted, the backend treats it as an empty object; send it (with `retail_price`) when you need the line price to be explicit. - `product_id` (string): Product ID - `quantity` (integer, required): Quantity - `returned_count` (integer): Returned count - `assigning_seller_id` (string): Assigning seller ID - `quantity_by_combo_products` (object[]): Quantity by combo products - `discount_each_product` (integer): Discount for each product - `is_bonus_product` (boolean): Is bonus product - `is_discount_percent` (boolean): Is discount by percent - `is_wholesale` (boolean): Is wholesale - `is_composite` (boolean): Is composite product - `one_time_product` (boolean): One time product - `note` (string): Product note - `note_product` (string): Product note - `inserted_at` (string (date-time)): Inserted at - `measure_group_id` (integer): Measure group ID - `variation_info` (object): Variation information. Optional when creating/updating an order (the backend defaults it to an empty object if omitted). Its inner fields are not individually required, but sending `retail_price` is recommended so the line price is correct. - `components` (object[]): Product components - `id` (integer): Item ID - `variation_id` (string, required): Variation ID - `partner` (object): Partner information When updating an order that already has shipping info, only the fields you send are written; omitted fields keep their current values. Send `null` to clear `partner_id`, `extend_code` or `shop_partner_id`. - `partner_id` (integer): Partner ID - `cod` (integer): Reconciliation COD - `extend_code` (string): Shipping order ID on partner system - `total_fee` (integer): Total fee - `updated_at` (string (date-time)): Updated at - `delivery_name` (string): Shipper name - `delivery_tel` (string): Delivery phone - `picked_up_at` (string (date-time)): Picked up at - `sort_code` (string): Sort code - `paid_at` (string (date-time)): Paid at - `system_created` (boolean): System created - `extend_update` (object[]): Update from courier - `partner_status` (string): Partner shipping status Values: `waiting` Waiting for processing, `request_received` Carrier received the request, `processing_picked_up` Processing pickup, `picking_up` Picking up, `delay_pickup` Delayed pickup, `picked_up` Picked up, `waiting_on_the_way` Waiting for transit, `on_the_way` In transit, `contact_delivery_company` Contact the carrier, `out_for_delivery` Out for delivery, `delay_delivery` Delayed delivery, `inform_recipient` Notify the recipient, `undeliverable` Undeliverable, `waiting_for_return` Waiting for return, `delivered` Delivered, `delivered_cod` Delivered, COD reconciled, `returning` Returning, `returned` Returned, `returned_cod` Returned, COD reconciled, `canceled` Canceled. - `partner_name` (string): Partner name - `first_delivery_at` (string (date-time)): First delivery time - `first_undeliverable_at` (string (date-time)): First failed delivery time - `count_of_delivery` (integer): Number of delivery attempts. Courier updates add 1 each time the shipment moves to `out_for_delivery` or `delay_delivery`. Can be set when creating or updating an order (integer 0-32767); omitted or invalid values keep the current value, and later courier updates keep counting from the value you set. - `order_number_vtp` (string): Viettel Post tracking number - `printed_form` (object): Printed form - `shipping_address` (ShippingAddress): - `address` (string): Street address. When creating an order via API, if `address` is provided but `province_id` is left empty, the system automatically parses this free-text address to fill in `province_id`, `district_id` and `commune_id`. Auto-fill is skipped when the parsed location is in Thailand (country code 66) or when no commune can be resolved from the text. - `commnue_name` (string): Commune name - `commune_id` (string): Commune ID - `country_code` (string): Country code - `district_id` (string): District ID - `district_name` (string): District name - `full_address` (string): Full address - `full_name` (string): Full name - `new_full_address` (string): New full address - `new_province_id` (string): New province ID - `phone_number` (string): Phone number - `post_code` (string): Post code - `province_id` (string): Province ID - `province_name` (string): Province name - `render_type` (string): Render type - `payment_purchase_histories` (object[]): Payment histories - `amount` (integer): Amount of money - `type` (string): Payment type - `inserted_at` (string (date-time)): Transaction time - `result_code` (string): Result code - `ipn_reply` (boolean): IPN reply - `voucher_amount` (integer): Voucher amount - `tags` (string[]): Tags - `tags` (object[]): Tags list - `id` (integer): Tag ID - `name` (string): Tag name - `marketer` (object): Marketer information - `id` (string): Marketer ID - `name` (string): Marketer name - `email` (string): Marketer email - `phone_number` (string): Marketer phone number - `fb_id` (string): Marketer Facebook ID - `avatar_url` (string): Marketer avatar URL - `pke_mkter` (string): Marketer ID - `activated_combo_products` (object): Activated combo products information - `combo_product_id` (integer): Combo product ID - `quantity_combo_activated` (integer): Quantity combo activated - `combo_product_info` (object): Combo product information - `activated_promotion_advances` (object[]): Activated promotion advances information - `id` (integer): ID - `promotion_advance_id` (string): Promotion advance ID - `promotion_advance_info` (object): Promotion advance information - `invoice_info_list` (object[]): Invoice information list - `error` (string): Error message if any - `invoice_detail` (object): Invoice detail information. The fields to send depend on `invoice_type`: - `company`: use `company_name`, `company_tax_id`, `company_address`, `company_email` (and optionally `company_address_breakdown`). - `personal`: use `name`, `phone_number`, `identity_code`, `tax_id`, `email`. - `invoice_type` (string): Invoice type: `company` for an organization, `personal` for an individual. Determines which `invoice_detail` fields are used. Values: `company`, `personal`. - `is_requested` (boolean): Customer requests an e-invoice for this order. Set `true` together with `invoice_type` and `invoice_detail` to request invoice issuance. - `order_sn` (string): Order code on the marketplace - `reports_by_phone` (object): Reports by phone number - `order_fail` (integer): Number of failed orders - `order_success` (integer): Number of successful orders - `warning` (integer): Number of warnings orders - `tracking_link` (string): Link confirm order - `payment_link` (string): Payment link - `ads_source` (string): Advertising source - `bank_payments` (object): Payment method - `transfer_proofs` (object[]): Bank transfer payment proofs, including verification time, amount and receipt images - `id` (integer): Transfer proof ID - `order_id` (integer): Order ID - `shop_id` (integer): Shop ID - `payment_id` (string): Bank payment method ID (matches a key in `bank_payments`) - `amount` (integer): Transferred amount - `images` (string[]): Transfer receipt images - `note` (string): Note - `is_income` (boolean): Money received (true) or paid out (false) - `is_verify` (boolean): Whether the transfer has been verified - `verify_at` (string (date-time)): Verification time - `verifier` (object): Verifier information - `creator` (object): Creator information - `last_editor` (object): Last editor information - `order_info` (object): Additional order information - `inserted_at` (string (date-time)): Transfer proof creation time - `updated_at` (string (date-time)): Transfer proof update time - `shopify_order_id` (string): Shopify order ID - `shopify_abandon_checkout_id` (integer): Shopify abandon checkout ID - `is_abandoned_order` (boolean): Abandoned-cart flag for creating or updating an order. Send it directly in the request body, not inside `third_party` or `third_party_infomation`. An explicit value, including `false`, takes precedence over automatic detection. If omitted on creation, the flag is determined automatically; if omitted on update, the current value is preserved. Only boolean `true` or string `"true"` is normalized to `true`; all other submitted values become `false`. - `cod` (integer): Cash on delivery - `cash` (integer): Cash payment - `account` (integer): Order source ID - `account_name` (string): Order source name - `advanced_platform_fee` (object): Fees from e-commerce platforms - `ads_top_up` (integer): Ads wallet top-up - `affiliate_commission` (integer): Affiliate commission - `diff_shipping_fee` (integer): Difference shipping fee - `marketplace_voucher` (integer): Marketplace voucher - `payment_fee` (integer): Payment fee - `platform_commission` (integer): Platform commission - `seller_transaction_fee` (integer): Seller transaction fee - `service_fee` (integer): Service fee - `sfp_service_fee` (integer): SFP service fee - `printing_count` (integer): Printing count - `money_to_collect` (integer): Money to collect - `marketplace_id` (string): Marketplace ID Values: `-2`, `-3`, `-4`, `-9`, `-16`, `-17`, `-20`, `-25`, `-27`, `-28`. - `total_price` (integer): Total price - `shop_customer_address_id` (string): Customer address ID - `customer` (object): Customer information - `fb_id` (string): Customer Facebook ID - `id` (string): Customer ID - `name` (string): Customer name - `page_id` (string): Page ID - `total_quantity` (integer): Total quantity - `time_assign_marketer` (string (date-time)): Time assign marketer - `p_utm_source` (string): UTM Source - `p_utm_medium` (string): UTM Medium - `p_utm_campaign` (string): UTM Campaign - `p_utm_term` (string): UTM Term - `p_utm_content` (string): UTM Content - `p_utm_id` (string): UTM ID - `utm_affiliate` (string): Affiliate - `link` (string): Link - `status_history` (object[]): Status update history - `avatar_url` (string): Avatar URL - `editor` (object): Editor information - `editor_fb` (string): Editor Facebook ID - `editor_id` (string): Editor ID - `name` (string): Name - `old_status` (integer): Old status - `status` (integer): Status - `updated_at` (string (date-time)): Updated at - `duplicated_phone` (boolean): Duplicated phone - `order_currency` (string): Order currency - `charged_by_vnpay` (integer): Charged by VNPay - `charged_by_qrpay` (integer): Charged by QRPay - `custom_id` (string): Custom ID - `last_editor` (object): Last editor information - `id` (string): Editor ID - `fb_id` (string): Facebook ID of editor - `name` (string): Editor name - `email` (string): Editor email - `avatar_url` (string): Editor avatar URL - `phone_number` (string): Editor phone number - `last_editor_id` (string): Last editor ID - `charged_by_momo` (integer): Charged by MoMo - `prepaid_by_point` (object): Prepaid by point - `money` (integer): Money amount - `point` (integer): Point amount - `bank_transfer_images` (string (uri)[]): Bank transfer images - `transfer_money` (integer): Transfer money - `lock_order_by_user` (string): Lock order by user ID - `assigning_care` (object): Assigning care information - `id` (string): Care ID - `fb_id` (string): Facebook ID of care - `name` (string): Care name - `email` (string): Care email - `avatar_url` (string): Care avatar URL - `phone_number` (string): Care phone number - `assigning_care_id` (string): Assigning care ID - `time_assign_care` (string (date-time)): Time assign care - `assigning_seller` (object): Assigning seller information - `id` (string): Seller ID - `fb_id` (string): Facebook ID of seller - `name` (string): Seller name - `email` (string): Seller email - `avatar_url` (string): Seller avatar URL - `phone_number` (string): Seller phone number - `einvoices` (EInvoice[]): - `actual_shipping_fee` (integer): Shipping fee - `adjust_amount` (integer): Percentage reduction on revenue - `adjustment_criteria` (integer): Adjustment criteria Values: `1` Quantity adjustment, `2` Price adjustment, `3` Tax rate adjustment, `4` Tax amount adjustment. - `adjustment_type` (integer): Adjustment type Values: `1` Increase adjustment, `2` Decrease adjustment, `3` Information. - `allocation_discounts` (object[]): Allocation discounts - `allocation_type` (integer): Allocation type Values: `1` By unit price, `2` custom. - `bank_account_number` (string): Bank account number - `bank_name` (string): Bank name - `budget_unit_code` (string): Budget unit code - `buyer_not_get_invoice` (boolean): Buyer not get invoice - `creator` (object): Creator information - `discount` (integer): General discount amount - `display_id` (integer): Display ID - `einvoice_account_id` (integer): E-invoice account ID - `email` (string): Email address - `full_name` (string): Buyer's name - `id` (integer): Invoice ID - `identity_code` (string): Buyer's identity code - `included_tax` (integer): Included tax - `invoice_no` (string): Invoice number - `invoice_series` (string): Invoice series - `invoice_type` (integer): Invoice type - `is_adjust_amount` (boolean): Is adjust amount - `is_included_tax` (boolean): Is included tax - `items` (object[]): Invoice items - `key_search` (string): Key search - `last_editor_id` (string): Last editor ID - `note` (string): Note - `order_id` (integer): Order ID - `order_info` (object): Order information - `original_einvoice` (object): Original e-invoice ID - `payment_method` (string): Payment method - `phone_number` (string): Phone number - `purchaser_tax_code` (string): Purchaser tax code - `purchaser_unit` (string): Purchaser unit - `release_date` (string (date-time)): Release date - `release_type` (integer): Release type - `shipping_address` (ShippingAddress): - `shipping_fee` (integer): Shipping fee - `shop_id` (integer): Shop ID - `signature_type` (integer): Signature type - `status` (integer): Status Values: `0` Not released, `1` Pending release, `2` Released, `3` Canceled, `4` Replacement invoice, `5` Replaced invoice, `6` Adjustment invoice, `7` Adjusted. - `tax` (integer): Tax rate - `template_code` (string): Template code - `total_amount` (integer): Total amount - `verification_code` (string): Tax Authority Code - `voucher_book` (object): Voucher book - `charged_by_card` (integer): Charged by card - `estimate_delivery_date` (string (date-time)): Estimate delivery date - `order_sources` (string): Order sources ID - `charged_by_fundiin` (integer): Charged by Fundiin - `surcharge` (integer): Surcharge - `is_linked_partner` (boolean): Is linked partner - `call_laters` (object[]): Call laters - `last_update_status_at` (string (date-time)): Last update status at - `discount_by_customer_level` (integer): Discount by customer level - `viewing` (object[]): Viewing - `additional_info` (object): Additional info - `service_partner` (string): Service partner Values: `instant` Instant. - `delivery_deadline` (string (date-time)): Delivery deadline (ISO8601, no timezone). - `ship_by_date` (integer): Marketplace ship-by deadline (Unix timestamp, seconds) for Shopee/TikTok orders — the order must be handed over to the carrier before this time, otherwise the marketplace may cancel it automatically. Shopee `ship_by_date`, TikTok `collection_due_time`. `0` = the marketplace has not returned it yet; `null` for non-marketplace orders. - `order_returned_ids` (string): Order returned IDs - `cost_surcharge` (integer): Cost surcharge - `time_send_partner` (string (date-time)): Time send partner - `charged_by_kredivo` (integer): Charged by Kredivo - `discount` (integer): Discount - `histories` (object[]): Histories - `duplicated_customer` (boolean): Duplicated customer - `customer_referral_code` (object): Customer referral code - `active` (string): Active status - `customer_id` (string (uuid)): Customer ID - `discount` (string): Discount value - `format` (string): Referral code format - `free_products_priced_between_approx` (object): Free products priced between approximately - `is_percent` (string): Discount is percentage - `only_customers_with_level_will_have_referral_code` (string): Only customers with level will have referral code - `referral_code` (string): Referral code - `reward_points_for_old_customers` (object): Reward points for customers - `shop_customer_id` (string (uuid)): Shop customer ID - `tax` (integer): Tax - `is_from_ecommerce` (boolean): Is from e-commerce - `note_image` (string (uri)[]): Note images - `shopify_draft_order_id` (string): Shopify draft order ID - `display_id` (integer): Display ID - `shop_partner_id` (integer): Shop partner ID - `is_locked` (boolean): Order lock - `merge_order` (boolean): Allows merging orders ## EInvoice E-invoice information - `actual_shipping_fee` (integer): Shipping fee - `adjust_amount` (integer): Percentage reduction on revenue - `adjustment_criteria` (integer): Adjustment criteria Values: `1` Quantity adjustment, `2` Price adjustment, `3` Tax rate adjustment, `4` Tax amount adjustment. - `adjustment_type` (integer): Adjustment type Values: `1` Increase adjustment, `2` Decrease adjustment, `3` Information. - `allocation_discounts` (object[]): Allocation discounts - `allocation_type` (integer): Allocation type Values: `1` By unit price, `2` custom. - `bank_account_number` (string): Bank account number - `bank_name` (string): Bank name - `budget_unit_code` (string): Budget unit code - `buyer_not_get_invoice` (boolean): Buyer not get invoice - `creator` (object): Creator information - `avatar_url` (string): Avatar URL - `fb_id` (string): Facebook ID - `id` (string): Creator ID - `name` (string): Creator name - `discount` (integer): General discount amount - `display_id` (integer): Display ID - `einvoice_account_id` (integer): E-invoice account ID - `email` (string): Email address - `full_name` (string): Buyer's name - `id` (integer): Invoice ID - `identity_code` (string): Buyer's identity code - `included_tax` (integer): Included tax - `invoice_no` (string): Invoice number - `invoice_series` (string): Invoice series - `invoice_type` (integer): Invoice type - `is_adjust_amount` (boolean): Is adjust amount - `is_included_tax` (boolean): Is included tax - `items` (object[]): Invoice items - `adjust_amount` (integer): Adjust amount - `discount` (integer): Discount amount - `id` (integer): Item ID - `is_calculation_tax` (boolean): Is calculation tax - `is_component` (boolean): Is component - `is_surcharge` (boolean): Is surcharge - `measure` (string): Measure - `note` (string): Note - `order_id` (integer): Order ID - `order_item_id` (integer): Order item ID - `quantity` (integer): Quantity - `retail_price` (integer): Retail price - `tax` (integer): Tax rate - `type` (integer): Item type - `variation` (object): Variation information - `variation_id` (string): Variation ID - `variation_info` (object): Variation information details - `key_search` (string): Key search - `last_editor_id` (string): Last editor ID - `note` (string): Note - `order_id` (integer): Order ID - `order_info` (object): Order information - `account` (string): Account - `account_source` (string): Account source - `cod` (integer): COD amount - `custom_id` (string): Custom ID - `display_id` (integer): Display ID - `order_currency` (string): Order currency - `order_sources` (string): Order sources - `page` (object): Page information - `page_id` (string): Page ID - `partner` (object): Partner information - `shop_customer_id` (string): Shop customer ID - `warehouse_id` (string): Warehouse ID - `original_einvoice` (object): Original e-invoice ID - `payment_method` (string): Payment method - `phone_number` (string): Phone number - `purchaser_tax_code` (string): Purchaser tax code - `purchaser_unit` (string): Purchaser unit - `release_date` (string (date-time)): Release date - `release_type` (integer): Release type - `shipping_address` (ShippingAddress): - `address` (string): Street address. When creating an order via API, if `address` is provided but `province_id` is left empty, the system automatically parses this free-text address to fill in `province_id`, `district_id` and `commune_id`. Auto-fill is skipped when the parsed location is in Thailand (country code 66) or when no commune can be resolved from the text. - `commnue_name` (string): Commune name - `commune_id` (string): Commune ID - `country_code` (string): Country code - `district_id` (string): District ID - `district_name` (string): District name - `full_address` (string): Full address - `full_name` (string): Full name - `new_full_address` (string): New full address - `new_province_id` (string): New province ID - `phone_number` (string): Phone number - `post_code` (string): Post code - `province_id` (string): Province ID - `province_name` (string): Province name - `render_type` (string): Render type - `shipping_fee` (integer): Shipping fee - `shop_id` (integer): Shop ID - `signature_type` (integer): Signature type - `status` (integer): Status Values: `0` Not released, `1` Pending release, `2` Released, `3` Canceled, `4` Replacement invoice, `5` Replaced invoice, `6` Adjustment invoice, `7` Adjusted. - `tax` (integer): Tax rate - `template_code` (string): Template code - `total_amount` (integer): Total amount - `verification_code` (string): Tax Authority Code - `voucher_book` (object): Voucher book ## ShippingAddress Shipping address - `address` (string): Street address. When creating an order via API, if `address` is provided but `province_id` is left empty, the system automatically parses this free-text address to fill in `province_id`, `district_id` and `commune_id`. Auto-fill is skipped when the parsed location is in Thailand (country code 66) or when no commune can be resolved from the text. - `commnue_name` (string): Commune name - `commune_id` (string): Commune ID - `country_code` (string): Country code - `district_id` (string): District ID - `district_name` (string): District name - `full_address` (string): Full address - `full_name` (string): Full name - `new_full_address` (string): New full address - `new_province_id` (string): New province ID - `phone_number` (string): Phone number - `post_code` (string): Post code - `province_id` (string): Province ID - `province_name` (string): Province name - `render_type` (string): Render type ## ReturnOrder Return order information - `id` (integer): Return order ID - `display_id` (integer): Display ID - `bill_full_name` (string): Customer name - `bill_phone_number` (string): Phone number of customer - `creator_id` (string): Creator ID - `custom_id` (string): Custom ID - `discount` (integer): Discount total - `discount_from_order_to_returned` (integer): Discount from order to returned - `inserted_at` (string (date-time)): Created at - `updated_at` (string (date-time)): Updated at - `order_id` (integer): Order ID - `order_id_to_returned` (integer): Order ID to returned - `order` (object): - `id` (integer): Order ID - `system_id` (integer): System ID - `shop_id` (integer): Shop ID - `inserted_at` (string (date-time)): Order creation time - `updated_at` (string (date-time)): Order update time - `status` (integer): Order status Values: `0` New, `17` Waiting for confirmation, `11` Restocking, `12` Wait for printing, `13` Printed, `20` Purchased, `1` Confirmed, `8` Packaging, `9` Waiting for pick up, `2` Shipped, `3` Received, `16` Collected money, `4` Returning, `15` Partial return, `5` Returned, `6` Canceled, `7` Deleted recently. - `status_name` (string): Order status name - `bill_full_name` (string): Customer name - `bill_phone_number` (string): Phone number of customer - `bill_email` (string): Customer email - `conversation_id` (string): Conversation ID - `page_id` (string): Facebook page ID - `post_id` (string): Post ID - `ad_id` (string): Ad ID - `shipping_fee` (integer): Shipping fee - `partner_fee` (integer): Fee from shipping partner - `fee_marketplace` (integer): Fees from e-commerce platforms - `customer_pay_fee` (boolean): Customer pay shipping fee - `is_free_shipping` (boolean): Free shipping - `is_livestream` (boolean): Is livestream order - `is_live_shopping` (boolean): Is live shopping order - `is_smc` (boolean): Shopping on Messenger - `received_at_shop` (boolean): true: Sales at counter, false: Sell online - `total_discount` (integer): Discount total - `note` (string): Internal note - `note_print` (string): Note for printing - `returned_reason` (integer): Return reason code (1: Customer, 2: Staff, 3: Defective product, 4: Shipping carrier, 5: Exchange). Other values are shop-defined custom reasons, see returned_reason_name for the display name - `returned_reason_name` (string): Return reason name - `sub_status` (integer): Reason for delivery delay - `warehouse_id` (string): Warehouse ID - `warehouse_info` (object): Warehouse information - `creator_id` (string): Creator ID - `creator` (object): Order creator - `items` (object[]): Product list. When creating or updating an order, each entry must include `variation_id` and `quantity`. `variation_info` is optional — if omitted, the backend treats it as an empty object; send it (with `retail_price`) when you need the line price to be explicit. - `partner` (object): Partner information When updating an order that already has shipping info, only the fields you send are written; omitted fields keep their current values. Send `null` to clear `partner_id`, `extend_code` or `shop_partner_id`. - `shipping_address` (ShippingAddress): - `payment_purchase_histories` (object[]): Payment histories - `tags` (object[]): Tags list - `marketer` (object): Marketer information - `pke_mkter` (string): Marketer ID - `activated_combo_products` (object): Activated combo products information - `activated_promotion_advances` (object[]): Activated promotion advances information - `invoice_info_list` (object[]): Invoice information list - `reports_by_phone` (object): Reports by phone number - `tracking_link` (string): Link confirm order - `payment_link` (string): Payment link - `ads_source` (string): Advertising source - `bank_payments` (object): Payment method - `transfer_proofs` (object[]): Bank transfer payment proofs, including verification time, amount and receipt images - `shopify_order_id` (string): Shopify order ID - `shopify_abandon_checkout_id` (integer): Shopify abandon checkout ID - `is_abandoned_order` (boolean): Abandoned-cart flag for creating or updating an order. Send it directly in the request body, not inside `third_party` or `third_party_infomation`. An explicit value, including `false`, takes precedence over automatic detection. If omitted on creation, the flag is determined automatically; if omitted on update, the current value is preserved. Only boolean `true` or string `"true"` is normalized to `true`; all other submitted values become `false`. - `cod` (integer): Cash on delivery - `cash` (integer): Cash payment - `account` (integer): Order source ID - `account_name` (string): Order source name - `advanced_platform_fee` (object): Fees from e-commerce platforms - `printing_count` (integer): Printing count - `money_to_collect` (integer): Money to collect - `marketplace_id` (string): Marketplace ID Values: `-2`, `-3`, `-4`, `-9`, `-16`, `-17`, `-20`, `-25`, `-27`, `-28`. - `total_price` (integer): Total price - `shop_customer_address_id` (string): Customer address ID - `customer` (object): Customer information - `total_quantity` (integer): Total quantity - `time_assign_marketer` (string (date-time)): Time assign marketer - `p_utm_source` (string): UTM Source - `p_utm_medium` (string): UTM Medium - `p_utm_campaign` (string): UTM Campaign - `p_utm_term` (string): UTM Term - `p_utm_content` (string): UTM Content - `p_utm_id` (string): UTM ID - `utm_affiliate` (string): Affiliate - `link` (string): Link - `status_history` (object[]): Status update history - `duplicated_phone` (boolean): Duplicated phone - `order_currency` (string): Order currency - `charged_by_vnpay` (integer): Charged by VNPay - `charged_by_qrpay` (integer): Charged by QRPay - `custom_id` (string): Custom ID - `last_editor` (object): Last editor information - `last_editor_id` (string): Last editor ID - `charged_by_momo` (integer): Charged by MoMo - `prepaid_by_point` (object): Prepaid by point - `bank_transfer_images` (string (uri)[]): Bank transfer images - `transfer_money` (integer): Transfer money - `lock_order_by_user` (string): Lock order by user ID - `assigning_care` (object): Assigning care information - `assigning_care_id` (string): Assigning care ID - `time_assign_care` (string (date-time)): Time assign care - `assigning_seller` (object): Assigning seller information - `einvoices` (EInvoice[]): - `charged_by_card` (integer): Charged by card - `estimate_delivery_date` (string (date-time)): Estimate delivery date - `order_sources` (string): Order sources ID - `charged_by_fundiin` (integer): Charged by Fundiin - `surcharge` (integer): Surcharge - `is_linked_partner` (boolean): Is linked partner - `call_laters` (object[]): Call laters - `last_update_status_at` (string (date-time)): Last update status at - `discount_by_customer_level` (integer): Discount by customer level - `viewing` (object[]): Viewing - `additional_info` (object): Additional info - `order_returned_ids` (string): Order returned IDs - `cost_surcharge` (integer): Cost surcharge - `time_send_partner` (string (date-time)): Time send partner - `charged_by_kredivo` (integer): Charged by Kredivo - `discount` (integer): Discount - `histories` (object[]): Histories - `duplicated_customer` (boolean): Duplicated customer - `customer_referral_code` (object): Customer referral code - `tax` (integer): Tax - `is_from_ecommerce` (boolean): Is from e-commerce - `note_image` (string (uri)[]): Note images - `shopify_draft_order_id` (string): Shopify draft order ID - `display_id` (integer): Display ID - `shop_partner_id` (integer): Shop partner ID - `is_locked` (boolean): Order lock - `merge_order` (boolean): Allows merging orders - `order_to_returned` (object): - `id` (integer): Order ID - `system_id` (integer): System ID - `shop_id` (integer): Shop ID - `inserted_at` (string (date-time)): Order creation time - `updated_at` (string (date-time)): Order update time - `status` (integer): Order status Values: `0` New, `17` Waiting for confirmation, `11` Restocking, `12` Wait for printing, `13` Printed, `20` Purchased, `1` Confirmed, `8` Packaging, `9` Waiting for pick up, `2` Shipped, `3` Received, `16` Collected money, `4` Returning, `15` Partial return, `5` Returned, `6` Canceled, `7` Deleted recently. - `status_name` (string): Order status name - `bill_full_name` (string): Customer name - `bill_phone_number` (string): Phone number of customer - `bill_email` (string): Customer email - `conversation_id` (string): Conversation ID - `page_id` (string): Facebook page ID - `post_id` (string): Post ID - `ad_id` (string): Ad ID - `shipping_fee` (integer): Shipping fee - `partner_fee` (integer): Fee from shipping partner - `fee_marketplace` (integer): Fees from e-commerce platforms - `customer_pay_fee` (boolean): Customer pay shipping fee - `is_free_shipping` (boolean): Free shipping - `is_livestream` (boolean): Is livestream order - `is_live_shopping` (boolean): Is live shopping order - `is_smc` (boolean): Shopping on Messenger - `received_at_shop` (boolean): true: Sales at counter, false: Sell online - `total_discount` (integer): Discount total - `note` (string): Internal note - `note_print` (string): Note for printing - `returned_reason` (integer): Return reason code (1: Customer, 2: Staff, 3: Defective product, 4: Shipping carrier, 5: Exchange). Other values are shop-defined custom reasons, see returned_reason_name for the display name - `returned_reason_name` (string): Return reason name - `sub_status` (integer): Reason for delivery delay - `warehouse_id` (string): Warehouse ID - `warehouse_info` (object): Warehouse information - `creator_id` (string): Creator ID - `creator` (object): Order creator - `items` (object[]): Product list. When creating or updating an order, each entry must include `variation_id` and `quantity`. `variation_info` is optional — if omitted, the backend treats it as an empty object; send it (with `retail_price`) when you need the line price to be explicit. - `partner` (object): Partner information When updating an order that already has shipping info, only the fields you send are written; omitted fields keep their current values. Send `null` to clear `partner_id`, `extend_code` or `shop_partner_id`. - `shipping_address` (ShippingAddress): - `payment_purchase_histories` (object[]): Payment histories - `tags` (object[]): Tags list - `marketer` (object): Marketer information - `pke_mkter` (string): Marketer ID - `activated_combo_products` (object): Activated combo products information - `activated_promotion_advances` (object[]): Activated promotion advances information - `invoice_info_list` (object[]): Invoice information list - `reports_by_phone` (object): Reports by phone number - `tracking_link` (string): Link confirm order - `payment_link` (string): Payment link - `ads_source` (string): Advertising source - `bank_payments` (object): Payment method - `transfer_proofs` (object[]): Bank transfer payment proofs, including verification time, amount and receipt images - `shopify_order_id` (string): Shopify order ID - `shopify_abandon_checkout_id` (integer): Shopify abandon checkout ID - `is_abandoned_order` (boolean): Abandoned-cart flag for creating or updating an order. Send it directly in the request body, not inside `third_party` or `third_party_infomation`. An explicit value, including `false`, takes precedence over automatic detection. If omitted on creation, the flag is determined automatically; if omitted on update, the current value is preserved. Only boolean `true` or string `"true"` is normalized to `true`; all other submitted values become `false`. - `cod` (integer): Cash on delivery - `cash` (integer): Cash payment - `account` (integer): Order source ID - `account_name` (string): Order source name - `advanced_platform_fee` (object): Fees from e-commerce platforms - `printing_count` (integer): Printing count - `money_to_collect` (integer): Money to collect - `marketplace_id` (string): Marketplace ID Values: `-2`, `-3`, `-4`, `-9`, `-16`, `-17`, `-20`, `-25`, `-27`, `-28`. - `total_price` (integer): Total price - `shop_customer_address_id` (string): Customer address ID - `customer` (object): Customer information - `total_quantity` (integer): Total quantity - `time_assign_marketer` (string (date-time)): Time assign marketer - `p_utm_source` (string): UTM Source - `p_utm_medium` (string): UTM Medium - `p_utm_campaign` (string): UTM Campaign - `p_utm_term` (string): UTM Term - `p_utm_content` (string): UTM Content - `p_utm_id` (string): UTM ID - `utm_affiliate` (string): Affiliate - `link` (string): Link - `status_history` (object[]): Status update history - `duplicated_phone` (boolean): Duplicated phone - `order_currency` (string): Order currency - `charged_by_vnpay` (integer): Charged by VNPay - `charged_by_qrpay` (integer): Charged by QRPay - `custom_id` (string): Custom ID - `last_editor` (object): Last editor information - `last_editor_id` (string): Last editor ID - `charged_by_momo` (integer): Charged by MoMo - `prepaid_by_point` (object): Prepaid by point - `bank_transfer_images` (string (uri)[]): Bank transfer images - `transfer_money` (integer): Transfer money - `lock_order_by_user` (string): Lock order by user ID - `assigning_care` (object): Assigning care information - `assigning_care_id` (string): Assigning care ID - `time_assign_care` (string (date-time)): Time assign care - `assigning_seller` (object): Assigning seller information - `einvoices` (EInvoice[]): - `charged_by_card` (integer): Charged by card - `estimate_delivery_date` (string (date-time)): Estimate delivery date - `order_sources` (string): Order sources ID - `charged_by_fundiin` (integer): Charged by Fundiin - `surcharge` (integer): Surcharge - `is_linked_partner` (boolean): Is linked partner - `call_laters` (object[]): Call laters - `last_update_status_at` (string (date-time)): Last update status at - `discount_by_customer_level` (integer): Discount by customer level - `viewing` (object[]): Viewing - `additional_info` (object): Additional info - `order_returned_ids` (string): Order returned IDs - `cost_surcharge` (integer): Cost surcharge - `time_send_partner` (string (date-time)): Time send partner - `charged_by_kredivo` (integer): Charged by Kredivo - `discount` (integer): Discount - `histories` (object[]): Histories - `duplicated_customer` (boolean): Duplicated customer - `customer_referral_code` (object): Customer referral code - `tax` (integer): Tax - `is_from_ecommerce` (boolean): Is from e-commerce - `note_image` (string (uri)[]): Note images - `shopify_draft_order_id` (string): Shopify draft order ID - `display_id` (integer): Display ID - `shop_partner_id` (integer): Shop partner ID - `is_locked` (boolean): Order lock - `merge_order` (boolean): Allows merging orders - `returned_items` (object[]): List of returned items - `id` (integer): Returned item ID - `product_id` (string): Product ID - `variation_id` (string): Variation ID - `returned_quantity` (integer): Returned quantity - `discount_each_product` (integer): Discount for each product - `is_discount_percent` (boolean): Is discount by percent - `variation_info` (object): Variation information - `returned_fee` (integer): Returned fee - `shop_customer_id` (string): Customer ID - `shop_id` (integer): Shop ID - `status` (integer): Return order status Values: `0` New, `1` Completed, `2` Shipped, `4` Canceled. - `status_histories` (object[]): Status history - `id` (string): History ID - `editor_id` (string): Editor ID - `old_status` (integer): Old status - `status` (integer): Status - `inserted_at` (string (date-time)): Created at - `updated_at` (string (date-time)): Updated at - `tags` (integer[]): Tags list - `warehouse_id` (string): Warehouse ID ## Shop Shop information - `avatar_url` (string): Avatar image link - `name` (string): Shop name - `currency` (string): Shop currency code, for example `VND` - `id` (integer): Shop ID - `preferred_shop` (integer,null): User-specific preferred shop rank. Lower values have higher priority - `pages` (object[]): Pages information in shop - `id` (string): Page ID - `name` (string): Page name - `platform` (string): Platform (e.g., facebook) - `settings` (object): Page settings - `shop_id` (integer): Shop ID - `link_post_marketer` (object[]): Information of link post / source / AD account with marketer - `ad_account_id` (string): AD account ID - `id` (string): Link ID - `inserted_at` (string (date-time)): Inserted at - `marketer` (string): Marketer ID - `multiple_post` (string[]): Post ID - `multiple_source` (object[]): Source information - `shop_id` (integer): Shop ID - `type` (string): Type of link (post: "Post", source: "Source", ad_account_id: "AD account") ## Warehouse Warehouse information - `id` (string): Warehouse ID - `name` (string): Warehouse name - `address` (string): Warehouse address - `full_address` (string): Warehouse full address - `phone_number` (string): Warehouse phone number - `province_id` (string): Province ID. For a Viet Nam warehouse using the new (2-level, post-merger) address, this is the new province ID (e.g. `84_VN102`) - `district_id` (string): District ID. Always `null` for a Viet Nam warehouse using the new address (no district level) - `commune_id` (string): Commune ID. For a Viet Nam warehouse using the new address, this is the new commune ID (e.g. `84_VN10236`) - `country_code` (string): Country code - `shop_id` (integer): Shop ID - `allow_create_order` (boolean): Allow create order - `custom_id` (string): Custom ID - `affiliate_shop_id` (integer): Affiliate shop ID - `affiliate_warehouse` (string): Affiliate warehouse name ## VariationWarehouse Per-warehouse stock detail for a variation. - `id` (string): Variation-warehouse record ID - `variation_id` (string): Variation ID - `warehouse_id` (string): Warehouse ID - `shop_id` (integer): Shop ID - `remain_quantity` (integer): Sellable quantity. May include incoming/waiting stock depending on shop settings. - `available_quantity` (integer): remain_quantity clamped to be non-negative (max(0, remain_quantity)). - `actual_remain_quantity` (integer): Quantity physically on hand in the warehouse. - `total_quantity` (integer): Total quantity recorded at this warehouse. - `waitting_quantity` (integer): Quantity tied up in orders that are awaiting stock (orders placed but waiting for goods to arrive). (Field name keeps the legacy `waitt-` spelling.) - `pending_quantity` (integer): Quantity reserved by pending purchase orders. - `transfer_quantity` (integer): Quantity currently being transferred out. - `pending_transfer_quantity` (integer): Quantity pending transfer (not yet shipped between warehouses). - `pending_export_quantity` (integer): Quantity pending export. - `shipping_quantity` (integer): Quantity tied up in orders being shipped. - `returning_quantity` (integer): Quantity in the process of being returned to this warehouse. - `defect_quantity` (integer): Damaged/defective quantity. - `total_quantity_transfer` (integer): Total quantity across transfer operations. - `shelf_quantity` (integer): Quantity placed on the shelf. - `quantity_in_batch` (integer): Quantity in the batch/lot. - `batch_position` (string): Batch/lot location label. - `shelf_position` (string): Shelf location label. - `selling_status` (string): Selling-speed status of the variation at this warehouse. Values: `none` Testing, `bad` Sell slow, `normal` Normal, `star` Sell fast. - `selling_avg` (number): Average quantity sold per period — combine with remain_quantity to estimate days of stock left (for "running low" detection). - `avg_price` (number): Average cost price of the stock at this warehouse. - `nearly_out` (boolean): True when stock has reached the configured warning threshold (nearly out of stock). - `not_permission_view_quantity` (boolean): True when the current user lacks permission to view quantities for this warehouse (quantity fields are then hidden/zeroed). ## VariationSize Variation size (dimensions) - `length` (integer): Length - `width` (integer): Width - `height` (integer): Height ## RetailPriceByCurrency Retail price of the variation in one currency - `currency` (string, required): Currency code (ISO 4217) - `retailPriceByCurrency` (number,string, required): Retail price in this currency. Requests accept a number; responses return it as a string. ## Variation Product variation information - `id` (string): Variation ID - `fields` (object[]): Variation fields - `name` (string): Field name - `value` (string): Field value - `images` (string (uri)[]): Variation images - `last_imported_price` (integer): Imported price - `retail_price` (integer): Variation retail price - `price_at_counter` (integer): Counter price - `retail_price_by_currency` (RetailPriceByCurrency[]): Retail prices by currency (for shops using multiple currencies). If sent, the list is saved as is, so include every currency you want to keep. If omitted while `retail_price` is sent and the shop uses multiple currencies, the price of the shop's default currency is synced from `retail_price`. - `currency` (string, required): Currency code (ISO 4217) - `retailPriceByCurrency` (number,string, required): Retail price in this currency. Requests accept a number; responses return it as a string. - `weight` (integer): Variation weight - `size` (VariationSize): - `length` (integer): Length - `width` (integer): Width - `height` (integer): Height - `barcode` (string): Variation barcode - `custom_id` (string): Variation custom ID - `is_hidden` (boolean): Store cake status variation - `variations_warehouses` (VariationWarehouse[]): Warehouse info - `id` (string): Variation-warehouse record ID - `variation_id` (string): Variation ID - `warehouse_id` (string): Warehouse ID - `shop_id` (integer): Shop ID - `remain_quantity` (integer): Sellable quantity. May include incoming/waiting stock depending on shop settings. - `available_quantity` (integer): remain_quantity clamped to be non-negative (max(0, remain_quantity)). - `actual_remain_quantity` (integer): Quantity physically on hand in the warehouse. - `total_quantity` (integer): Total quantity recorded at this warehouse. - `waitting_quantity` (integer): Quantity tied up in orders that are awaiting stock (orders placed but waiting for goods to arrive). (Field name keeps the legacy `waitt-` spelling.) - `pending_quantity` (integer): Quantity reserved by pending purchase orders. - `transfer_quantity` (integer): Quantity currently being transferred out. - `pending_transfer_quantity` (integer): Quantity pending transfer (not yet shipped between warehouses). - `pending_export_quantity` (integer): Quantity pending export. - `shipping_quantity` (integer): Quantity tied up in orders being shipped. - `returning_quantity` (integer): Quantity in the process of being returned to this warehouse. - `defect_quantity` (integer): Damaged/defective quantity. - `total_quantity_transfer` (integer): Total quantity across transfer operations. - `shelf_quantity` (integer): Quantity placed on the shelf. - `quantity_in_batch` (integer): Quantity in the batch/lot. - `batch_position` (string): Batch/lot location label. - `shelf_position` (string): Shelf location label. - `selling_status` (string): Selling-speed status of the variation at this warehouse. Values: `none` Testing, `bad` Sell slow, `normal` Normal, `star` Sell fast. - `selling_avg` (number): Average quantity sold per period — combine with remain_quantity to estimate days of stock left (for "running low" detection). - `avg_price` (number): Average cost price of the stock at this warehouse. - `nearly_out` (boolean): True when stock has reached the configured warning threshold (nearly out of stock). - `not_permission_view_quantity` (boolean): True when the current user lacks permission to view quantities for this warehouse (quantity fields are then hidden/zeroed). - `wholesale_price2` (object[]): Wholesale prices by product quantity - `levelProduct` (string): Product quantity to apply the wholesale price - `wholesalePrices` (string): Wholesale price - `is_removed` (boolean): Is removed - `keyword` (string): Keyword ## Product Product information - `measure_group_id` (integer): Measure group ID - `name` (string, required): Product name - `type` (string): Product type. `product`: Product (default). `accessory`: Accessory, comes with orders, has no retail price (retail price is reset to 0) and is not counted in sold quantity reports. `service`: Service, inventory is not managed. `LOT`: Product with expiry date, inventory is managed by lot and a lot must be chosen when importing or exporting stock (requires the shop to enable lot management). Values: `product`, `accessory`, `service`, `LOT`. - `category_ids` (integer[]): Category IDs - `note` (string): Internal note - `note_product` (string): Product note - `product_attributes` (object[]): Product attributes - `name` (string): Attribute name - `values` (string[]): Attribute values - `tags` (integer[]): Product tags - `weight` (integer, required): Product weight - `custom_id` (string): Product custom ID - `is_published` (boolean): Store cake status - `variations` (Variation[]): Product variations - `id` (string): Variation ID - `fields` (object[]): Variation fields - `images` (string (uri)[]): Variation images - `last_imported_price` (integer): Imported price - `retail_price` (integer): Variation retail price - `price_at_counter` (integer): Counter price - `retail_price_by_currency` (RetailPriceByCurrency[]): Retail prices by currency (for shops using multiple currencies). If sent, the list is saved as is, so include every currency you want to keep. If omitted while `retail_price` is sent and the shop uses multiple currencies, the price of the shop's default currency is synced from `retail_price`. - `weight` (integer): Variation weight - `size` (VariationSize): - `barcode` (string): Variation barcode - `custom_id` (string): Variation custom ID - `is_hidden` (boolean): Store cake status variation - `variations_warehouses` (VariationWarehouse[]): Warehouse info - `wholesale_price2` (object[]): Wholesale prices by product quantity - `is_removed` (boolean): Is removed - `keyword` (string): Keyword - `bonus_products` (object[]): Bonus products - `quantity` (integer, required): Bonus product quantity - `variation_id` (string, required): Variation ID of the bonus product - `price_original` (integer, required): Original price of the bonus product - `images` (string (uri)[]): Bonus product images - `variation_info` (object, required): Variation information of the bonus product - `materials` (integer[]): Material IDs - `keyword` (string): Keyword - `brand_id` (string (uuid)): Brand ID ## Customer Customer information - `id` (string): Customer ID - `name` (string): Full name - `gender` (string): Gender - `emails` (string[]): Email addresses - `phone_numbers` (string[]): Phone numbers - `pages_customers` (object[]): Customer's linked pages - `id` (string): Page ID - `name` (string): Page name - `platform` (string): Platform - `date_of_birth` (string (date)): Date of birth - `reward_point` (number): Reward point - `is_discount_by_level` (boolean): Discount based on level - `tags` (string[]): Customer tags - `is_block` (boolean): Block customer - `assigned_user_id` (string): Assigned employee ID - `level_id` (string): Customer level ID - `notes` (object[]): Customer notes - `id` (string): Note ID - `message` (string): Note content - `images` (object[]): Note images - `shop_customer_address` (object[]): Customer addresses - `id` (string): Address ID (include to update, omit to create new) - `country_code` (integer): Country code - `province_id` (string): Province ID - `district_id` (string): District ID - `commune_id` (string): Commune ID - `address` (string): Address - `full_address` (string): Full address - `full_name` (string): Recipient name - `phone_number` (string): Phone number - `order_count` (integer): Order count - `purchased_amount` (integer): Purchased amount - `succeed_order_count` (integer): Succeed order count - `last_order_at` (string (date-time)): Last order at - `conversation_link` (string (uri)): Conversation link - `referral_code` (string): Referral code - `fb_id` (string): Facebook ID - `customer_id` (string): Customer ID ## eCommerceProduct eCommerce platform product information - `id` (string): Product ID on eCommerce platform - `linked_product_custom_id` (string): Linked product ID - `linked_product_name` (string): Linked product name - `marketplace_id` (string): Marketplace ID - `marketplace_shop_name` (string): Marketplace shop name - `name` (string): Product name on eCommerce platform - `price` (integer): Product price - `sku` (string): Product SKU - `variations` (object[]): Product variations - `id` (string): Variation ID on eCommerce platform - `images` (string (uri)[]): Variation images - `linked_product_custom_id` (string): Linked product custom ID - `linked_variation_custom_id` (string): Linked variation ID - `linked_variation_fields` (object[]): Linked variation fields - `linked_variation_price` (integer): Linked variation price - `name` (string): Variation name - `price` (integer): Variation price - `quantity` (integer): Variation quantity - `sku` (string): Variation SKU - `warehouse` (string): Warehouse name ## Transaction Transaction information - `id` (string): Transaction ID - `display_id` (string): Transaction ID - `name` (string): Transaction name - `note` (string): Note - `amount` (integer): Amount of money - `status` (integer): Status Values: `-1` All status, `0` New, `1` Effective, `2` Canceled, `3` Deleted. - `is_locked` (boolean): Locked - `is_canceled` (boolean): Is canceled - `is_accounting` (boolean): Financial accounting - `payment_debts_to_suppliers` (boolean): Paying off debts to suppliers - `payments` (string[]): Payment method - `tag_ids` (string[]): Transaction tags - `supplier_products_id` (integer): Supplier products ID - `advertising_cost_id` (string): Advertising cost ID - `shop_id` (integer): Shop ID - `creator_id` (string): Creator ID - `creator` (object): Creator information - `id` (string): - `name` (string): - `fb_id` (string): - `avatar_url` (string (uri)): - `images` (string (uri)[]): Image links - `inserted_at` (string (date-time)): Inserted at - `time_incurred` (string (date-time)): Time incurred - `table_name` (string): Table name - `orderId` (string): Order ID ## Debt Debt information - `id` (string): Debt ID - `display_id` (integer): Debt ID - `name_debt` (string): Debt name - `description` (string): Description - `status` (integer): Status Values: `-1` All status, `0` Not transacted / Partial payment, `1` Traded, `2` Canceled. - `type` (integer): Debt type (0: Debt must pay / 1: Debt must collect) - `money_must_pay_or_collect` (integer): Total amount to be paid / Total amount to be collected - `money_payed_or_collected` (integer): Paid amount / Collected amount - `currency` (string): Currency - `shop_id` (integer): Shop ID - `shop_customer_id` (string): Customer ID - `shop_customer` (object): Customer information - `id` (string): - `name` (string): - `phone_numbers` (string[]): - `customer` (object): - `order_id` (integer): Order ID - `order` (object): Order information - `id` (integer): - `display_id` (integer): - `custom_id` (string): - `total_price` (integer): - `cod` (integer): - `assigning_seller_id` (string): - `assigning_seller` (object): - `items` (any[]): - `purchase_id` (string): Purchase ID - `export_id` (string): Export ID - `supplier_products_id` (integer): Supplier products ID - `transaction_id` (string): Transaction ID - `partner_id` (string): Partner ID - `creator_id` (string): Creator ID - `last_editor_id` (string): Last editor ID - `user` (object): Creator information - `id` (string): - `name` (string): - `fb_id` (string): - `phone_number` (string): - `inserted_at` (string (date-time)): Inserted at - `updated_at` (string (date-time)): Updated at - `expired_at` (string (date-time)): Expired at - `is_locked` (boolean): Debt locked - `link` (string (uri)): Link ## Project Project information - `id` (integer): Project ID - `image` (string (uri)): Project image URL - `inserted_at` (string (date-time)): Created timestamp - `name` (string): Project name - `nodes` (ProjectNode[]): Child source orders of project - `id` (integer): Source order ID - `image` (string (uri)): Source order image URL - `inserted_at` (string (date-time)): Created timestamp - `name` (string): Source order name - `nodes` (ProjectNode[]): Child source orders - `parent_id` (integer): Parent source order ID - `project_id` (integer): Project ID - `shop_id` (integer): Shop ID - `updated_at` (string (date-time)): Updated timestamp - `custom_id` (string): Custom source order ID - `link_source_id` (integer): Link source ID - `shop_id` (integer): Shop ID - `updated_at` (string (date-time)): Updated timestamp ## ProjectNode Project node information - `id` (integer): Source order ID - `image` (string (uri)): Source order image URL - `inserted_at` (string (date-time)): Created timestamp - `name` (string): Source order name - `nodes` (ProjectNode[]): Child source orders - `parent_id` (integer): Parent source order ID - `project_id` (integer): Project ID - `shop_id` (integer): Shop ID - `updated_at` (string (date-time)): Updated timestamp - `custom_id` (string): Custom source order ID - `link_source_id` (integer): Link source ID ## Category - `data` (object): Product category information - `id` (integer): Category ID - `name` (string): Category name - `success` (boolean): Success status ## Brand Product brand information - `id` (string (uuid)): Brand ID - `name` (string): Brand name - `description` (string): Brand description - `display_id` (integer): Display ID - `shop_id` (integer): Shop ID - `inserted_at` (string (date-time)): Created time - `updated_at` (string (date-time)): Updated time ## Purchase Purchase information - `id` (string): Purchase ID - `display_id` (integer): Purchase ID - `status` (integer): Status Values: `-2` All status, `-1` New, `0` Confirmed, `1` Imported goods, `2` Canceled. - `time_import` (string (date-time)): Time import - `total_quantity` (integer): Total quantity - `total_remain_quantity` (integer): Total remain quantity - `total_price` (integer): Total purchase price - `total_remain_price` (integer): Total remain price - `note` (string): Note - `warehouse_id` (string): Warehouse ID - `supplier_products_id` (integer): Supplier products ID - `supplier` (object): Supplier information - `id` (integer): - `name` (string): - `custom_id` (string): - `discount` (integer): Discount - `transport_fee` (integer): Shipping fee - `prepaid_debt` (integer): Prepaid debt - `auto_create_debts` (boolean): Auto create debts - `not_create_transaction` (boolean): Not create transaction - `is_lock` (boolean): Locked - `created_type` (string): Purchase type - `tags` (integer[]): Tag IDs - `tag_info` (object[]): Purchase tag information - `id` (integer): - `name` (string): - `items` (object[]): Variation information - `id` (string): - `imported_price` (integer): Imported price - `gross_price` (integer): Gross price - `discount` (integer): Discount on product - `quantity` (integer): Import quantity - `variation_id` (string): Variation ID - `product_name` (string): Product name - `note_purchase` (string): Note - `selling_status` (string): Selling status - `variation` (object): - `images` (string (uri)[]): Purchase images - `bill_images` (string (uri)[]): Invoice images - `user_id` (string): Creator ID - `user` (object): Creator information - `id` (string): - `name` (string): - `fb_id` (string): - `avatar_url` (string (uri)): - `inserted_at` (string (date-time)): Inserted at - `updated_at` (string (date-time)): Updated at - `received_at` (string (date-time)): Received at - `separate_by_display_ids` (integer): Purchase ID separated ## Export Export information - `id` (string): Export ID - `display_id` (integer): Export ID - `status` (integer): Export status Values: `0` New (type 0) / Defect export (type 1), `1` Completed (type 0) / Elimination export (type 1), `2` Canceled. - `type` (integer): Type of export Values: `0` Normal export, `1` Product defect export. - `total` (integer): Total quantity - `total_price` (integer): Total export price - `note` (string): Note - `warehouse_id` (string): Warehouse ID - `supplier_products_id` (integer): Supplier products ID - `tags` (integer[]): Tag IDs - `export_items` (object[]): List of products - `id` (string): Export item ID - `imported_price` (integer): Export price - `quantity` (integer): Export quantity - `variation_id` (string): Variation ID - `display_id` (integer): Display ID - `inserted_at` (string (date-time)): Inserted at - `images` (string (uri)[]): Export images - `user_id` (string): Creator ID - `user` (object): Creator information - `id` (string): - `name` (string): - `fb_id` (string): - `avatar_url` (string (uri)): - `inserted_at` (string (date-time)): Inserted at - `updated_at` (string (date-time)): Updated at ## WarehouseTransfer Warehouse transfer information - `id` (string): Transfer ID - `display_id` (integer): Transfer ID - `status` (integer): Status Values: `0` Waiting for pick up, `1` Shipping, `2` Completed. - `from_warehouse_id` (string): From warehouse ID - `from_warehouse_name` (string): From warehouse name - `to_warehouse_id` (string): To warehouse ID - `to_warehouse_name` (string): To warehouse name - `total_quantity` (integer): Total quantity - `shipping_fee` (integer): Shipping fee - `note` (string): Note - `items` (object[]): List of products - `id` (string): Transfer item ID - `variation_id` (string): Variation ID - `quantity` (integer): Transfer quantity - `product_display_id` (string): Product ID - `product_name` (string): Product name - `variation_display_id` (string): Variation ID - `variation_fields` (object[]): Variation fields - `images` (string (uri)[]): Transfer images - `shop_id` (integer): Shop ID - `creator_id` (string): Creator ID - `inserted_at` (string (date-time)): Inserted at - `updated_status_at` (string (date-time)): Updated status at ## Stocktaking Stocktaking information - `id` (string): Stocktaking ID - `display_id` (integer): Stocktaking ID - `status` (integer): Status Values: `-2` All status, `-1` Creating, `0` Stocktaking, `1` Stocktook, `2` Canceled. - `warehouse_id` (string): Warehouse ID - `stocktaking_by` (string): Stocktaking by - `stocktaking_by_value` (string[]): Category ID / Supplier products ID / Brand ID - `stocktaking_at` (string (date-time)): Stocktaking at - `progress` (integer): Processing percentage - `note` (string): Note - `items` (object[]): List of products - `id` (string): Stocktaking item ID - `variation_id` (string): Variation ID - `changed_quantity` (integer): Changed quantity - `current_quantity` (integer): Current quantity - `note` (string): Note - `variation` (object): Variation information - `inserted_at` (string (date-time)): Inserted at - `updated_at` (string (date-time)): Updated at - `shop_id` (integer): Shop ID - `creator_id` (string): Creator ID - `inserted_at` (string (date-time)): Inserted at - `updated_at` (string (date-time)): Updated at - `updated_status_at` (string (date-time)): Updated status at ## LotProduct Expiry-date lot of a product - `id` (string): Lot ID - `custom_id` (string): Lot code - `expire_date` (string (date-time)): Expiry date (UTC) - `manufacturing_date` (string (date-time)): Manufacturing date (UTC) - `inserted_at` (string (date-time)): Created at - `updated_at` (string (date-time)): Updated at - `product` (LotProductInfo): - `id` (string): Product ID - `name` (string): Product name - `type` (string): Product type, always `LOT` for expiry-date products - `custom_id` (string): Product custom ID - `display_id` (integer): Product display ID - `image` (string): Product image URL - `is_published` (boolean): Store cake status - `is_sell_negative` (boolean): Allow selling with negative stock - `note` (string): Internal note - `note_product` (string): Product note (HTML) - `measure_group_id` (integer): Measure group ID - `brand_id` (string): Brand ID - `creator_id` (string): Creator ID - `inserted_at` (string (date-time)): Created at - `categories` (object[]): Product categories - `tags` (object[]): Product tags - `materials` (integer[]): Material IDs - `supplier_product_ids` (integer[]): Supplier IDs - `manipulation_warehouses` (string[]): Warehouse IDs the product is operated in - `product_attributes` (object[]): Product attributes - `bonus_products` (object[]): Bonus products - `limit_quantity_to_warn` (integer): Low-stock warning threshold - `limit_quantity_to_warn_by_warehouse` (object): Low-stock warning threshold per warehouse (key is warehouse ID) - `warning_by_variation` (boolean): Low-stock warning is applied per variation - `lot_variations` (object[]): Variations of the product linked to this lot - `id` (string): Lot-variation ID - `variation_id` (string): Variation ID - `inserted_at` (string (date-time)): Created at - `updated_at` (string (date-time)): Updated at ## LotProductInfo Product of the lot (variations are not included) - `id` (string): Product ID - `name` (string): Product name - `type` (string): Product type, always `LOT` for expiry-date products - `custom_id` (string): Product custom ID - `display_id` (integer): Product display ID - `image` (string): Product image URL - `is_published` (boolean): Store cake status - `is_sell_negative` (boolean): Allow selling with negative stock - `note` (string): Internal note - `note_product` (string): Product note (HTML) - `measure_group_id` (integer): Measure group ID - `brand_id` (string): Brand ID - `creator_id` (string): Creator ID - `inserted_at` (string (date-time)): Created at - `categories` (object[]): Product categories - `id` (integer): Category ID - `name` (string): Category name - `tags` (object[]): Product tags - `id` (integer): Tag ID - `note` (string): Tag name - `materials` (integer[]): Material IDs - `supplier_product_ids` (integer[]): Supplier IDs - `manipulation_warehouses` (string[]): Warehouse IDs the product is operated in - `product_attributes` (object[]): Product attributes - `id` (string): Attribute ID - `name` (string): Attribute name - `values` (string[]): Attribute values - `keyword` (object[]): Keyword of each attribute value - `bonus_products` (object[]): Bonus products - `variation_id` (string): Variation ID of the bonus product - `quantity` (string,number): Bonus quantity - `price_original` (string,number): Original price of the bonus product - `variation_info` (object): Variation information of the bonus product - `limit_quantity_to_warn` (integer): Low-stock warning threshold - `limit_quantity_to_warn_by_warehouse` (object): Low-stock warning threshold per warehouse (key is warehouse ID) - `warning_by_variation` (boolean): Low-stock warning is applied per variation ## CallLater Call later and remind information - `id` (string): ID - `display_id` (integer): Call later and remind ID - `called_at` (string (date-time)): Called at / Process at - `needs_call_at` (string (date-time)): Need call at / Need process at - `notice_created` (string): Notice information - `order_display_id` (string): Order ID - `order_id` (integer): Order ID - `status` (integer): Status Values: `-1` All status, `0` No process, `3` Calling / Processing, `1` Processed, `2` Not listening / Unsuccessful, `7` Removed. - `type` (string): Notification type - `need_notify_users` (string[]): Process staff - `creator` (object): Creator information - `id` (string): - `name` (string): - `email` (string): - `fb_id` (string): - `avatar_url` (string (uri)): - `phone_number` (string): - `phone_number` (string): Phone number ## Voucher Voucher information - `id` (string): Voucher ID - `display_id` (integer): Voucher ID - `name` (string): Voucher name - `type` (string): Voucher type - `start_time` (string (date-time)): Voucher start time - `end_time` (string (date-time)): Voucher end time - `promo_code_info` (object): Voucher promo code information - `discount` (integer): Discount value - `is_percent` (boolean): Is percent - `max_discount_by_percent` (integer): Maximum discount by percent - `is_free_shipping` (boolean): Is free shipping - `is_activated` (boolean): Is activated - `is_used` (boolean): Is used - `customer_tags` (string[]): Customer tags - `shop_id` (integer): Shop ID - `creator_id` (string): Creator ID - `inserted_at` (string (date-time)): Inserted at - `updated_at` (string (date-time)): Updated at ## Promotion Promotion information - `id` (string): Promotion ID - `display_id` (string): Promotion display ID - `name` (string): Promotion name - `type` (string): Promotion type - `start_time` (string (date-time)): Start time - `end_time` (string (date-time)): End time - `warehouse_ids` (string[]): Warehouse IDs - `customer_tags` (string[]): Customer tags - `order_sources` (object[]): Order sources - `group_name` (string): Promotion group - `is_activated` (boolean): Is activated - `is_variation` (boolean): Is variation - `is_used` (boolean): Is used - `is_free_shipping` (boolean): Is free shipping - `is_discount_in_birthday_customer` (boolean): Is discount in birthday customer - `coupon_info` (object): Coupon information - `discount` (integer): Discount - `is_percent` (boolean): Is percent - `promo_code_info` (object): Promotion code information - `discount` (integer): Discount - `is_percent` (boolean): Is percent - `max_discount_by_percent` (integer): Maximum discount by percent - `discount_by_quantity` (integer): Discount by quantity - `items` (object[]): List of promotion items (products/variations the promotion applies to) - `id` (string): Promotion item ID - `promotion_advance_id` (string): Promotion ID - `shop_id` (integer): Shop ID - `product_id` (string): Product ID (when promotion is applied by product) - `variation_id` (string): Variation ID (when promotion is applied by variation) - `category_id` (string): Category ID (when promotion is applied by category) - `product` (object): Product information (when promotion is applied by product) - `variation` (object): Variation information (when promotion is applied by variation) - `level_info` (object[]): Discount levels by quantity - `fixed_prices` (number): Fixed price - `coupon_item_info` (object): Coupon information of the item - `limited_quantity` (integer): Limited quantity - `limited_quantity_used` (integer): Limited quantity used - `attachment_product_info` (object[]): Attached product information - `discount_info_by_attachment_product` (object): Discount by attached product - `inserted_at` (string (date-time)): Inserted at - `updated_at` (string (date-time)): Updated at - `bonus_items` (object[]): Bonus items - `total_quantity_bonus` (integer): Total quantity bonus - `arr_level_promotion` (object[]): Level promotion array - `level_order_prices` (object[]): Level order prices - `priority_level` (integer): Priority level - `type_employee` (string): Type employee - `post_ids` (string[]): Post IDs - `shop_id` (integer): Shop ID - `creator_id` (string): Creator ID - `inserted_at` (string (date-time)): Inserted at - `updated_at` (string (date-time)): Updated at ## LivestreamManager Livestream session information - `creator` (object): Creator information - `avatar_url` (string): Avatar URL - `fb_id` (string): Facebook ID - `id` (string): Creator ID - `name` (string): Creator name - `end_time` (string): End time of the livestream session - `finisher` (object): Finisher information - `avatar_url` (string): Avatar URL - `fb_id` (string): Facebook ID - `id` (string): Finisher ID - `name` (string): Finisher name - `id` (string): Livestream session ID - `inserted_at` (string): Created date - `name` (string): Livestream session name (campaign) - `origin_post_id` (string): Origin post ID - `post_ids` (string[]): List of post IDs - `remain_warehouse_ids` (string[]): List of inventory sync warehouse IDs - `shop_id` (integer): Shop ID - `start_time` (string): Start time of the livestream session - `total_comments` (integer): Total number of comments - `total_customers` (integer): Total number of customers - `warehouse_id` (string): Order creation warehouse ID ## PaginatedResponse Paginated response - `data` (any[]): List of items - `page_number` (integer): Page number - `page_size` (integer): Page size - `success` (boolean): Success status - `total_entries` (integer): Total entries - `total_pages` (integer): Total pages ## SimpleResponse Simple response with success status - `success` (boolean): Success status ## DataResponse Response with data and success status - `data` (any): Response data - `success` (boolean): Success status ## WebhookOrderResponse Webhook response when webhook_types includes orders ## WebhookCustomerResponse Webhook response when webhook_types includes customers ## WebhookProductResponse Webhook response when webhook_types includes products - `data` (object): - `record` (Product): - `success` (boolean): ## WebhookInventoryResponse Webhook response when webhook_types includes variations_warehouses - `data` (object): - `record` (object): - `success` (boolean): ## WebhookAutoCallResponse Auto Voice result sent once to the configured webhook URL. Return HTTP 200 to acknowledge receipt. - `type` (string): - `shop_id` (integer): - `order_id` (string): Order ID or code used to trigger the call - `phone_number` (string): - `answered` (boolean): Whether the callee picked up - `dtmf` (string): Digits the callee pressed (null if none) ## AdAccount Ad accounts list response - `success` (boolean): Success status - `data` (object[]): List of ad accounts - `id` (string): Ad account ID - `name` (string): Ad account name - `account_status` (integer): Account status Values: `1` Active, `2` Disabled, `3` Unsettled, `7` Awaiting risk review, `8` Awaiting settlement, `9` Within grace period, `100` Awaiting closure, `101` Closed, `201` Any active status, `202` Any closed status. - `currency` (string): Currency used by the account - `is_business` (boolean): Business account (true) / Personal account (false) - `sync_succeed_at` (string (date-time)): Last successful sync timestamp - `tags` (string[]): Tags - `page_number` (integer): Current page number - `page_size` (integer): Number of records per page - `total_entries` (integer): Total number of ad accounts - `total_pages` (integer): Total number of pages ## CampaignListResponse - `success` (boolean): Success status - `data` (object[]): List of campaigns - `id` (string): Campaign ID - `name` (string): Campaign name - `status` (string): Campaign status Values: `ACTIVE` Active, `PAUSED` Paused, `DELETED` Deleted, `ARCHIVED` Archived. - `effective_status` (string): Effective status Values: `ACTIVE` Active, `PAUSED` Paused, `DELETED` Deleted, `ARCHIVED` Archived, `IN_PROCESS` In process, `WITH_ISSUES` With issues. - `objective` (string): Campaign objective Values: `APP_INSTALLS` App installs, `BRAND_AWARENESS` Brand awareness, `CONVERSIONS` Conversions, `EVENT_RESPONSES` Event responses, `LEAD_GENERATION` Lead generation, `LINK_CLICKS` Link clicks, `LOCAL_AWARENESS` Local awareness, `MESSAGES` Messages, `OFFER_CLAIMS` Offer claims, `OUTCOME_APP_PROMOTION` App promotion, `OUTCOME_AWARENESS` Awareness, `OUTCOME_ENGAGEMENT` Engagement, `OUTCOME_LEADS` Leads, `OUTCOME_SALES` Sales, `OUTCOME_TRAFFIC` Traffic, `PAGE_LIKES` Page likes, `POST_ENGAGEMENT` Post engagement, `PRODUCT_CATALOG_SALES` Product catalog sales, `REACH` Reach, `STORE_VISITS` Store visits, `VIDEO_VIEWS` Video views. - `created_time` (string (date-time)): Campaign creation time - `start_time` (string (date-time)): Campaign start time - `end_time` (string (date-time)): Campaign end time - `marketer_id` (string): Marketer ID assigned - `product_id` (string): Product ID - `product_category_id` (string): Product category ID - `product` (any): Product of campaign - `ad_account` (object): Ad account - `insights` (object): Campaign performance metrics - `summary` (object): Aggregated performance metrics across all campaigns - `impressions` (number): Total impressions - `clicks` (integer): Total clicks - `reach` (integer): Total unique people reached - `spend` (number): Total amount spent - `cpc` (number): CPC - `cpm` (number): CPM - `cpp` (number): CPP - `ctr` (number): CTR - `frequency` (number): Average frequency - `page_number` (integer): Current page number - `page_size` (integer): Number of records per page - `total_entries` (integer): Total number of campaigns - `total_pages` (integer): Total number of pages ## AdSetListResponse - `success` (boolean): Success status - `data` (object[]): List of ad sets - `id` (string): Ad set ID - `name` (string): Ad set name - `status` (string): Ad set status Values: `ACTIVE` Active, `PAUSED` Paused, `DELETED` Deleted, `ARCHIVED` Archived. - `effective_status` (string): Effective status Values: `ACTIVE` Active, `PAUSED` Paused, `DELETED` Deleted, `PENDING_REVIEW` Pending review, `DISAPPROVED` Disapproved, `PREAPPROVED` Preapproved, `PENDING_BILLING_INFO` Pending billing info, `CAMPAIGN_PAUSED` Campaign paused, `ARCHIVED` Archived, `ADSET_PAUSED` Ad set paused, `IN_PROCESS` In process, `WITH_ISSUES` With issues. - `created_time` (string (date-time)): Ad set creation time - `start_time` (string (date-time)): Ad set start time - `end_time` (string (date-time)): Ad set end time - `bid_amount` (integer): Bid amount - `bid_strategy` (string): Bid strategy Values: `LOWEST_COST_WITHOUT_CAP` Lowest cost without cap, `LOWEST_COST_WITH_BID_CAP` Lowest cost with bid cap, `COST_CAP` Cost cap, `LOWEST_COST_WITH_MIN_ROAS` Lowest cost with minimum ROAS. - `billing_event` (string): Billing event Values: `APP_INSTALLS` App installs, `IMPRESSIONS` Impressions, `LINK_CLICKS` Link clicks, `OFFER_CLAIMS` Offer claims, `PAGE_LIKES` Page likes, `POST_ENGAGEMENT` Post engagement, `VIDEO_VIEWS` Video views, `THRUPLAY` ThruPlay, `PURCHASE` Purchase, `LISTING_INTERACTION` Listing interaction. - `daily_budget` (integer): Daily budget - `lifetime_budget` (integer): Lifetime budget - `destination_type` (string): Destination type Values: `WEBSITE` Website, `APP` App, `MESSENGER` Messenger, `APPLINKS_AUTOMATIC` App links automatic, `WHATSAPP` WhatsApp, `INSTAGRAM_DIRECT` Instagram Direct, `FACEBOOK` Facebook, `MESSAGING_MESSENGER_WHATSAPP` Messenger & WhatsApp, `MESSAGING_INSTAGRAM_DIRECT_MESSENGER` Instagram & Messenger, `MESSAGING_INSTAGRAM_DIRECT_MESSENGER_WHATSAPP` Instagram Direct & Messenger & WhatsApp, `MESSAGING_INSTAGRAM_DIRECT_WHATSAPP` Instagram Direct & WhatsApp, `SHOP_AUTOMATIC` Shop automatic, `ON_AD` On ad, `ON_POST` On post, `ON_EVENT` On event, `ON_VIDEO` On video, `ON_PAGE` On page, `INSTAGRAM_PROFILE` Instagram profile, `FACEBOOK_PAGE` Facebook page, `INSTAGRAM_PROFILE_AND_FACEBOOK_PAGE` Instagram profile and Facebook page, `INSTAGRAM_LIVE` Instagram Live. - `optimization_goal` (string): Optimization goal Values: `NONE` None, `APP_INSTALLS` App installs, `AD_RECALL_LIFT` Ad recall lift, `ENGAGED_USERS` Engaged users, `EVENT_RESPONSES` Event responses, `IMPRESSIONS` Impressions, `LEAD_GENERATION` Lead generation, `QUALITY_LEAD` Quality lead, `LINK_CLICKS` Link clicks, `OFFSITE_CONVERSIONS` Offsite conversions, `PAGE_LIKES` Page likes, `POST_ENGAGEMENT` Post engagement, `QUALITY_CALL` Quality call, `REACH` Reach, `LANDING_PAGE_VIEWS` Landing page views, `VISIT_INSTAGRAM_PROFILE` Visit Instagram profile, `VALUE` Value, `THRUPLAY` ThruPlay, `DERIVED_EVENTS` Derived events, `APP_INSTALLS_AND_OFFSITE_CONVERSIONS` App installs and offsite conversions, `CONVERSATIONS` Conversations, `IN_APP_VALUE` In-app value, `MESSAGING_PURCHASE_CONVERSION` Messaging purchase conversion, `SUBSCRIBERS` Subscribers, `REMINDERS_SET` Reminders set, `MEANINGFUL_CALL_ATTEMPT` Meaningful call attempt, `PROFILE_VISIT` Profile visit, `PROFILE_AND_PAGE_ENGAGEMENT` Profile and page engagement, `ADVERTISER_SILOED_VALUE` Advertiser siloed value, `AUTOMATIC_OBJECTIVE` Automatic objective, `MESSAGING_APPOINTMENT_CONVERSION` Messaging appointment conversion. - `marketer_id` (string): Marketer ID assigned - `product_id` (string): ID of product - `product_category_id` (string): ID of product category - `ad_account` (object): Ad account - `ad_campaign` (object): Campaign of ad set - `insights` (object): Ad set performance metrics - `targeting` (object): Audience targeting settings - `summary` (object): Aggregated performance metrics across all ad sets - `impressions` (number): Total impressions - `clicks` (integer): Total clicks - `reach` (integer): Total unique people reached - `spend` (number): Total amount spent - `cpc` (number): CPC - `cpm` (number): CPM - `cpp` (number): CPP - `ctr` (number): CTR - `frequency` (number): Average frequency - `page_number` (integer): Current page number - `page_size` (integer): Number of records per page - `total_entries` (integer): Total number of ad sets - `total_pages` (integer): Total number of pages ## AdListResponse - `success` (boolean): Success status - `data` (object[]): List of ads - `id` (string): Ad ID - `name` (string): Ad name - `status` (string): Ad status Values: `ACTIVE` Active, `PAUSED` Paused, `DELETED` Deleted, `ARCHIVED` Archived. - `effective_status` (string): Effective status Values: `ACTIVE` Active, `PAUSED` Paused, `DELETED` Deleted, `PENDING_REVIEW` Pending review, `DISAPPROVED` Disapproved, `PREAPPROVED` Preapproved, `PENDING_BILLING_INFO` Pending billing info, `CAMPAIGN_PAUSED` Campaign paused, `ARCHIVED` Archived, `ADSET_PAUSED` Ad set paused, `IN_PROCESS` In process, `WITH_ISSUES` With issues. - `created_time` (string (date-time)): Ad creation time - `marketer_id` (string): Marketer ID assigned - `product_id` (string): ID of product - `product_category_id` (string): ID of product category - `ad_account` (object): Ad account - `ad_campaign` (object): Parent campaign of the ad - `ad_set` (object): Ad group - `ad_creative` (object): Facebook post (bài viết) - `insights` (object): Ad performance metrics - `summary` (object): Aggregated performance metrics across all ads - `impressions` (number): Total impressions - `clicks` (integer): Total clicks - `reach` (integer): Total unique people reached - `spend` (number): Total amount spent - `cpc` (number): CPC - `cpm` (number): CPM - `cpp` (number): CPP - `ctr` (number): CTR - `frequency` (number): Average frequency - `page_number` (integer): Current page number - `page_size` (integer): Number of records per page - `total_entries` (integer): Total number of ads - `total_pages` (integer): Total number of pages ## Reconciliation Reconciliation session with its orders - `system_id` (integer): Internal session ID. Use it for the `system_id` filter - `display_id` (integer): Session code shown on the shop screen - `custom_id` (string): Code set by the shop or the marketplace (e.g. statement ID) - `partner_id` (string): Shipping partner ID on Pancake system - `control_type` (string): Session type. Very old sessions without a type are returned as `all` Values: `control_cod` COD reconciliation, `control_fee` Shipping fee reconciliation, `all` COD and shipping fee reconciliation, `merge` Session merged from orders. - `note` (string): Note - `excel_cod` (integer): Total COD according to the carrier statement - `excel_fee` (integer): Total shipping fee according to the carrier statement - `pos_cod` (integer): Total COD according to POS orders - `paid_at` (string (date-time)): Payment time of the session - `payment_status` (string): Payment status Values: `paid` Paid, `unpaid` Unpaid. - `creator` (any): User who created the session - `updater` (any): User who last edited the session. Null for sessions never edited since the field was introduced - `inserted_at` (string (date-time)): Session creation time - `updated_at` (string (date-time)): Last update time. Sync cursor for incremental sync; bumped by every change including attaching transactions and removal - `is_removed` (boolean): True when the session was removed (soft delete). Only returned with `include_removed=true` - `orders` (ReconciliationOrder[]): Orders of the session. Never truncated - `order_id` (integer): Internal order ID (`system_id` of the order) - `display_id` (integer): Order ID shown on the shop (`id` of the order) - `custom_id` (string): Custom order code set by the shop - `extend_code` (string): Tracking code from the shipping partner - `order_number_vtp` (string): Viettel Post order number - `order_status` (integer): Order status at the time the order was added to the session. Same values as `status` of the order - `result` (string): Reconciliation result of the order in this session Values: `succeed` Matched, `mismatch` Mismatched amount, `failed` Not reconciled (order not found or invalid). - `message` (string): Reason when the order could not be reconciled - `cod_amount` (integer): COD amount according to the shipping partner. Null when this session does not reconcile COD for the order - `partner_fee` (integer): Shipping fee according to the shipping partner - `pos_cod` (integer): COD amount of the order on POS - `currency` (string): Currency of the order - `reconciliation_at` (string (date-time)): Reconciliation time of the order ## ReconciliationUser - `id` (string (uuid)): User ID - `name` (string): User name. Null when the user was deleted from the system ## ReconciliationOrder Order snapshot inside a reconciliation session - `order_id` (integer): Internal order ID (`system_id` of the order) - `display_id` (integer): Order ID shown on the shop (`id` of the order) - `custom_id` (string): Custom order code set by the shop - `extend_code` (string): Tracking code from the shipping partner - `order_number_vtp` (string): Viettel Post order number - `order_status` (integer): Order status at the time the order was added to the session. Same values as `status` of the order - `result` (string): Reconciliation result of the order in this session Values: `succeed` Matched, `mismatch` Mismatched amount, `failed` Not reconciled (order not found or invalid). - `message` (string): Reason when the order could not be reconciled - `cod_amount` (integer): COD amount according to the shipping partner. Null when this session does not reconcile COD for the order - `partner_fee` (integer): Shipping fee according to the shipping partner - `pos_cod` (integer): COD amount of the order on POS - `currency` (string): Currency of the order - `reconciliation_at` (string (date-time)): Reconciliation time of the order