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 accessAccess generation

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

PanelbgColor#f0f0f0titleBGColor#f0f0f0title

On this page

Table of Contents
minLevel2
 
When performing a request the following headers can be stated
Sandbox

Test environment


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

Address of the Parcel Manager test environment: https://sandbox-manager.paczkomaty.pl/ 

Generating accessAccess generation

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

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

Request headers

My Account > Data. To create a parcel shipment you need funds on your account, you can top up your account virtually in the Payments tab.


Query collection and environment profiles

Below we share a sample collection and environment profiles for the Postman application. To run, download the files and import them.

Query collection

View file
nameAPI ShipX 1.1.postman_collection.json

Production environment

View file
nameProduction environment.postman_environment.json

 

Sandbox environment

View file
nameSandbox environment.postman_environment.json

 

Request headers

The following headers can be specified when executing a request

Header

Description

Authorization 

Authentication

Authorization header

in which

, where all

data related to the authentication are to

authorization data should be sent.

The details are described in chapter Authentication

Details can be found in the Authorization chapter.

X-User-Agent 

This header allows you to specify the client/platform name and/or other information related

information

to

be determined

it.

X-User-Agent-Version 

This header allows you to

determine the version of

specify the client/platform

making

number of the request. Its content does not affect the functioning of the API.

X-Request-ID 

This header allows you to

determine

specify the name of the request

ID

. It is useful

in

for debugging

errors

bugs and problems that

can occur when integrating with the API

may occur during API integration. Its

provision

application does not

affect

impact the functioning of the API.

Accept-Language 

The

This header allows you to change the

error message format

editing of errors. Available values:

  • keys (some_error_message)

  • en_GB (Some error message)

  • pl_PL (

Some error message
  • Przykładowy komunikat o błędzie)


Response

headers

header

In

the

response, the server returns the following

headers

header:

Header

Description

X-Request-ID 

Request ID.

Useful when debugging problems with the API.
In the event that

It is useful for debugging bugs and problems that may occur during API integration.
If it is specified during

a

the request, the API will not generate its own

ID

IID, and

this

the one

stated in

provided during the request will be returned

in the response.

to the response.


Authorization

All requests which are sent to the server requires passing a valid access token, which belongs to the owner of the organization.

The access token should be provided in the header Authorization.

The organization ID should be passed in Path Parameters:

Code Block
languagejson
GET /v1/organizations/:id

Request Example:

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

Response

Code Block
languagejson
HTTP/1.1 200 OK 
Content-Type: application/json 
{
  "href": "https://api.shipx.pl.easypack24.net/v1/organizations/34",
  "id": 34,
  "owner_id": 1,
  "tax_id": "3973902075",
  "name": "Random org name39739020755741",
  "created_at": "2016-10-04T10:36:49.631+02:00",
  "updated_at": "2016-10-04T10:36:49.631+02:00",
  "services": [
    "inpost_locker_standard",
    "inpost_courier_standard"
  ],
  "address": {
    "id": 808,
    "line1": null,
    "line2": null,
    "street": "Ulica jakaś39739020755741",
    "building_number": "Budynek39739020755741",
    "city": "Szczecin39739020755741",
    "post_code": "22-100",
    "country_code": "PL"
  }
}

Collections

Collection attributes

Attribute

Type

Description

href 

String

Absolute URL address to the collection.

count

Integer

Total

A total number of items in the collection

elements

.

page

Integer

Current

The current collection results page.

per_page

Integer

Number

A number of results (per page) returned

in

to the response.

items

Array

Collection elements

Elements of the collection.

Collection example in

the

JSON

format

:

Code Block
languagejson
{
	"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

resource-specific documentation).

Scrolling

on

through the pages of the

subsequent

collection

pages

is done by

providing

passing query parameters

in the request

(page) and/or (page_page)

. Sample request

in the request. Request example:

Code Block
languagejson
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

Errors

Errors example

Code Block
languagejson
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

List of error keys that

can occur is provided below.

may occur:

Key

Description

resource_not_found

The resource

being sought has not been

you are looking for was not found.

access_forbidden

Access to the

particular

specified resource is

forbidden

denied.

invalid_parameter

An

incorrect value has been provided for the particular

invalid value was passed for a parameter in the URI. Details are available under the description key of the error response

description key

.

validation_failed

Validation error. The data sent in the

request body with

payload of the POST

method are

request is incorrect.

The error details included

Details of the error are in the response under the details key

See the validation error example below

.

offer_expired

The offer cannot be purchased,

as

because its validity

term

has expired.

Sample validation_failed error

Error example

Code Block
languagejson
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

The details object contains a collection in which the keys correspond to the names of

the

parameters sent in the payload of the request

body

, while the values

is a table

​​are an array with keys specifying

the

which validation errors

that have

occurred for

the particular

a given parameter.

Possible validation errors

are

:

Validation error

Description

required

The value for the

particular

specified parameter is required.

too_short

Too low

The number of characters is too small. Check the

details in the

resource documentation for

the particular resource

details.

too_long

Too high

The number of characters is too large. Check the

details in the

resource documentation for

the particular resource

details.

not_a_number

The entered value should be a number.

not_an_integer

The entered value should be an integer number.

invalid

The entered value is

incorrect

invalid. Check the

details in the

resource documentation for

the particular resource

details.