Date breakdown
A comprehensive list of the date breakdown query keys, allowed fields values, and operators for the order resource
Last updated
A comprehensive list of the date breakdown query keys, allowed fields values, and operators for the order resource
Last updated
To perform a date breakdown query on the order resource send a POST
request to the /orders/date_breakdown
endpoint specifying in the payload the and parameters like in the generic example below:
These are the keys you need to set when performing a date breakdown query:
by
String
The date field you want the results of the query aggragated by.
field
String
The field you want the metrics or statistics computed on.
operator
String
The computing operator.
interval
String
The time interval over which the metrics / stats are computed. The results will be aggregated by date accordingly.
One of hour
, day
, week
, month
, or year
(default is month
).
breakdown
Object
The optional breakdown (eventually nested).
by
valuesThese are the valid values you can specify for the by
key of the date breakdown query:
order.approved_at
order.archived_at
order.cancelled_at
order.created_at
order.fulfillment_updated_at
order.payment_updated_at
order.placed_at
order.updated_at
order.current_date
shipments.cancelled_at
shipments.on_hold_at
shipments.picking_at
shipments.packing_at
shipments.ready_to_ship_at
shipments.shipped_at
shipments.created_at
shipments.updated_at
resource_errors.created_at
resource_errors.updated_at
field
valuesThese are the valid values you can specify for the field
key of the date breakdown query and the related valid operators, based on that key:
customer.id
cardinality
value_count
customer.email
cardinality
value_count
customer.group_name
cardinality
value_count
line_items.code
cardinality
value_count
line_items.discount
avg
max
min
sum
stats
line_items.id
cardinality
value_count
line_items.item_id
cardinality
value_count
line_items.options_amount
avg
max
min
sum
stats
line_items.quantity
avg
max
min
sum
stats
line_items.tax_amount
avg
max
min
sum
stats
line_items.tax_rate
avg
max
min
sum
stats
line_items.total_amount
avg
max
min
sum
stats
line_items.unit_amount
avg
max
min
sum
stats
line_items.options.id
cardinality
value_count
line_items.options.quantity
avg
max
min
sum
stats
line_items.options.total_amount
avg
max
min
sum
stats
line_items.options.unit_amount
avg
max
min
sum
stats
market.id
cardinality
market.number
cardinality
value_count
order.adjustment_amount
avg
max
min
sum
stats
order.adjustment_tax_amount
avg
max
min
sum
stats
order.adjustment_taxable_amount
avg
max
min
sum
stats
order.discount_amount
avg
max
min
sum
stats
order.duty_amount
avg
max
min
sum
stats
order.gift_card_code
value_count
order.gift_card_amount
avg
max
min
sum
stats
order.id
cardinality
value_count
order.line_item_options_count
avg
max
min
sum
stats
order.number
value_count
order.payment_method_amount
avg
max
min
sum
stats
order.payment_method_tax_amount
avg
max
min
sum
stats
order.payment_method_taxable_amount
avg
max
min
sum
stats
order.reference
cardinality
value_count
order.reference_origin
cardinality
value_count
order.shipments_count
avg
max
min
sum
stats
order.shipping_amount
avg
max
min
sum
stats
order.shipping_taxable_amount
avg
max
min
sum
stats
order.skus_count
avg
max
min
sum
stats
order.subtotal_amount
avg
max
min
sum
stats
order.subtotal_tax_amount
avg
max
min
sum
stats
order.subtotal_taxable_amount
avg
max
min
sum
stats
order.total_amount
avg
max
min
sum
stats
order.total_amount_with_taxes
avg
max
min
sum
stats
order.total_tax_amount
avg
max
min
sum
stats
order.total_taxable_amount
avg
max
min
sum
stats
order.seconds_in_draft
avg
max
min
stats
percentiles
order.seconds_in_approved
avg
max
min
stats
percentiles
order.seconds_in_placed
avg
max
min
stats
percentiles
order.refunds_total_amount_with_taxes
avg
max
min
sum
stats
order.total_amount_with_taxes_net_of_refunds
avg
max
min
sum
stats
refunds.id
value_count
refunds.amount
avg
max
min
sum
stats
refunds.number
value_count
shipments.id
cardinality
value_count
shipments.number
cardinality
value_count
shipments.reference
cardinality
value_count
shipments.reference_origin
cardinality
value_count
shipments.seconds_in_picking
avg
max
min
stats
percentiles
shipments.seconds_in_ready_to_ship
avg
max
min
stats
percentiles
shipments.stock_location.id
cardinality
value_count
shipments.stock_location.reference
cardinality
value_count
shipments.stock_location.reference_origin
cardinality
value_count
shipments.shipping_method.id
cardinality
value_count
shipments.shipping_method.reference
cardinality
value_count
shipments.shipping_method.reference_origin
cardinality
value_count
shipments.shipping_category.id
cardinality
value_count
shipments.shipping_category.reference
cardinality
value_count
shipments.shipping_category.reference_origin
cardinality
value_count
resource_errors.code
cardinality
value_count
resource_errors.id
cardinality
value_count
resource_errors.message
cardinality
value_count
Please find more information on how date breakdown queries work .
See the to check the full list of valid values for this key.
See the to check the full list of valid values for this key.
See the to check the full list of valid operators based on the value you assigned to the field
key.
See the for any information about the breakdown query.
The date and time at which the order was approved (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the order was archived (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the order was cancelled (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the order was created (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the order's fulfillment status was last updated (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the order's payment status was last updated (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the order was placed (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the order was last updated (complete date plus hours, minutes and seconds — according to the standard).
The date and time of the order's latest status change, regardless of the order's status (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the shipment status was cancelled (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the shipment status was put on hold (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the shipment was picked (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the shipment was packed (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the shipment was ready to ship (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the shipment was shipped (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the shipment was created (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the shipment was updated (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the resource error was created (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the resource error was updated (complete date plus hours, minutes and seconds — according to the standard).