Orders
For more information about Orders in Zaius, please refer to our Orders reference:
post
https://api.zaius.com/v3
/events
Order Purchase
Example Payload
1
[
2
{
3
"type": "order",
4
"action": "purchase",
5
"identifiers": {
6
"email": "[email protected]"
7
},
8
"data": {
9
"ts": 123456789, // (optional) the time of the order purchase
10
"order": {
11
"order_id": "OR345",
12
"total": 109.65,
13
"discount": 5.00,
14
"subtotal": 103.00,
15
"tax": 5.15,
16
"shipping": 6.50,
17
"coupon_code": "5OFF",
18
"items": [
19
{
20
"product_id": "2045",
21
"price": 19.00,
22
"quantity": 5,
23
"discount": 0.00,
24
"subtotal": 95.00
25
},
26
{
27
"product_id": "2091",
28
"price": 10.00,
29
"quantity": 1,
30
"discount": 2.00,
31
"subtotal": 8.00
32
}
33
]
34
}
35
}
36
}
37
]
Copied!
post
https://api.zaius.com/v3
/events
Order Return / Refund
Example Payload
1
[
2
{
3
"type": "order",
4
"action": "return", // or refund
5
"identifiers": {
6
"email": "[email protected]"
7
},
8
"data": {
9
"ts": 123456789, // (optional) the time of the order return | refund | cancel
10
"order": {
11
"order_id": "OR345",
12
//These values should be specified and the absolute amount specified will be subtracted from the existing value
13
"total": -100.00,
14
"subtotal": -90.00,
15
//If specified, these values overwrite any existing value and should be the positive remainder
16
"tax": 0,
17
"shipping": 0
18
"items": [
19
{
20
"product_id": "2045",
21
"price": -9.00,
22
"quantity": 10,
23
"subtotal": -90.00
24
}
25
]
26
}
27
}
28
}
29
]
Copied!
post
https://api.zaius.com/v3
/events
Order Cancellation
Example Payload
1
[
2
{
3
"type": "order",
4
"action": "cancel",
5
"identifiers": {
6
"email": "[email protected]"
7
},
8
"data": {
9
"ts": 123456789, // (optional) the time of the order return | refund | cancel
10
"order": {
11
"order_id": "OR345",
12
"total": -100.00
13
"items": [
14
{
15
"product_id": "2045",
16
"price": -10.00,
17
"quantity": 10,
18
"subtotal": -100.00
19
}
20
]
21
}
22
}
23
}
24
]
Copied!

Order Updates

To update the top-level order summary fields without generating events, use the Objects endpoint.
Last modified 10mo ago