[1.2.5] Dispatch points

 

 

Dispatch points define addresses from which shipments can be picked up by the courier. Which have been specified in the dispatch order.


Structure

Dispatch points resource has the following attributes:

Attribute

Type

Description

Valid values

Attribute

Type

Description

Valid values

id

Integer

Dispatch point identifier

 

name

String

Dispatch point name

 

office_hours

String

Dispatch point operating hours

 

phone

String

Dispatch point phone number

 

email

String

Dispatch point email address

 

comments

String

Additional informations

 

address

Object

Dispatch point address

 

status

String

Dispatch point status

created, activated, suspended

Dispatch Point example in JSON:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "href": "https://api-shipx-pl.easypack24.net/v1/dispatch_points/1", "id": 1, "name": "My dispatch point", "office_hours": "8-16", "phone": "777888999", "email": null, "comments": null, "status": "created", "address": { "id": 230, "street": "Long", "building_number": "24", "city": "Cracow", "post_code": "30-624", "country_code": "PL" } }

 

Authentication

Access to the resource requires a valid access token.


 

List of dispatch points

List of dispatch points within a specific organization.

To get a dispatch point list for a specific organization, the user must be a member of it.

1 GET /v1/organizations/:organization_id/dispatch_points

Request example

1 curl -X GET https://api-shipx-pl.easypack24.net/v1/organizations/1/dispatch_points -H 'Authorization: Bearer token' -H 'Content-Type: application/json'

Response

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 HTTP/1.1 200 OK Content-Type: application/json {     "href": "https://api-shipx-pl.easypack24.net/v1/organizations/1/dispatch_points",     "count": 15,     "per_page": 30,     "page": 1,     "items": [         { "href": "https://test.api.shipx.pl.easypack24.net/v1/dispatch_points/1", "id": 1, "name": "My dispatch point", "office_hours": "8-16", "phone": "777888999", "email": null, "comments": null, "status": "created", "address": { "id": 230, "street": "Długa", "building_number": "24", "city": "Krakow", "post_code": "30-624", "country_code": "PL" } }     ] }

 

Errors

Errors that may occur while getting the list of dispatch points:

  • resource_not_found - the organization for which the user wants to get the dispatch point list does not exist.

  • forbidden - the specific access token does not entitle you to get the dispatch point list for the selected organization.


 

Dispatch point details

1 GET /v1/dispatch_points/:id

Request example

1 curl -X GET https://api-shipx-pl.easypack24.net/v1/dispatch_points/1 -H 'Authorization: Bearer token' -H 'Content-Type: application/json'

Response

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 HTTP/1.1 200 OK Content-Type: application/json  { "href": "https://test.api.shipx.pl.easypack24.net/v1/dispatch_points/1", "id": 1, "name": "My dispatch point", "office_hours": "8-16", "phone": "777888999", "email": null, "comments": null, "status": "created", "address": { "id": 230, "street": "Długa", "building_number": "24", "city": "Krakow", "post_code": "30-624", "country_code": "PL" } }

 

Errors

  • resource_not_found - dispatch point with given ID does not exist.