Searching and sorting Dispatch Orders

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

Parameter

Type

Description

Example

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

created_at

Date

Searches for dispatch orders created on the given day.

?created_at=2016-01-07

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

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

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

address

String

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

?address=Zaw

post_code

String

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

?post_code=30-442

country_code

String

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

?country_code=PL

city

String

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

?city=Kraków

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

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

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

status

String

Array

Searches for dispatch orders in the given state

  • new

  • sent

  • accepted

  • done

  • rejected

  • canceled

?status=new

?status=new,sent

Sorting results

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

sort_by value

Description

Example

sort_by value

Description

Example

id

Sorts by id

?sort_by=id

created_at

Sorts by creation date and time

?sort_by=created_at

address

Sorts by address

?sort_by=address

post_code

Sorts by post code

?sort_by=post_code

country_code

Sorts by country code

?sort_by=country_code

shipment_id

Sorts by first shipment id

?sort_by=shipment_id

tracking_number

Sorts by first shipment tracking number

?sort_by=tracking_number

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

sort_order value

Description

Example

asc

Sorts in ascending order

?sort_order=asc&sort_by=id

desc

Sorts in descending order

?sort_order=desc&sort_by=id