Authentication
Access to the resource requires provision of the correct and valid access token.
Structure
The DispatchPoint resource has the following attributes:
Attribute | Type | Description | Correct values |
---|---|---|---|
href | string | URI address to the resource | |
id | integer | Dispatch point ID | |
name | string | Dispatch point name | |
office_hours | string | Point working hours | |
phone | string | Point's phone number | |
email | string | Point's e-mail address | |
comments | string | Additional information | |
address | Object | Address | |
status | String | Status | created , activated , suspended
|
Sample DispatchPoint resource in the JSON format:
{ "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": "Długa", "building_number": "24", "city": "Krakow", "post_code": "30-624", "country_code": "PL" } }
Collecting information about the point
GET /v1/dispatch_points/:id
Sample request
GET /v1/dispatch_points/1 HTTP/1.1 Host: api-shipx-pl.easypack24.net Content-Type: application/json Authorization: Bearer lkfjasd9f70y43ohriw...[ommited for brevity]...
Response
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 the stated ID does not exist,
List of dispatch points
The list of dispatch points within the given organization can be collected at:
GET /v1/organizations/:organization_id/dispatch_points
Rights
Aby pobrać listę punktów odbioru dla określonej organizacji użytkownik musi być jej członkiem.
Sample request
GET /v1/organizations/12345/dispatch_points HTTP/1.1 Host: api-shipx-pl.easypack24.net Content-Type: application/json Authorization: Bearer lkfjasd9f70y43ohriw...[ommited for brevity]...
In reply to a correctly sent request, the server will return a response with HTTP 200 OK code:
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://api-shipx-pl.easypack24.net/v1/dispatch_points/3", "id": 123, ... other attribute omitted for brevity .... } ... other items omitted for brevity ... ] }
Errors that may occur when collecting the collection orders list:
• resource_not_found - the organization which the user wants to collect the collection orders list for does not exist,
• forbidden - the token does not authorize to collect the collection orders list for the selected organization.