Skip to main content

Ordering

GET /orders?ordering=param1,-param2,... HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com

To retrieve the order queryset ordered.

GET https://api.aplazame.com/orders?ordering=param1,-param2,...

The ordering parameter is a tuple or list of strings. Each string is a field name with an optional - prefix, which indicates descending order. Fields without a leading - will be ordered ascending.

By order

Descending total amount, Ascending created

GET /orders?ordering=-total_amount,created HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
ParameterTypeDescription
total_amountdecimalTotal order amount
createdISO 8601Date designating when the order was created
verifiedISO 8601Date designating when the order was verified
confirmedISO 8601Datetime designating when the order was confirmed
cancelledISO 8601Date designating when the order was cancelled

By account

Ascending account last login, Descending account creation date

GET /orders?ordering=account-last_login,-account-created HTTP/1.1
Accept: application/vnd.aplazame.v1+json
Authorization: Bearer api_private_key
Host: api.aplazame.com
ParameterTypeDescription
account-last_loginISO 8601Date of the customer's last login
account-date_joinedISO 8601Date designating when the customer account was created
account-createdISO 8601Date designating when the customer account was created in Aplazame