Shared reference

Data models

Objects shared by requests, responses and webhooks.

View Markdown

ErrorResponse

ErrorResponseBusiness or request error response
successbooleanrequired

Success status

Valuesfalse
messagestring

Human-readable error message

errorstring

Stable machine-readable error name, when provided

error_codeinteger

Machine-readable error code, when provided

message_codeinteger

POS business message code, when provided

permissionstring

Required permission, when access is denied

OrderMessage

OrderMessageA rendered message from the conversation associated with an order. Properties can be omitted when `fields[]` is specified.
idstring

Message identifier

typestringnull

Platform-specific message type, such as INBOX or COMMENT

messagestring

Rendered message content, which may contain HTML

original_messagestringnull

Original message text before rendering

message_tagsarray<object>

Extensible metadata for entities detected in the message

fromobject

Extensible sender information supplied by the messaging platform

seenboolean

Whether the message has been seen

can_likeboolean

Whether the page can like the message

user_likesboolean

Whether the page has liked the message

like_countintegernull

Number of likes

can_commentboolean

Whether the page can comment on the message

comment_countintegernull

Number of replies

Order

OrderOrder information
idinteger

Order ID

system_idinteger

System ID

shop_idinteger

Shop ID

inserted_atstring · date-time

Order creation time

updated_atstring · date-time

Order update time

statusinteger

Order status

Values0New17Waiting for confirmation11Restocking12Wait for printing13Printed20Purchased1Confirmed8Packaging9Waiting for pick up2Shipped3Received16Collected money4Returning15Partial return5Returned6Canceled7Deleted recently
status_namestring

Order status name

bill_full_namestring

Customer name

bill_phone_numberstring

Phone number of customer

bill_emailstring

Customer email

conversation_idstring

Conversation ID

page_idstring

Facebook page ID

OrderInfo

OrderInfo
idinteger

Order ID

system_idinteger

System ID

shop_idinteger

Shop ID

inserted_atstring · date-time

Order creation time

updated_atstring · date-time

Order update time

statusinteger

Order status

Values0New17Waiting for confirmation11Restocking12Wait for printing13Printed20Purchased1Confirmed8Packaging9Waiting for pick up2Shipped3Received16Collected money4Returning15Partial return5Returned6Canceled7Deleted recently
status_namestring

Order status name

bill_full_namestring

Customer name

bill_phone_numberstring

Phone number of customer

bill_emailstring

Customer email

conversation_idstring

Conversation ID

page_idstring

Facebook page ID

EInvoice

EInvoiceE-invoice information
actual_shipping_feeinteger

Shipping fee

adjust_amountintegernullable

Percentage reduction on revenue

adjustment_criteriaintegernullable

Adjustment criteria

Values1Quantity adjustment2Price adjustment3Tax rate adjustment4Tax amount adjustment
adjustment_typeintegernullable

Adjustment type

Values1Increase adjustment2Decrease adjustment3Information
allocation_discountsarray<object>

Allocation discounts

allocation_typeinteger

Allocation type

Values1By unit price2custom
bank_account_numberstringnullable

Bank account number

bank_namestringnullable

Bank name

budget_unit_codestringnullable

Budget unit code

buyer_not_get_invoiceboolean

Buyer not get invoice

creatorobjectnullable

Creator information

discountinteger

General discount amount

ShippingAddress

ShippingAddressShipping address
addressstringnullable

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_namestringnullable

Commune name

commune_idstringnullable

Commune ID

country_codestringnullable

Country code

district_idstringnullable

District ID

district_namestringnullable

District name

full_addressstringnullable

Full address

full_namestringnullable

Full name

new_full_addressstringnullable

New full address

new_province_idstringnullable

New province ID

phone_numberstringnullable

Phone number

post_codestringnullable

Post code

province_idstringnullable

Province ID

province_namestringnullable

Province name

render_typestringnullable

Render type

ReturnOrder

ReturnOrderReturn order information
idinteger

Return order ID

display_idinteger

Display ID

bill_full_namestring

Customer name

bill_phone_numberstring

Phone number of customer

creator_idstring

Creator ID

custom_idstring

Custom ID

discountinteger

Discount total

discount_from_order_to_returnedinteger

Discount from order to returned

