Ordering

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

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

To retrieve the order queryset ordered.

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
Parameter Type Description
total_amount decimal Total order amount
created ISO 8601 Date designating when the order was created
verified ISO 8601 Date designating when the order was verified
confirmed ISO 8601 Datetime designating when the order was confirmed
cancelled ISO 8601 Date 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
Parameter Type Description
account-last_login ISO 8601 Date of the customer's last login.
account-date_joined ISO 8601 Date designating when the customer account was created.
account-created ISO 8601 Date designating when the customer account was created in Aplazame