Date breakdown
A comprehensive list of the date breakdown query keys, allowed fields values, and operators for the return resource
Last updated
A comprehensive list of the date breakdown query keys, allowed fields values, and operators for the return resource
Last updated
To perform a date breakdown query on the return resource send a POST
request to the /returns/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:
return.approved_at
return.archived_at
return.cancelled_at
return.created_at
return.received_at
return.rejected_at
return.shipped_at
return.updated_at
return.current_date
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
value_count
customer.email
value_count
customer.group_name
value_count
destination_address.business
value_count
destination_address.city
value_count
destination_address.country_code
value_count
destination_address.geocoded
value_count
destination_address.localized
value_count
destination_address.state_code
value_count
destination_address.zip_code
value_count
origin_address.business
value_count
origin_address.city
value_count
origin_address.country_code
value_count
origin_address.geocoded
value_count
origin_address.localized
value_count
origin_address.state_code
value_count
origin_address.zip_code
value_count
market.id
cardinality
value_count
market.number
cardinality
value_count
return.number
value_count
return.reference
value_count
return.reference_origin
value_count
return.status
value_count
return.id
cardinality
value_count
return.order_id
value_count
return.skus_count
avg
max
min
sum
stats
return_line_items.quantity
avg
max
min
sum
stats
return_line_items.line_item_id
value_count
return_line_items.line_item_code
value_count
return_line_items.line_item_item_type
value_count
return_line_items.line_item_total_amount
avg
max
min
sum
stats
return_line_items.line_item_tax_amount
avg
max
min
sum
stats
return_line_items.line_item_tax_rate
avg
max
min
sum
stats
stock_location.id
value_count
stock_location.name
value_count
stock_location.reference
value_count
stock_location.reference_origin
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 return was approved (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the return was archived (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the return was cancelled (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the return was created (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the return was received (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the return was rejected (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the return was shipped (complete date plus hours, minutes and seconds — according to the standard).
The date and time at which the return was last updated (complete date plus hours, minutes and seconds — according to the standard).
The date and time of the return's latest status change, regardless of the return's status (complete date plus hours, minutes and seconds — according to the standard).