Orders

For more information about Orders in Zaius, please refer to our Orders reference:

post
Order Purchase

https://api.zaius.com/v3/events
Upload an order purchase event to Zaius
Request
Response
Body Parameters
type
required
string
the event type (e.g. product)
action
required
string
the event action associated with the type (e.g. add_to_cart)
identifiers
required
object
any known identifiers associated with the customer that performed the event
data
optional
object
any additional fields you want to include on the event (e.g. product_id)
200: OK
{
"title": "Accepted",
"status": 202,
"timestamp": "2018-09-10T21:07:10-05:00"
}
400: Bad Request
{
"title": "Bad Request",
"status": 400,
"timestamp": "2018-09-10T21:07:10-05:00",
"detail": {
"invalids": []
}
}
403: Forbidden
{
"message": "Forbidden"
}
Example Payload
[
{
"type": "order",
"action": "purchase",
"identifiers": {
"email": "bob@gmail.com"
},
"data": {
"ts": 123456789, // (optional) the time of the order purchase
"order": {
"order_id": "OR345",
"total": 109.65,
"discount": 5.00,
"subtotal": 103.00,
"tax": 5.15,
"shipping": 6.50,
"coupon_code": "5OFF",
"items": [
{
"product_id": "2045",
"price": 19.00,
"quantity": 5,
"discount": 0.00,
"subtotal": 95.00
},
{
"product_id": "2091",
"price": 10.00,
"quantity": 1,
"discount": 2.00,
"subtotal": 8.00
}
]
}
}
}
]

post
Order Return / Refund

https://api.zaius.com/v3/events
Upload an order purchase event to Zaius
Request
Response
Body Parameters
type
required
string
the event type (e.g. product)
action
required
string
the event action associated with the type (e.g. add_to_cart)
identifiers
required
object
any known identifiers associated with the customer that performed the event
data
optional
object
any additional fields you want to include on the event (e.g. product_id)
200: OK
{
"title": "Accepted",
"status": 202,
"timestamp": "2018-09-10T21:07:10-05:00"
}
400: Bad Request
{
"title": "Bad Request",
"status": 400,
"timestamp": "2018-09-10T21:07:10-05:00",
"detail": {
"invalids": []
}
}
403: Forbidden
{
"message": "Forbidden"
}
Example Payload
[
{
"type": "order",
"action": "return", // or refund
"identifiers": {
"email": "bob@gmail.com",
},
"data": {
"ts": 123456789, // (optional) the time of the order return | refund | cancel
"order": {
"order_id": "OR345",
"total": -100.00
"items": [
{
"product_id": "2045",
"price": -10.00,
"quantity": 10,
"subtotal": -100.00
}
]
}
}
}
]

post
Order Cancellation

https://api.zaius.com/v3/events
Upload an order purchase event to Zaius
Request
Response
Body Parameters
type
required
string
the event type (e.g. product)
action
required
string
the event action associated with the type (e.g. add_to_cart)
identifiers
required
object
any known identifiers associated with the customer that performed the event
data
optional
object
any additional fields you want to include on the event (e.g. product_id)
200: OK
{
"title": "Accepted",
"status": 202,
"timestamp": "2018-09-10T21:07:10-05:00"
}
400: Bad Request
{
"title": "Bad Request",
"status": 400,
"timestamp": "2018-09-10T21:07:10-05:00",
"detail": {
"invalids": []
}
}
403: Forbidden
{
"message": "Forbidden"
}
Example Payload
[
{
"type": "order",
"action": "cancel",
"identifiers": {
"email": "bob@gmail.com",
},
"data": {
"ts": 123456789, // (optional) the time of the order return | refund | cancel
"order": {
"order_id": "OR345",
"total": -100.00
"items": [
{
"product_id": "2045",
"price": -10.00,
"quantity": 10,
"subtotal": -100.00
}
]
}
}
}
]