Commons

Datetime format

We use UTC datetime format in all requests and responses.

Paging support

We provide way how to page responses in case of a array of the items inside them. It is possible to obtain paged result by using pag[limit] and page[offset] parameters. We support paging for all resources - boxes, couriers and reservations.

Box parametrization

There are several parametrization options. Single box can be found by using filter[id] or filter[pid]. In case no filter[id] or filter[pid] is provided, information about whole page of the boxes is returned. Parameters provided in fields[box] specify information obtained in the response.

Parameter

Description

Parameter

Description

filter[id]

Returns just specific box with defined id.

fields[box]

Returns fields defined in query (see net table).

Reservation parametrization

Api supports several parametrization options. Single reservation can be found by using filter[id]. In case no filter[id] is provided, information about whole page of the reservation is returned. Parameters provided in fields[reservation] specify information obtained in the response.

Parameter

Description

Parameter

Description

filter[id]

Returns just specific reservation with defined id.

filter[status]

Returns just specific reservation with defined status (STOCKED, CANCELED, … see table below).

filter[blocked]

Returns blocked or unblocked reservation only (see table below).

filter[barcode]

Returns reservations with specific package parcode.

fields[reservation]

Returns fields defined in query (see net table).

Courier parametrization

Again, there are several parametrization options. Single reservation can be found by using filter[login]. In case no filter[login] is provided, information about whole page of the couriers is returned. Parameters provided in fields[courier] again specify information obtained in the response.

Parameter

Description

Parameter

Description

filter[login]

Returns just specific courier with defined login.

fields[courier]

Returns fields defined in query (see net table).

Response status codes

Code

Status

Description

Message

Code

Status

Description

Message

200

Success

Successful call with data in response

 

400

BadRequest

Request has some issues

Package sizes must be provided!

401

Unauthorized

Missing or invalid access token provided

 

403

Forbidden

Token is valid but user has insufficient rights

 

404

NotFound

Box has not been found

Box with Id:1000 not found!

Response message codes

Message Code

Status

Code

Description

Message example

Message Code

Status

Code

Description

Message example

BOX_IS_FULL

BadRequest

400

It is not possible to make a reservation into required box because box is full.

Box with id: 709 is full!

BOX_IS_NOT_BIG_ENOUGH

BadRequest

400

It is not possible to make a reservation into required box because box is not big enough.

Box with id: 4 is not big enough!

Optionaly defined fields in box

Field

Description

Field

Description

Name

Name

Available

Infomation abou availability

Address

Human readable description

GPS

GPS coordinance

Description

Human readable description

OpeningHours

Opening hours

Photos

URLs to photos

Slots

Information about slots

Occupancy

Current occupancy

DeliveryPin

Delivery PIN code

Statuses of a reservation

Status

Description

Status

Description

Canceled

Canceled reservation

Expired

Automatically canceled reservation after expiration

Reserved

Valid reservation not yet stocked

Incomplete

Partially stocked or package did not fit the box

Stocking

Currently being filled into a box

Stocked_Locked

Stocked, cannot be picked up by the customer (DEPRECATED use BLOCKED attribute instead)

Stocked

Stocked, ready to be picked up by the customer

Returning

Will be picked up with the next driver login

Returned

Picked up by the driver

Picked_Up

Picked up by the customer

Blocked attribute of a reservation

Values

Description

Values

Description

True

Reservation is blocked which means it is not possible to pick up packages from a box by a customer

False

Reservation is not blocked which means it is possible to pick up packages from a box by a customer

Optionaly defined fields in reservation

Field

Description

Field

Description

Blocked

Information about blocking

Optionaly defined fields in courier

Field

Description

Field

Description

Boxes

List of boxes

BoxesAccessType

Access type to the boxes