[1.23.0] Searching and sorting Dispatch Orders



Warning!

Resource available only in the following countries: PL


List of Dispatch Orders

Search for dispatch orders is done by specifying one or more of the following criteria

Warning Debit clients!

We do not return prices for debit clients.

rate attribute takes the value null



GET /v1/organizations/:organization_id/dispatch_orders

Search criteria

 

Parameter

Type

Description

Example

Availability

Parameter

Type

Description

Example

Availability

id

Integer

Array

Searches for the dispatch order with the stated ID.

Searches for dispatch orders with the stated IDs.

?id=12

?id=12,17

PL

created_at

Date

Searches for dispatch orders created on the given day.

?created_at=2016-01-07

PL

created_at_gteq

Time

Searches for dispatch orders in which the time created is >= specified time.

The time can be provided in the ISO 8601 or similar format, and as a timestamp.

?created_at_gteq=2016-01-01T13:10+01:00

?created_at_gteq=1451650200

PL

created_at_lteq

Time

Searches for dispatch orders created earlier than at the specified time.

The time can be provided in the ISO 8601 or similar format, and as a timestamp.

?created_at_lteq=2016-01-01T13:10+01:00

?created_at_lteq=1451650200

PL

status

String

Array

Searches for dispatch orders in the specified status.

Searches for dispatch orders in one of the indicated statuses.

?status=sent

?status=new,sent

PL

address

String

Searches for dispatch orders for which the address (street) starts with the given string.

?address=Zaw

PL

post_code

String

Searches for dispatch orders for which the post-code starts with the given string.

?post_code=30-442

PL

country_code

String

Searches for dispatch orders for which the country code is the same as the specified string.

?country_code=PL

PL

city

String

Searches for dispatch orders for which the city is the same as the specified string.

?city=Kraków

PL

shipment_id

Integer

Array

Searches for dispatch orders that include shipment with the given id.

Searches for dispatch orders that include shipments with the given ids.

?shipment_id=1

?shipment_id=1,2

PL

tracking_number

String

Array

Searches for dispatch orders that include shipment with the given tracking number.

Searches for dispatch orders that include shipments with the given tracking numbers.

?tracking_number=630000328531876219900746

?tracking_number=630000328531876219900746,630000328531876219900747

PL

shipment_service

String

Array

Searches for dispatch orders that include shipments with at least one of the given services.

  • courier

  • locker

  • allegro

?shipment_service=locker

?shipment_service=locker,courier,allegro

PL

status

String

Array

Searches for dispatch orders in the given state

  • new

  • sent

  • accepted

  • done

  • rejected

  • canceled

?status=new

?status=new,sent

PL

Sorting results

Search result sorting can be facilitated using the sort_by attribute, which can take the following values:

sort_by value

Description

Example

Availability

sort_by value

Description

Example

Availability

id

Sorts by id

?sort_by=id

PL

created_at

Sorts by creation date and time

?sort_by=created_at

PL

address

Sorts by address

?sort_by=address

PL

post_code

Sorts by post code

?sort_by=post_code

PL

country_code

Sorts by country code

?sort_by=country_code

PL

shipment_id

Sorts by first shipment id

?sort_by=shipment_id

PL

tracking_number

Sorts by first shipment tracking number

?sort_by=tracking_number

PL

Sort ordering can be set using sort_order  attribute. By default, the results are sorted in descending order using the created_at field.

sort_order value

Description

Example

Availability

sort_order value

Description

Example

Availability

asc

Sorts in ascending order

?sort_order=asc&sort_by=id

PL

desc

Sorts in descending order

?sort_order=desc&sort_by=id

PL