Update an order or cart
PUT /stores/{storeResourceId}/orders/{resourceId}
/stores/{storeResourceId}/orders/{resourceId}Changes the totals, items, customer or tracking data of an order or cart. The items you send replace the current ones. It does not change the status: use the action operations for that.
When to use: When the shopper changes the cart (adds or removes products). A cart that is updated is counted as active again, so it is considered abandoned only after the abandoned-cart wait passes without further updates.
When not to use: To change the status use process_order, pay_order, ship_order, cancel_order or refund_order.
Permissions: Requires the manager role or higher, or the marketing.audiences.write capability.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
Identifier (resource_id) of the store the order belongs to.
Identifier (resource_id) of the order: the one you chose when you created it.
The updated Order resource
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X PUT "https://api.easymailing.com/stores/acme-shop/orders/order-5001" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "currency": "string", "currency_exchange_rate": 0.1, "order_total": 0, "tax_total": 0, "discount_total": 0, "shipping_total": 0, "checkout_url": "http://example.com", "order_number": "string", "tracking_number": "string", "tracking_carrier": "string", "tracking_url": "http://example.com", "cancelled_at": "2019-08-24T14:15:22Z", "campaign_hash": "string", "order_items": [ { "quantity": 1, "price": 0, "discount": 0, "variant": "/entity/1" } ], "customer": "/entity/1", "created_at": "2019-08-24T14:15:22Z" }'{ "resource_id": "string", "currency": "string", "currency_exchange_rate": 0.1, "order_total": 0, "tax_total": 0, "discount_total": 0, "shipping_total": 0, "checkout_url": "http://example.com", "status": "cart", "order_number": "string", "tracking_number": "string", "tracking_carrier": "string", "tracking_url": "http://example.com", "abandoned_cart_at": "2019-08-24T14:15:22Z", "processed_at": "2019-08-24T14:15:22Z", "paid_at": "2019-08-24T14:15:22Z", "cancelled_at": "2019-08-24T14:15:22Z", "campaign_hash": "string", "order_items": [ { "quantity": 1, "price": 0, "discount": 0, "variant": "/entity/1" } ], "customer": "/entity/1", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}