# 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

## OrderSource

Order source

- `id` (integer,string): Order source ID. In the order source list, page entries return the page ID (string)
- `name` (string): Order source name (page name for page entries)
- `alias_name` (string,null): Memorable name of the order source
- `parent_id` (integer,null): Parent order source ID
- `shop_id` (integer): Shop ID
- `inserted_at` (string (date-time)): Created at
- `updated_at` (string (date-time)): Updated at
- `link` (string,null): Fixed source link (Webcake landing link)

## 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. For the fee reconciled with the shipping partner, see `reconciliation.partner_fee`
- `fee_marketplace` (integer): Fees from e-commerce platforms
- `reconciliation` (object): Shipping partner reconciliation figures of the order (read-only). Only returned when the order has been reconciled (`status_reconciliation` is `shipping_fee_paid`, `paid` or `mismatch`), otherwise `null`. Amounts use the order's `order_currency`, see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
  - `status_reconciliation` (string): Reconciliation status of the order Values: `shipping_fee_paid` Shipping fee reconciled, COD not reconciled yet, `paid` COD reconciled and matches the order, `mismatch` COD reconciled but differs from the order.
  - `cod_amount` (integer): COD amount according to the shipping partner. `null` when COD is not reconciled yet (`shipping_fee_paid`)
  - `partner_fee` (integer): Shipping partner fee as reconciled. Can differ from the order's `partner_fee`, because some reconciled fees are not written to the order (e.g. fees reconciled from a fulfillment partner). `null` when the fee is not reconciled yet
  - `fee_detail` (object): Breakdown of `reconciliation.partner_fee` by fee type. Always has all 5 keys, a type without a fee is `0`. The values always add up to `reconciliation.partner_fee`: when the shipping partner sends no breakdown, the whole fee is in `shipping_fee`. `null` when `reconciliation.partner_fee` is `null`
- `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` (string): Link to the carrier's shipping label file (e.g. PDF). For some integrated carriers it holds another carrier value instead of a link (e.g. J&T sorting code). Can be set when creating or updating an order: an `https://` URL up to 2048 bytes; `null` or an empty string clears it; omitted or invalid values keep the current value. Ignored when the shipment was pushed to the carrier by Pancake POS (`system_created` is `true`) or the order comes from a marketplace, because those labels are fetched by the system.
- `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`.
- `buyer_paid_amount` (integer): Shopee orders: amount the buyer pays on Shopee (`buyer_total_amount` of the Shopee escrow), after shop vouchers, Shopee vouchers and coins, including the shipping fee and other fees paid by the buyer. Present for both COD and prepaid orders, in the order's `order_currency`, updated with the latest escrow each time POS syncs the order. Unlike the order's `buyer_total_amount` (the COD amount printed on the label, `0` for prepaid orders). Absent until POS has read the Shopee escrow, and may be absent on orders synced before this field was added.
- `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. Order amounts are in its storage unit (x100 unless it is a whole-unit currency such as VND), see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
- `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. For the fee reconciled with the shipping partner, see `reconciliation.partner_fee`
- `fee_marketplace` (integer): Fees from e-commerce platforms
- `reconciliation` (object): Shipping partner reconciliation figures of the order (read-only). Only returned when the order has been reconciled (`status_reconciliation` is `shipping_fee_paid`, `paid` or `mismatch`), otherwise `null`. Amounts use the order's `order_currency`, see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
  - `status_reconciliation` (string): Reconciliation status of the order Values: `shipping_fee_paid` Shipping fee reconciled, COD not reconciled yet, `paid` COD reconciled and matches the order, `mismatch` COD reconciled but differs from the order.
  - `cod_amount` (integer): COD amount according to the shipping partner. `null` when COD is not reconciled yet (`shipping_fee_paid`)
  - `partner_fee` (integer): Shipping partner fee as reconciled. Can differ from the order's `partner_fee`, because some reconciled fees are not written to the order (e.g. fees reconciled from a fulfillment partner). `null` when the fee is not reconciled yet
  - `fee_detail` (object): Breakdown of `reconciliation.partner_fee` by fee type. Always has all 5 keys, a type without a fee is `0`. The values always add up to `reconciliation.partner_fee`: when the shipping partner sends no breakdown, the whole fee is in `shipping_fee`. `null` when `reconciliation.partner_fee` is `null`
