total_amount
is set by the items
and the resources
. See sections below for more details.Error code 400, message: An order can not have products with different currencies
currency
string
pickup_address
object
Address
used to pickup a pacdelivery_address
object
Address
used for delivery.delivery_time
object
timestamp
format.pickup_time
object
timestamp
format.human_id
string
3AG7UA.
total_amount
float
total_quantity
number
units
number
accounting_reference
string
user
object
note
string
total_amount
is a little complicated due to the flexibility of our products' (and sub products') prices and discounts. However, we keep it simple for you. Just usesum(items.final_price)
to calculate total_amount
.item
is a product and any sub_products that are included with that product. When you get the final_price
for that item,
this is the equation:(item.price + sum(sub_products.price)) * (1 - item.discount) * item.quantity
total_amount
will be: 87 EUR40 * (1 - 0.1) * 2 = 72
(10 + 5) * (1 - 0.0) * 1 = 15
72 + 15 = 87
2019-02-01
Reserved Payment
, we introduced this new attribute. It is used to calculate the amount of a Reserved Payment
when it is in an Order
.items
in the Order Object is where you put the products
your user wants to buy. These items are stored in an array. Each item has the below attributes. See Updating Items in an Order for more details on how this is used.name
, price
, final_price
, discount
, vat
, currency
.
The goal of these attributes it's to take a snapshot the product
at the moment the order
is created.
Updating a product later will not affect the orders containing it.quantity
number
sub_products
array
final_price
float
(price * (1 - discount)) * quantity
date_filter
, order_status
, and delivery_status
used in the Order Object and various order methods.created
delivery
CREATED
PROCESSING
DECLINED
FAILED
SUCCESS
CANCELLED
CREATED
PENDING
PROCESSING
ASSIGNING
PICKUP_STARTED
PICKUP_ARRIVED
DROPOFF_STARTED
DROPOFF_ARRIVED
CANCELLED
DONE
UNKNOWN
QUEUED
delivery_address
object
Address
used for delivery.billing_address
object
Address
used for billing purposes.pickup_address
object
Address
used to pickup a package.delivery_time
int
timestamp
format.pickup_time
string
timestamp
format.note
string
items
or the subscription
parameter should be included in the request.order_id
string
items
overwrites the current list instead of adding additional items
to it.order_id
string
from_date
number
timestamp
format. Default is None
.to_date
number
timestamp
format. Default is None
.date_filter
string
CREATED
.size
number
page
number
sort
string
_id
or human_id
associated with the current user's orders.query
string
from_date
number
timestamp
format. Default is None
.to_date
number
timestamp
format. Default is None
.date_filter
string
CREATED
.size
number
page
number
sort
string
order_id
string
user
is required field.user
string
delivery_address
object
Address
used for delivery.billing_address
object
pickup_address
object
Address
used to pickup a package.delivery_time
int
timestamp
format.pickup_time
int
timestamp
format.items
string
note
string
subscription
string