Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

To collect the list of dispatch points for a particular organization the user needs to be a member thereof.


The dispatch point is defined by the physical address where the shipment collection can be made from by the courier, which have been specified under the collection order.

 

 

On this page

 

Authentication

Access to the resource requires provision of the correct and valid access token.

Structure

The DispatchPoint resource has the following attributes:

AttributeType

Description

Correct values
hrefstring

URI address to the resource

 
idinteger

Dispatch point ID

 
namestring

Dispatch point name

 
office_hoursstring

Point working hours

 
phonestring

Point's phone number

 
emailstring

Point's e-mail address

 
commentsstring

Additional information

 
addressObject

Address

 
statusString

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.

 

  • No labels