EDITOR or above. Learn more about page roles.CANCEL orders from time to time due to fraud review.CREATED state, unless the status parameter is specified.curl -X GET -G \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<PAGE_ID>/commerce_orders
| Attribute & Type | Description |
|---|---|
updated_afterType: string | Optional Returns orders for which the status changed after this date in a UNIX timestamp. |
statusType: vector of status_code | Optional Comma-separated list of statuses to filter. |
status_code enum| Value | Description |
|---|---|
FB_PROCESSING | Order is still being processed by Facebook. FB_PROCESSING orders are for informative reasons only (for example, to confirm to buyers that the order was placed). There is no action needed. This order may not advance to the CREATED state. |
CREATED | Order has been created on Facebook, not yet acknowledged by external sellers. |
IN_PROGRESS | Order has been acknowledged, and now in progress. |
SHIPPED | Order has been shipped. |
CANCELLED | Order has been cancelled. |
REFUNDED | Order has been refunded. |
curl -X GET -G \
-d 'updated_after=1529718360' \
-d 'status="CREATED,IN_PROGRESS"' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<PAGE_ID>/commerce_orders
| Attribute & Type | Description |
|---|---|
dataType: array of order |
order object| Attribute & Type | Description |
|---|---|
idType: string | Unique ID representing the order. Although numerical, manage order IDs as strings; order ID length and structure is subject to change. |
emailType: string | Email address of the customer. Use for fulfillment purposes only, unless email_remarketing_option is set to true |
email_remarketing_optionType: boolean | Customer’s marketing opt-in status. Do not use email address for marketing purposes if set to false. |
createdType: string | Order’s creation datetime in ISO 8601 format. |
last_updatedType: string | Order’s latest update datetime in ISO 8601 format. |
ship_by_dateType: string | Expected date the order is to be shipped by. Date format: y-m-d. |
itemsType: array of item | |
order_statusType: array of order_status | |
selected_shipping_optionType: array of shipping_option | Shipping option selected for this order. |
shipping_addressType: array of shipping_address | |
payment_detailsType: array of payment_details |
item objectitem object payload contains minimal details about the product itself. You can fetch additional product information by making the following Graph API call:curl -X GET -G \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<PRODUCT_ID>
| Attribute | Type | Description |
|---|---|---|
fb_product_id | string | Unique ID representing the item. Multiple quantities of any item will be represented in the quantity field (see below). |
retailer_id | string | ID representing the product in the seller’s catalog. |
quantity | Number | Number of items ordered. |
channel | string | Either facebook or instagram. Note: The channel field does not appear in the response by default. In order to see it, it must be queried for explicitly using ?fields= syntax. Learn more about reading Graph API fields. |
price_per_unit | Unit price for this item. | |
calculated_tax | Tax amount for all items without shipping. | |
calculated_tax_rate | float | Tax rate in decimal format. |
order_status object| Attribute | Type | Description |
|---|---|---|
status_code |
shipping_option object| Attribute | Type | Description |
|---|---|---|
name | string | Human readable name of the shipping option. |
price | Shipping cost. | |
calculated_tax | Shipping tax amount. | |
estimated_shipping_time | Estimated shipping time |
shipping_address object| Attribute | Type | Description |
|---|---|---|
name | string | Name on the shipping label. |
street1 | string | |
street2 | string | |
city | string | |
state | string | Two-letter state abbreviation e.g. “NY” |
postal_code | string | |
country | string |
payment_details object| Attribute | Type | Description |
|---|---|---|
subtotal | Cost of items and shipping. | |
tax | Tax amount for the order. | |
total_amount | Total amount for the order. | |
tax_remitted | bool | true if taxes are collected by Facebook. |
subtotal_details object| Attribute | Type | Description |
|---|---|---|
items | Cost of products items in this order. | |
shipping | Shipping cost for the order. |
currency_amount object| Attribute | Type | Description |
|---|---|---|
amount | string | Amount in decimal format, eg. “5.5”. |
currency | string | Three digit ISO-4217-3 code for the purchase, e.g. USD. |
estimated_shipping_time object| Attribute | Type | Description |
|---|---|---|
min_days | Number | Expected minimum number of days in shipping |
max_days | Number | Expected maximum number of days in shipping |
{ "data": [ { "items": [ { "fb_product_id": "1747144002010730", "retailer_id": "1522693943pages_commerce_sell5ac27737cc5fc7490521823", "quantity": 1, "price_per_unit": { "amount": "0.55", "currency": "USD" }, "calculated_tax": { "amount": "0.06", "currency": "USD" }, "calculated_tax_rate": 0.101 } ], "order_status": { "status_code": "IN_PROGRESS" }, "email": "user@example.com", "created": "2018-05-14T23:02:59+00:00", "last_updated": "2018-05-14T23:03:22+00:00", "ship_by_date": "2018-05-17", "payment_details": { "subtotal": { "items": { "amount": "0.55", "currency": "USD" }, "shipping": { "amount": "0.00", "currency": "USD" } }, "tax": { "amount": "0.06", "currency": "USD" }, "total_amount": { "amount": "0.61", "currency": "USD" }, "tax_remitted": true }, "selected_shipping_option": { "name": "STANDARD (3-5 Business days)", "price": { "amount": "0.00", "currency": "USD" }, "calculated_tax": { "amount": "0.00", "currency": "USD" }, "estimated_shipping_time": { "min_days": 5, "max_days": 7 } }, "shipping_address": { "name": "John Smith", "street1": "1101 Dexter Ave N", "city": "Seattle", "state": "WA", "postal_code": "98109-3517", "country": "US" }, "id": "64000782776004" } ] }
curl -X POST \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<ORDER_ID>/acknowledge_order
| Attribute | Type | Required | Description |
|---|---|---|---|
merchant_order_reference | string | Optional | ID representing the order in your order management system. |
{
"id": "64000841784004",
"status": "IN_PROGRESS"
}
curl -X POST \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<PAGE_ID>/acknowledge_orders
| Attribute | Type | Required | Description |
|---|---|---|---|
orders | array of order_id | Required | Array of 100 or less order IDs. |
order_id object| Attribute | Type | Required | Description |
|---|---|---|---|
id | string | Required | ID of the order. |
merchant_order_reference | string | Optional | ID representing the order in your order management system |
{ "orders": [ { "id": "64000841790004" }, { "id": "10100677592885259" } ] }
| Attribute | Type | Description |
|---|---|---|
orders | array of order_id_and_status |
order_id_and_status object| Attribute | Type | Description |
|---|---|---|
id | string | ID of the order. |
status |
{
"orders": [
{
"id": "64000841790004",
"status": "IN_PROGRESS"
},
{
"id": "10100677592885259",
"error": {
"error_code": 2361003,
"error_message": "Invalid Order ID"
}
}
]
}
curl -X POST \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<ORDER_ID>/shipments
| Attribute | Type | Description |
|---|---|---|
items | array of shipment_item | |
tracking_info |
shipment_item object| Attribute | Type | Required | Description |
|---|---|---|---|
retailer_id | string | Required | ID representing the product in the seller’s catalog. |
quantity | number | Required | Quantity. |
tracking_info object| Attribute | Type | Required | Description |
|---|---|---|---|
carrier | Required | Carrier used for this package | |
tracking_number | string | Required | Carrier tracking number |
shipping_method_name | string | Optional | Human readable description of the shipping method. |
carrier_code enum| Value |
|---|
dhl |
dhl_ecommerce_us |
eagle |
fedex |
ontrac |
tnt |
ups |
usps |
{ "items" : [ { "retailer_id" : "fb_tee_001", "quantity" : 3 } ], "tracking_info" : { "tracking_number": "12345abcd", "carrier": "FEDEX", "shipping_method_name": "2 Day Fedex" } }
{
"success": true
}
curl -X POST \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<ORDER_ID>/cancel_order
| Attribute | Type | Required | Description |
|---|---|---|---|
order_cancel_reason | Required |
order_cancel_reason object| Attribute | Type | Required | Description |
|---|---|---|---|
reason_code | Required | ||
reason_description | string | Optional | Reason for the cancellation, this message may be presented to the user. |
reason_code enum| Value | Description |
|---|---|
CUSTOMER_REQUESTED | |
OUT_OF_STOCK | |
INVALID_ADDRESS | |
SUSPICIOUS_ORDER | |
CANCEL_REASON_OTHER |
{ "order_cancel_reason": { "reason_code": "CUSTOMER_REQUESTED", "reason_description": "Buyer did not need it anymore" } }
{
"success": true
}
curl -X POST \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<ORDER_ID>/refund_order
| Attribute | Type | Required | Description |
|---|---|---|---|
items | array of refund_item | Optional | For Partial refund specify item level breakdown, items are not required for full refunds. |
reason_code | Required | ||
reason_text | string | Optional | Reason for the refund. This message is presented to the user. |
refund_item object| Attribute | Type | Required | Description |
|---|---|---|---|
retailer_id | string | Required | Retailer identifier for the product. |
item_refund | Required | Cost of item, before any tax. | |
shipping_refund | Required | Amount to be refunded for shipping. |
refund_reason_code enum| Value | Description |
|---|---|
BUYERS_REMORSE | |
DAMAGED_GOODS | |
NOT_AS_DESCRIBED | |
QUALITY_ISSUE | |
REFUND_REASON_OTHER | |
WRONG_ITEM |
amount field can be any value up to the full value of the item.{ "items": [ { "retailer_id": "38383838", "item_refund": { "amount": "5.5", "currency": "USD" }, "shipping_refund": { "amount": "2.4", "currency": "USD" } } ], "reason_code": "WRONG_ITEM" }
{ "reason_code": "WRONG_ITEM" }
{
"success": true
}
curl -X GET -G \
-d 'updated_after=1529718360' \
-d 'status="SHIPPED"' \
-d 'fields="reimbursements,transaction_details{tax_rate,tax_details}"' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<PAGE_ID>/commerce_orders
| Attribute | Type | Required | Description |
|---|---|---|---|
updated_after | Unix timestamp | Required | Reimbursements and transactions will only display for orders after this timestamp. |
status | Either SHIPPED or REFUNDED | Required | Order status for transaction request |
fields | reimbursements,
transaction_details{tax_rate,tax_details} | Required | Returns specified fields for reimbursements and transaction details |
| Value | Type | Description |
|---|---|---|
reason | Reason code for the reimbursement | See Reason Codes below |
value | currency_amount | Value of total reimbursement of this order |
reason code enum| Value | Description |
|---|---|
INCENTIVE | A reimbursement made by Facebook to the seller for a specific reason. The amount is added to the seller’s reimbursement balance until it’s paid out to the seller’s bank account. |
PAYOUT | The bank transfer made to the seller’s bank account which includes a set of reimbursements. Includes details on when the payout was initiated and the amount that was transferred to the seller’s bank account.
Payout rows are included in the report after the 3 day delay from when the payout was actually initiated. |
updated_after timestamp.| Value | Type | Description |
|---|---|---|
transaction_type | Reason code for the transaction | See Reason Codes below |
transaction_date | ISO 8601 datetime | Datetime of transaction |
processing_fee | object | Contains amount and currency objects consisting of the processing fee |
net_payment_amount | object | Contains amount and currency objects consisting of the net payment amount |
tax_rate | string | Percentage tax rate |
tax_details | object | Tax details object |
payout_reference_id | string | The bank reference ID associated with the payout in which this transaction is included. Note: only available for payouts processed after 5/15/19. |
| Value | Type | Description |
|---|---|---|
tax_category | string | Facebook tax category |
jurisdiction | string | The Jurisdiction under which tax is applied. Jurisdiction can be a state (e.g. Washington), city (e.g. Seattle), county(e.g. King county) or even a specific tax policy (e.g. Regional Transit Authority). Indicates under which jurisdiction the tax was found to be required for the given transaction. |
imposition | string | Type of imposition for the tax item, indicating what type of tax this is. For example, “Local Sales and Use Tax” and “Retail Sales and Use Tax” are common imposition values. |
item_tax_rate | string | Item level tax rate for the given category, jurisdiction and imposition. This gives the tax percentage for the given tax item detail row. |
item_tax_amount | object | Item level tax amount calculated for this tax item row. This is calculated using the item tax rate provided above. Contains amount and currency fields. |
| Value | Description |
|---|---|
SALE | Indicates a normal SALE transaction when the money is captured from the buyer and transferred to the seller’s balance |
REFUND | Indicates that order is refunded and includes information on the refund itself |
CHARGEBACK | Indicates that there was a chargeback filed by the buyer for this order. Usually, this type of transaction will be followed by a CHARGEBACK_FEE transaction if the seller loses the chargeback claim. If the seller wins the chargeback claim, this will be followed by a CHARGEBACK_REVERSAL transaction. |
CHARGEBACK_FEE | Indicates the fee that was withheld if the seller loses in a chargeback claim. |
CHARGEBACK_REVERSAL | Indicates that the seller won the chargeback claim and contains details on the chargeback being reversed |
GOODWILL_TRANSFER | Goodwill transfer details that Facebook paid the seller. This can happen if Facebook covers the chargeback, or in other cases where Facebook pays the seller for their loss, such as the seller winning an appeal against a buyer protection claim from the buyer. |
{ "data": [ { "reimbursements": { "data": [ { "reason": "FREE_SHIPPING", "value": { "amount": "0.06", "currency": "USD" } }, { "reason": "FLAT_BUYER_DISCOUNT", "value": { "amount": "0.06", "currency": "USD" } } ] }, "transaction_details": { "data": [ { "transaction_type": "SALE", "transaction_date": "2019-01-09T09:16:21+00:00", "processing_fee": { "amount": "-0.05", "currency": "USD", }, "net_payment_amount": { "amount": "0.55", "currency": "USD", }, "tax_rate": "10%", "tax_details": { "data": [ { "tax_category": "FBMP_OTHER_TAXABLE", "jurisdiction": "WASHINGTON", "imposition": "Retail Sales and Use Tax", "item_tax_rate": "6.50%", "item_tax_amount": { "amount": "0.08", "currency": "USD" } } ] }, "payout_reference_id": "FBMPUSS5191u01g" } ] }, "id": "64000782776004" } ] }