Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Production environment

Address of the production environment https://api-shipx-pl.easypack24.net

Generating access

Download the guide explaining how to quickly create your own access to the ShipX API, API account configuration manual.



Panel
bgColor#f0f0f0
titleBGColor#f0f0f0
titleOn this page

Table of Contents
minLevel2
 


Sandbox environment

Sandbox environment address: https://sandbox-api-shipx-pl.easypack24.net
Address of the Parcel Manager test environment: https://sandbox-manager.paczkomaty.pl/ 

Generating access

https://sandbox-manager.paczkomaty.pl/ > my account tab > API. 

To generate the Token and Organisation ID, you need to complete all the details, including invoice details under my account > data.


Request headers

When performing a request the following headers can be stated

HeaderDescription
AuthorizationAuthentication header in which all data related to the authentication are to be sent. The details are described in chapter Authentication.
X-User-AgentThis header allows the client/platform name and/or other related information to be determined.
X-User-Agent-VersionThis header allows to determine the version of the client/platform making the request. Its content does not affect the functioning of the API.
X-Request-IDThis header allows to determine the request ID. It is useful in debugging errors and problems that can occur when integrating with the API. Its provision does not affect the functioning of the API.
Accept-Language

The header allows to change the error message format. Available:

  • keys (some_error_message)
  • en_GB (Some error message)
  • pl_PL (Some error message)


Response headers

In the response the server returns the following headers:

HeaderDescription
X-Request-ID

Request ID. Useful when debugging problems with the API.
In the event that it is specified during a request, the API will not generate its own ID, and this one stated in the request will be returned in the response.


Collections

Collection attributes

AttributeTypeDescription
hrefStringAbsolute URL address to the collection.
countIntegerTotal number of collection elements.
pageIntegerCurrent collection results page.
per_pageIntegerNumber of results (per page) returned in the response.
itemsArrayCollection elements.

Collection example in the JSON format:

Code Block
{
	"href": "https://api-pl-shipx.easypack24.net/v1/points",
	"count": 1024,
	"page": 10,
	"per_page": 100,
	"items": [
		{
			"href": "https://api-shipx-pl.easypack24.net/v1/points/KRA010",
			"id": "KRA010",
			... other resource's params ...
		}
	]
}


Paging

Collections support paging (unless stated otherwise in the documentation applicable to the resource).

Scrolling on the subsequent collection pages is by providing parameters in the request (page) and/or (page_page). Sample request:

Code Block
GET /v1/points?page=10 HTTP/1.1
Host: api-shipx-pl.easypack24.net
Content-Type: application/json

Test environment

Test environment address: https://sandbox-api-shipx-pl.easypack24.net

To receive an authorization token for api ShipX, use the form at the link: https://inpost.pl/formularz-wsparcie


Authorization

All requests sent to the server require provision of the right and valid access token which is property of the particular owner in the organization.

The access token should be provided in the Authorization header.


Sample request:

Code Block
GET /v1/users HTTP/1.1
Host: api-shipx-pl.easypack24.net
Content-Type: application/json
Authorization: Bearer W-TYM-MIEJSCU-NALEZY-UMIESCIC-TOKEN


Errors

Sample error

Code Block
HTTP/1.1 400 Bad Request
Content-Type: application/json
 
{
	"status": 400,
	"error": "invalid_parameter",
	"description": "Passed unsupported value (value of the parameter here) to parameter (parameter name)",
	"details": null
}

A list of error keys that can occur is provided below.

KeyDescription
resource_not_foundThe resource being sought has not been found.
access_forbiddenAccess to the particular resource is forbidden.
invalid_parameterAn incorrect value has been provided for the particular parameter in the URI. Details available under the error response description key.
validation_failedValidation error. The data sent in the request body with the POST method are incorrect. The error details included in the response under the details key See the validation error example below.
offer_expiredThe offer cannot be purchased, as its validity term has expired.


Sample validation_failed error

Code Block
HTTP/1.1 400 Bad Request
Content-Type: application/json
 
{
	"status": 400,
	"error": "validation_failed",
	"description": "Some of data sent in payload are invalid. Check details for more information.",
	"details": {
		"email": ["invalid"]
	}
}

In this case, Obit details contains a collection in which the keys correspond to the names of the parameters sent in the request body, while the values is a table with keys specifying the validation errors that have occurred for the particular parameter.

Possible validation errors are:

Validation errorDescription
requiredThe value for the particular parameter is required.
too_shortToo low number of characters. Check the details in the documentation for the particular resource.
too_longToo high number of characters. Check the details in the documentation for the particular resource.
not_a_numberThe entered value should be a number.
not_an_integerThe entered value should be an integer.
invalidThe entered value is incorrect. Check the details in the documentation for the particular resource.