inserted_atstring · date-time

Created at

updated_atstring · date-time

Updated at

order_idinteger

Order ID

order_id_to_returnedinteger

Order ID to returned

Shop

ShopShop information
avatar_urlstring

Avatar image link

namestring

Shop name

currencystring

Shop currency code, for example VND

idinteger

Shop ID

preferred_shopintegernull

User-specific preferred shop rank. Lower values have higher priority

pagesarray<object>

Pages information in shop

link_post_marketerarray<object>

Information of link post / source / AD account with marketer

Warehouse

WarehouseWarehouse information
idstring

Warehouse ID

namestring

Warehouse name

addressstring

Warehouse address

full_addressstring

Warehouse full address

phone_numberstring

Warehouse phone number

province_idstring

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_idstringnullable

District ID. Always null for a Viet Nam warehouse using the new address (no district level)

commune_idstringnullable

Commune ID. For a Viet Nam warehouse using the new address, this is the new commune ID (e.g. 84_VN10236)

country_codestring

Country code

shop_idinteger

Shop ID

allow_create_orderboolean

Allow create order

custom_idstring

Custom ID

affiliate_shop_idinteger

Affiliate shop ID

affiliate_warehousestring

Affiliate warehouse name

VariationWarehouse

VariationWarehousePer-warehouse stock detail for a variation.
idstring

Variation-warehouse record ID

variation_idstring

Variation ID

warehouse_idstring

Warehouse ID

shop_idinteger

Shop ID

remain_quantityinteger

Sellable quantity. May include incoming/waiting stock depending on shop settings.

available_quantityinteger

remain_quantity clamped to be non-negative (max(0, remain_quantity)).

actual_remain_quantityinteger

Quantity physically on hand in the warehouse.

total_quantityinteger

Total quantity recorded at this warehouse.

waitting_quantityinteger

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_quantityinteger

Quantity reserved by pending purchase orders.

transfer_quantityinteger

Quantity currently being transferred out.

pending_transfer_quantityinteger

Quantity pending transfer (not yet shipped between warehouses).

VariationSize

VariationSizeVariation size (dimensions)
lengthinteger

Length

widthinteger

Width

heightinteger

Height

RetailPriceByCurrency

RetailPriceByCurrencyRetail price of the variation in one currency
currencystringrequired

Currency code (ISO 4217)

Example: "USD"
retailPriceByCurrencynumberstringrequired

Retail price in this currency. Requests accept a number; responses return it as a string.

Example: 100

Variation

VariationProduct variation information
idstring

Variation ID

fieldsarray<object>

Variation fields

imagesarray<string · uri>

Variation images

last_imported_priceinteger

Imported price

retail_priceinteger

Variation retail price

price_at_counterinteger

Counter price

retail_price_by_currencyarray<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.

weightinteger

Variation weight

sizeVariationSize

Variation size (dimensions)

barcodestring

Variation barcode

custom_idstring

Variation custom ID

is_hiddenboolean

Store cake status variation

Product

ProductProduct information
namestringrequired

Product name

weightintegerrequired

Product weight

measure_group_idinteger

Measure group ID

Example: 58
typestring

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"
Example: "product"
category_idsarray<integer>

Category IDs

notestring

Internal note

note_productstring

Product note

product_attributesarray<object>

Product attributes

tagsarray<integer>

Product tags

custom_idstring

Product custom ID

is_publishedboolean

Store cake status

variationsarray<Variation>

Product variations

Customer

CustomerCustomer information
idstring

Customer ID

namestring

Full name

genderstring

Gender

emailsarray<string>

Email addresses

phone_numbersarray<string>

Phone numbers

pages_customersarray<object>

Customer's linked pages

date_of_birthstring · date

Date of birth

reward_pointnumber

Reward point

is_discount_by_levelboolean

Discount based on level

tagsarray<string>

Customer tags

is_blockboolean

Block customer

assigned_user_idstring

Assigned employee ID

eCommerceProduct

eCommerceProducteCommerce platform product information
idstring

Product ID on eCommerce platform

Example: "46152996242"
linked_product_custom_idstring

Linked product ID

Example: "ANPR"
linked_product_namestring

Linked product name

Example: "Áo nam Pari đẹp thời trang"
marketplace_idstring

