Sorting criteria in format field:direction or field,direction (e.g. createdAt:desc, reference,asc). Multiple sort criteria are supported and are applied in the order they are sent. Both asc and desc directions are available for every sortable field. Invalid entries are ignored instead of rejecting the whole request. Without any criteria, the most recently created orders come first.
Sortable fields: id, reference, externalId, status, paymentStatus, paymentOption, createdAt, updatedAt, orderOrigin, incidentDeclared, channel, shippingType.
Sortable price fields: totalPriceWithTax, totalPriceWithoutTax, totalTaxAmount, totalProductWithTax, totalProductWithoutTax, totalProductTaxAmount, totalShippingFeesWithTax, totalShippingFeesWithoutTax, totalShippingTaxAmount.
Orders can also be sorted on the value of one of their custom fields, with the key cf.<identifier>, where the identifier is either the djust identifier of the custom field or its external one. A single custom field key is honoured per request, the following ones are ignored. Orders carrying no value for that custom field come last, in both directions. Values of a NUMBER or METRIC custom field are ordered as numbers, those of a DATE custom field written in ISO form chronologically, and all others as text, ignoring case and accents. The key is ignored when no custom field of the order carries the identifier, or when that custom field holds media.
Format: property:direction (recommended) or property,direction (kept for backward compatibility).