- `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` (string): Link to the carrier's shipping label file (e.g. PDF). For some integrated carriers it holds another carrier value instead of a link (e.g. J&T sorting code). Can be set when creating or updating an order: an `https://` URL up to 2048 bytes; `null` or an empty string clears it; omitted or invalid values keep the current value. Ignored when the shipment was pushed to the carrier by Pancake POS (`system_created` is `true`) or the order comes from a marketplace, because those labels are fetched by the system.
- `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`.
- `buyer_paid_amount` (integer): Shopee orders: amount the buyer pays on Shopee (`buyer_total_amount` of the Shopee escrow), after shop vouchers, Shopee vouchers and coins, including the shipping fee and other fees paid by the buyer. Present for both COD and prepaid orders, in the order's `order_currency`, updated with the latest escrow each time POS syncs the order. Unlike the order's `buyer_total_amount` (the COD amount printed on the label, `0` for prepaid orders). Absent until POS has read the Shopee escrow, and may be absent on orders synced before this field was added.
- `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. Order amounts are in its storage unit (x100 unless it is a whole-unit currency such as VND), see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
- `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 amounts are in its storage unit (x100 unless it is a whole-unit currency such as VND), see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
  - `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. For the fee reconciled with the shipping partner, see `reconciliation.partner_fee`
  - `fee_marketplace` (integer): Fees from e-commerce platforms
  - `reconciliation` (object): Shipping partner reconciliation figures of the order (read-only). Only returned when the order has been reconciled (`status_reconciliation` is `shipping_fee_paid`, `paid` or `mismatch`), otherwise `null`. Amounts use the order's `order_currency`, see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
  - `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`.
  - `buyer_paid_amount` (integer): Shopee orders: amount the buyer pays on Shopee (`buyer_total_amount` of the Shopee escrow), after shop vouchers, Shopee vouchers and coins, including the shipping fee and other fees paid by the buyer. Present for both COD and prepaid orders, in the order's `order_currency`, updated with the latest escrow each time POS syncs the order. Unlike the order's `buyer_total_amount` (the COD amount printed on the label, `0` for prepaid orders). Absent until POS has read the Shopee escrow, and may be absent on orders synced before this field was added.
  - `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. Order amounts are in its storage unit (x100 unless it is a whole-unit currency such as VND), see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
  - `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. For the fee reconciled with the shipping partner, see `reconciliation.partner_fee`
  - `fee_marketplace` (integer): Fees from e-commerce platforms
  - `reconciliation` (object): Shipping partner reconciliation figures of the order (read-only). Only returned when the order has been reconciled (`status_reconciliation` is `shipping_fee_paid`, `paid` or `mismatch`), otherwise `null`. Amounts use the order's `order_currency`, see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
  - `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`.
  - `buyer_paid_amount` (integer): Shopee orders: amount the buyer pays on Shopee (`buyer_total_amount` of the Shopee escrow), after shop vouchers, Shopee vouchers and coins, including the shipping fee and other fees paid by the buyer. Present for both COD and prepaid orders, in the order's `order_currency`, updated with the latest escrow each time POS syncs the order. Unlike the order's `buyer_total_amount` (the COD amount printed on the label, `0` for prepaid orders). Absent until POS has read the Shopee escrow, and may be absent on orders synced before this field was added.
  - `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. Order amounts are in its storage unit (x100 unless it is a whole-unit currency such as VND), see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
  - `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`. Product prices, costs, purchases and shop settings are in its storage unit, see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
- `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. `retailPriceByCurrency` is in its storage unit, see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
- `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. `retailPriceByCurrency` is in its storage unit, see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
  - `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
- `einvoice_name` (string): Current invoice name of the product ("Invoice product name" in POS), set per product and shared by all its variations. Read-only via Open API: set it in POS. `null` means invoices use the product name. Invoices already created keep the item name pinned at that time (`items[].variation_info.name` of `/list_einvoices`), which may differ from this value.
- `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): Debt currency. Debt amounts are in its storage unit, see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
- `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
- `tag_info` (object[]): Export tag information (ID and name). The tags field remains an array of IDs.
  - `id` (integer): Tag ID
  - `name` (string): Tag name
- `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)

## WebhookEinvoiceResponse

Webhook payload when webhook_types includes einvoices. Sent whenever an e-invoice is created or updated (saved, issued, cancelled, partner callback, tax authority check result, synced from its order). Each webhook carries the latest saved e-invoice at sending time (same shape as the e-invoice in the e-invoice list API), so an action that writes several times (e.g. created then issued right away) may send more than one webhook. An `update` with the same content as the last delivered one is skipped. Removed e-invoices are not sent.

- `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 amounts are in its storage unit (x100 unless it is a whole-unit currency such as VND), see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
  - `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
- `type` (string): Webhook data type
- `event_type` (string): `create` when the e-invoice is newly created (including adjustment/replacement invoices), `update` for any later change Values: `create`, `update`.

## 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. Amounts are in its storage unit, see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
  - `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. Amounts are in its storage unit, see [Money amounts](https://pos.pancake.vn/developers/api/en#money-amounts).
- `reconciliation_at` (string (date-time)): Reconciliation time of the order