Marketplace ID

Example: "-3"
marketplace_shop_namestring

Marketplace shop name

Example: "Vũ Sơn shop"
namestring

Product name on eCommerce platform

Example: "Áo nam Pari đẹp thời trang"
priceinteger

Product price

Example: 0
skustring

Product SKU

Example: "ANPR"
variationsarray<object>

Product variations

warehousestring

Warehouse name

Example: "Kho HN"

Transaction

TransactionTransaction information
idstring

Transaction ID

display_idstring

Transaction ID

namestring

Transaction name

notestring

Note

amountinteger

Amount of money

statusinteger

Status

Values-1All status0New1Effective2Canceled3Deleted
is_lockedboolean

Locked

is_canceledboolean

Is canceled

is_accountingboolean

Financial accounting

payment_debts_to_suppliersboolean

Paying off debts to suppliers

paymentsarray<string>

Payment method

tag_idsarray<string>

Transaction tags

Debt

DebtDebt information
idstring

Debt ID

display_idinteger

Debt ID

name_debtstring

Debt name

descriptionstring

Description

statusinteger

Status

Values-1All status0Not transacted / Partial payment1Traded2Canceled
typeinteger

Debt type (0: Debt must pay / 1: Debt must collect)

money_must_pay_or_collectinteger

Total amount to be paid / Total amount to be collected

money_payed_or_collectedinteger

Paid amount / Collected amount

currencystring

Currency

shop_idinteger

Shop ID

shop_customer_idstring

Customer ID

shop_customerobject

Customer information

Project

ProjectProject information
idinteger

Project ID

imagestring · urinullable

Project image URL

inserted_atstring · date-time

Created timestamp

namestring

Project name

nodesarray<ProjectNode>

Child source orders of project

shop_idinteger

Shop ID

updated_atstring · date-time

Updated timestamp

ProjectNode

ProjectNodeProject node information
idinteger

Source order ID

imagestring · urinullable

Source order image URL

inserted_atstring · date-time

Created timestamp

namestring

Source order name

nodesarray<ProjectNode>

Child source orders

parent_idintegernullable

Parent source order ID

project_idintegernullable

Project ID

shop_idinteger

Shop ID

updated_atstring · date-time

Updated timestamp

custom_idstringnullable

Custom source order ID

link_source_idintegernullable

Link source ID

Category

Category
dataobject

Product category information

successboolean

Success status

Brand

BrandProduct brand information
idstring · uuid

Brand ID

namestring

Brand name

descriptionstringnullable

Brand description

display_idinteger

Display ID

shop_idinteger

Shop ID

inserted_atstring · date-time

Created time

updated_atstring · date-time

Updated time

Purchase

PurchasePurchase information
idstring

Purchase ID

display_idinteger

Purchase ID

statusinteger

Status

Values-2All status-1New0Confirmed1Imported goods2Canceled
time_importstring · date-time

Time import

total_quantityinteger

Total quantity

total_remain_quantityinteger

Total remain quantity

total_priceinteger

Total purchase price

total_remain_priceinteger

Total remain price

notestring

Note

warehouse_idstring

Warehouse ID

supplier_products_idinteger

Supplier products ID

supplierobject

Supplier information

Export

ExportExport information
idstring

Export ID

display_idinteger

Export ID

statusinteger

Export status

Values0New (type 0) / Defect export (type 1)1Completed (type 0) / Elimination export (type 1)2Canceled
typeinteger

Type of export

Values0Normal export1Product defect export
totalinteger

Total quantity

total_priceinteger

Total export price

notestring

Note

warehouse_idstring

Warehouse ID

supplier_products_idinteger

Supplier products ID

tagsarray<integer>

Tag IDs

export_itemsarray<object>

List of products

imagesarray<string · uri>

Export images

WarehouseTransfer

WarehouseTransferWarehouse transfer information
idstring

Transfer ID

display_idinteger

Transfer ID

statusinteger

Status

Values0Waiting for pick up1Shipping2Completed
from_warehouse_idstring

From warehouse ID

from_warehouse_namestring

From warehouse name

to_warehouse_idstring

To warehouse ID

to_warehouse_namestring

To warehouse name

total_quantityinteger

Total quantity

shipping_feeinteger

