post
https://api.yotpo.com/core/v3/stores//register_purchase
Sends all relevant order information to Yotpo in one batch.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
How to use this endpoint
- Required parameters are listed below. For the full list of properties, see About aggregated order info. Merchants using Yotpo Reviews must also add the "first_name" and "last_name" customer parameter.
- For example requests of full and minimal payload, see below.
Example requests
{
"purchase": {
"external_order_id": "000000006",
"order_date": "2021-03-25T13:57:05Z",
"checkout_token": "ll2lk3",
"payment_method": "visa",
"currency": "USD",
"total_price": 20,
"subtotal_price": 10,
"landing_site_url": "https://www.example.com/surfboards",
"payment_status": "paid",
"customer": {
"external_id": "ak123798684365sdfkj",
"email": "[email protected]",
"phone_number": "+14155550100",
"first_name": "Tom",
"last_name": "Smith",
"custom_properties": {
"membership": "gold"
},
"accepts_sms_marketing": false,
"accepts_email_marketing": false
},
"billing_address": {
"address1": "96 Coffee Street",
"address2": "",
"city": "Hudson",
"company": "",
"state": "New York",
"zip": "13420",
"province_code": "NY",
"country_code": "US",
"phone_number": "+14155550100"
},
"shipping_address": {
"address1": "96 Coffee Street",
"address2": "",
"city": "Hudson",
"company": "",
"state": "New York",
"zip": "13420",
"province_code": "NY",
"country_code": "US",
"phone_number": "+14155550100"
},
"line_items": [
{
"quantity": 1,
"total_price": 10,
"subtotal_price": 10,
"coupon_code": "hg4m",
"custom_properties": {
"color": "blue"
},
"product": {
"external_id": "0000008",
"name": "Minimal Surfboard",
"description": "A great surfboard!",
"url": "https://www.example.com/products/minimal-surfboard",
"image_url": "https://www.example.com/images/minimal-surfboard.jpg",
"price": 10,
"currency": "USD",
"inventory_quantity": 4,
"is_discontinued": false,
"group_name": "surfboards",
"brand": "Waverider",
"sku": "MS-001",
"mpn": "MS-001-B",
"gtins": [
{
"declared_type": "UPC",
"value": "742833102466"
}
]
}
}
],
"fulfillments": [
{
"external_id": "5555555",
"fulfillment_date": "2021-03-31T11:58:51Z",
"status": "success",
"shipment_info": {
"shipment_status": "delivered",
"tracking_company": "UPS",
"tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
"tracking_number": "1Z999AA10123456784"
},
"fulfilled_items": [
{
"external_product_id": "0000008",
"quantity": 1
}
]
}
],
"custom_properties": {
"delivery_type": "Express"
}
}
}{
"purchase":{
"external_order_id":"000000005",
"order_date":"2021-03-25T13:57:05Z",
"customer":{
"external_id":"2sadfasdf"
},
"line_items":[
{
"product":{
"external_id":"0000007",
"name":"0000007"
},
"quantity":1
}
]
}
} 200OK. The response has no body.