Shipping fee

notestring

Note

itemsarray<object>

List of products

imagesarray<string · uri>

Transfer images

Stocktaking

StocktakingStocktaking information
idstring

Stocktaking ID

display_idinteger

Stocktaking ID

statusinteger

Status

Values-2All status-1Creating0Stocktaking1Stocktook2Canceled
warehouse_idstring

Warehouse ID

stocktaking_bystring

Stocktaking by

stocktaking_by_valuearray<string>

Category ID / Supplier products ID / Brand ID

stocktaking_atstring · date-time

Stocktaking at

progressinteger

Processing percentage

notestring

Note

itemsarray<object>

List of products

shop_idinteger

Shop ID

creator_idstring

Creator ID

inserted_atstring · date-time

Inserted at

updated_atstring · date-time

Updated at

updated_status_atstring · date-time

Updated status at

LotProduct

LotProductExpiry-date lot of a product
idstring

Lot ID

custom_idstring

Lot code

expire_datestring · date-time

Expiry date (UTC)

manufacturing_datestring · date-time

Manufacturing date (UTC)

inserted_atstring · date-time

Created at

updated_atstring · date-time

Updated at

productLotProductInfo

Product of the lot (variations are not included)

lot_variationsarray<object>

Variations of the product linked to this lot

LotProductInfo

LotProductInfoProduct of the lot (variations are not included)
idstring

Product ID

namestring

Product name

typestring

Product type, always LOT for expiry-date products

Example: "LOT"
custom_idstringnullable

Product custom ID

display_idinteger

Product display ID

imagestringnullable

Product image URL

is_publishedbooleannullable

Store cake status

is_sell_negativebooleannullable

Allow selling with negative stock

notestringnullable

Internal note

note_productstring

Product note (HTML)

measure_group_idintegernullable

Measure group ID

brand_idstringnullable

Brand ID

CallLater

CallLaterCall later and remind information
idstring

ID

display_idinteger

Call later and remind ID

called_atstring · date-time

Called at / Process at

needs_call_atstring · date-time

Need call at / Need process at

notice_createdstring

Notice information

order_display_idstring

Order ID

order_idinteger

Order ID

statusinteger

Status

Values-1All status0No process3Calling / Processing1Processed2Not listening / Unsuccessful7Removed
typestring

Notification type

need_notify_usersarray<string>

Process staff

creatorobject

Creator information

phone_numberstring

Phone number

Voucher

VoucherVoucher information
idstring

Voucher ID

display_idinteger

Voucher ID

namestring

Voucher name

typestring

Voucher type

start_timestring · date-time

Voucher start time

end_timestring · date-time

Voucher end time

promo_code_infoobject

Voucher promo code information

is_free_shippingboolean

Is free shipping

is_activatedboolean

Is activated

is_usedboolean

Is used

customer_tagsarray<string>

Customer tags

shop_idinteger

Shop ID

creator_idstring

Creator ID

inserted_atstring · date-time

Inserted at

updated_atstring · date-time

Updated at

Promotion

PromotionPromotion information
idstring

Promotion ID

display_idstring

Promotion display ID

namestring

Promotion name

typestring

Promotion type

start_timestring · date-time

Start time

end_timestring · date-time

End time

warehouse_idsarray<string>

Warehouse IDs

customer_tagsarray<string>

Customer tags

order_sourcesarray<object>

Order sources

group_namestring

Promotion group

is_activatedboolean

Is activated

is_variationboolean

Is variation

LivestreamManager

LivestreamManagerLivestream session information
creatorobject

Creator information

end_timestring

End time of the livestream session

finisherobject

Finisher information

idstring

Livestream session ID

inserted_atstring

Created date

namestring

Livestream session name (campaign)

origin_post_idstring

Origin post ID

post_idsarray<string>

List of post IDs

remain_warehouse_idsarray<string>

List of inventory sync warehouse IDs

shop_idinteger

Shop ID

start_timestring

Start time of the livestream session

total_commentsinteger

Total number of comments

total_customersinteger

Total number of customers

warehouse_idstring

Order creation warehouse ID

PaginatedResponse

PaginatedResponsePaginated response
dataarray<any>

List of items

page_numberinteger

Page number

page_sizeinteger

Page size

successboolean

Success status

total_entriesinteger

Total entries

total_pagesinteger

Total pages

SimpleResponse

SimpleResponseSimple response with success status
successboolean

Success status

DataResponse

DataResponseResponse with data and success status
dataany

Response data

successboolean

Success status

WebhookOrderResponse

WebhookOrderResponseWebhook response when webhook_types includes orders

WebhookCustomerResponse

WebhookCustomerResponseWebhook response when webhook_types includes customers

WebhookProductResponse

WebhookProductResponseWebhook response when webhook_types includes products
dataobject

WebhookInventoryResponse

WebhookInventoryResponseWebhook response when webhook_types includes variations_warehouses
dataobject

WebhookAutoCallResponse

WebhookAutoCallResponseAuto Voice result sent once to the configured webhook URL. Return HTTP 200 to acknowledge receipt.
typestring
Example: "auto_call"
shop_idinteger
Example: 4
order_idstring

Order ID or code used to trigger the call

Example: "1418"
phone_numberstring
Example: "0973667874"
answeredboolean

Whether the callee picked up

Example: true
dtmfstringnullable

Digits the callee pressed (null if none)

Example: "1"

AdAccount

AdAccountAd accounts list response
successboolean

Success status

dataarray<object>

List of ad accounts

page_numberinteger

Current page number

page_sizeinteger

Number of records per page

total_entriesinteger

Total number of ad accounts

total_pagesinteger

Total number of pages

CampaignListResponse

CampaignListResponse
successboolean

Success status

dataarray<object>

List of campaigns

summaryobject

Aggregated performance metrics across all campaigns

page_numberinteger

Current page number

page_sizeinteger

Number of records per page

total_entriesinteger

Total number of campaigns

total_pagesinteger

Total number of pages

AdSetListResponse

AdSetListResponse
successboolean

Success status

dataarray<object>

List of ad sets

summaryobject

Aggregated performance metrics across all ad sets

page_numberinteger

Current page number

page_sizeinteger

Number of records per page

total_entriesinteger

Total number of ad sets

total_pagesinteger

Total number of pages

AdListResponse

AdListResponse
successboolean

Success status

dataarray<object>

List of ads

summaryobject

Aggregated performance metrics across all ads

page_numberinteger

Current page number

page_sizeinteger

Number of records per page

total_entriesinteger

Total number of ads

total_pagesinteger

Total number of pages

Reconciliation

ReconciliationReconciliation session with its orders
system_idinteger

Internal session ID. Use it for the system_id filter

display_idinteger

Session code shown on the shop screen

custom_idstringnullable

Code set by the shop or the marketplace (e.g. statement ID)

partner_idstringnullable

Shipping partner ID on Pancake system

control_typestring

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
notestringnullable

Note

excel_codintegernullable

Total COD according to the carrier statement

excel_feeintegernullable

Total shipping fee according to the carrier statement

pos_codintegernullable

Total COD according to POS orders

paid_atstring · date-timenullable

Payment time of the session

payment_statusstring

Payment status

Values"paid"Paid"unpaid"Unpaid
creatoranynullable

User who created the session

ReconciliationUser

ReconciliationUser
idstring · uuid

User ID

namestringnullable

User name. Null when the user was deleted from the system

ReconciliationOrder

ReconciliationOrderOrder snapshot inside a reconciliation session
order_idinteger

Internal order ID (system_id of the order)

display_idintegernullable

Order ID shown on the shop (id of the order)

custom_idstringnullable

Custom order code set by the shop

extend_codestringnullable

Tracking code from the shipping partner

order_number_vtpstringnullable

Viettel Post order number

order_statusintegernullable

Order status at the time the order was added to the session. Same values as status of the order

resultstringnullable

Reconciliation result of the order in this session

Values"succeed"Matched"mismatch"Mismatched amount"failed"Not reconciled (order not found or invalid)
messagestringnullable

Reason when the order could not be reconciled

cod_amountintegernullable

COD amount according to the shipping partner. Null when this session does not reconcile COD for the order

partner_feeintegernullable

Shipping fee according to the shipping partner

pos_codintegernullable

COD amount of the order on POS

currencystringnullable

Currency of the order

reconciliation_atstring · date-timenullable

Reconciliation time of the order