app-delivery-api version v1
https://delivery-api.paysera.com/rest/v1
/default-package-sizes
Get enabled default package sizes
get /default-package-sizes
Get enabled default package sizes
Json Web Token
Query Parameters
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- items: required(array of object)
Items: Default package size
- code: required(string)
Unique default package size code
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- code: required(string)
Example:
{
"items": [
{
"code": "XS",
"weight": 200,
"width": 200,
"length": 200,
"height": 200
},
{
"code": "S",
"weight": 400,
"width": 400,
"length": 400,
"height": 400
}
],
"_metadata": {
"total": 2,
"limit": null,
"offset": 0
}
}
/methods
Get shipment methods
put /methods
Get shipment methods
Json Web Token
Body
Media type: application/json
Type: object
Properties- project_id: (string)
Delivery project hash
- from_country_code: (string)
Country code in ISO format (i. e. LT)
- to_country_code: (string)
Country code in ISO format (i. e. LT)
- shipments: (array of ShipmentCreate)
Items: Shipment
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- weight: required(integer)
Example:
{
"project_id": "project123",
"from_country_code": "LT",
"to_country_code": "UA",
"shipments": [
{
"widht": 10,
"length": 10,
"weight": 10,
"height": 10
}
]
}
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Shipment method
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
Example:
{
"list": [
{
"id": "method123",
"code": "courier2courier",
"description": "Hand 2 Hand",
"receiver_code": "courier",
"enabled": true
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
Get shipment method by id
get /methods/{id}
Get shipment method by id
Json Web Token
URI Parameters
- id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
Example:
{
"id": "method123",
"code": "courier2courier",
"description": "Hand 2 Hand",
"receiver_code": "courier",
"enabled": true
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
/gateways
Get shipment gateways
put /gateways
Get shipment gateways
Json Web Token
Body
Media type: application/json
Type: object
Properties- project_id: (string)
Delivery project hash
- from_country_code: (string)
Country code in ISO format (i. e. LT)
- to_country_code: (string)
Country code in ISO format (i. e. LT)
- shipments: (array of ShipmentCreate)
Items: Shipment
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- weight: required(integer)
- shipment_method_code: (string)
Example:
{
"project_id": "project123",
"from_country_code": "LT",
"to_country_code": "UA",
"shipments": [
{
"width": 10,
"length": 10,
"weight": 10,
"height": 10
}
]
}
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Shipment gateway
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
Example:
{
"list": [
{
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"logo": "http://delivery-api.dev.docker/img/gateway/dpd.png",
"enabled": true
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
Get shipment gateway by id
get /gateways/{id}
Get shipment gateway by id
Json Web Token
URI Parameters
- id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
Example:
{
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"logo": "http://delivery-api.dev.docker/img/gateway/dpd.png",
"enabled": true
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
/post-offices
Get post offices
get /post-offices
Get post offices
Json Web Token
Query Parameters
- city: (string)
- country: (string)
Country code in ISO format (i. e. LT)
- shipment_gateway_code: (string)
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Post Office
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
Example:
{
"list": [
{
"id": "post_office1234",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
/parcel-machines
Get parcel machines
get /parcel-machines
Get parcel machines
Json Web Token
Query Parameters
- city: (string)
- country: (string)
Country code in ISO format (i. e. LT)
- shipment_gateway_code: (string)
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Parcel machine
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
Example:
{
"list": [
{
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"coordinates": {
"latitude": 54.687157,
"longitude": 25.279652
},
"location_name": "Maxima",
"enabled": true
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
/shipment-points-import
Import shipment points from file
post /shipment-points-import
Import shipment points from file
Json Web Token
Body
Media type: application/json
Type: object
Properties- name: (string)
- content: required(string)
- mime_type: (string)
- size: (integer)
Example:
{
"name": "file.txt",
"content": "dGVzdA==",
"mime_type": "text/plain",
"size": 4
}
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Shipment point
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
Example:
{
"list": [
{
"id": "shipment_pont123",
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"default_contact": true,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
/shipment-points
Add a new shipment point
List shipment points
post /shipment-points
Add a new shipment point
Json Web Token
Body
Media type: application/json
Type: object
Properties- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office_id: (string)
- parcel_machine_id: (string)
- default_contact: required(boolean)
Is shipment point default for project
Example:
{
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"default_contact": true,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office_id": "post_office123",
"parcel_machine_id": "parcel_machine123"
}
HTTP status code 200
New shipment point data
Body
Media type: application/json
Type: object
Properties- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
Example:
{
"id": "shipment_point123",
"project_id": "project123",
"type": "sender",
"saved": true,
"default_contact": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcelMachine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
get /shipment-points
List shipment points
Json Web Token
Query Parameters
- type: (one of sender, receiver)
- title_part: (string)
Full name
- default_contact: (boolean)
Is default contact
- projects: (array of string)
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Shipment point
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
Example:
{
"list": [
{
"id": "shipment_pont123",
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"default_contact": true,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
Get shipment point by id
Update shipment-point
Delete shipment point
get /shipment-points/{id}
Get shipment point by id
Json Web Token
URI Parameters
- id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
Example:
{
"id": "shipment_point123",
"project_id": "project123",
"type": "sender",
"saved": true,
"default_contact": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcelMachine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
put /shipment-points/{id}
Update shipment-point
Json Web Token
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: object
Properties- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office_id: (string)
- parcel_machine_id: (string)
- default_contact: required(boolean)
Is shipment point default for project
Example:
{
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"default_contact": true,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office_id": "post_office123",
"parcel_machine_id": "parcel_machine123"
}
HTTP status code 200
Shipment point data
Body
Media type: application/json
Type: object
Properties- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
Example:
{
"id": "shipment_point123",
"project_id": "project123",
"type": "sender",
"saved": true,
"default_contact": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcelMachine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
delete /shipment-points/{id}
Delete shipment point
Json Web Token
URI Parameters
- id: required(string)
HTTP status code 204
Body
Media type: application/json
Type: any
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
/orders-import
Import orders from file
post /orders-import
Import orders from file
Json Web Token
Body
Media type: application/json
Type: object
Properties- name: (string)
- content: required(string)
- mime_type: (string)
- size: (integer)
Example:
{
"name": "file.txt",
"content": "dGVzdA==",
"mime_type": "text/plain",
"size": 4
}
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Order
- id: required(string)
Delivery order Id
- project_id: required(string)
Delivery project hash
- shipment_gateway: required(object)
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
- shipment_method: required(object)
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
- sender: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- receiver: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- shipments: required(object)
- list: required(array of Shipment)
Items: Shipment
- id: required(string)
Unique record id
- package_id: required(string)
shipments package id
- status: required(string)
shipment status
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- tracking_code: (string)
Shipment tracking code
- id: required(string)
- list: required(array of Shipment)
- manifest_exists: (boolean)
- label_exists: required(boolean)
- number: required(string)
order number from delivery api
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
- status: required(string)
order status
- status_description: required(string)
- price: required(object)
- amount: required(string)
- currency: required(string - minLength: 3 - maxLength: 3)
- created_at: required(integer)
- history: required(object)
- items: required(array of OrderHistory)
Items: Order history item
- date: required(integer)
- status: required(string)
- status_description: required(string)
- items: required(array of OrderHistory)
- confirmation_errors: (object)
- items: required(array of OrderConfirmationError)
Items: Order Confirmation Error
- description_token: required(string)
Token
- description_token: required(string)
- items: required(array of OrderConfirmationError)
- id: required(string)
Example:
{
"list": [
{
"id": "order123",
"project_id": "project123",
"shipment_gateway": {
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"enabled": true
},
"shipment_method": {
"id": "method123",
"code": "hand2hand",
"description": "Hand 2 Hand",
"enabled": true
},
"sender": {
"id": "sender123",
"project_id": "projeckt1234",
"type": "sender",
"saved": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"receiver": {
"id": "receiver123",
"project_id": "project123",
"type": "receiver",
"saved": true,
"additional_info": "additional info",
"contact": {
"party": {
"title": "Receiver Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"shipments": {
"list": [
{
"id": "shipment123",
"package_id": "package123",
"status": "new",
"weight": 200,
"width": 200,
"length": 200,
"height": 200,
"tracking_code": null
}
]
},
"manifest_exists": true,
"label_exists": true,
"number": "1",
"notes": "some notes here",
"eshop_order_id": "order123",
"status": "done",
"status_description": "Done",
"price": {
"amount": "5.55",
"currency": "EUR"
},
"created_at": "2021-01-01 00:00:00",
"history": {
"items": [
{
"date": "2021-01-01 00:00:00",
"status": "new",
"status_description": "New"
},
{
"date": "2021-01-01 00:00:00",
"status": "done",
"status_description": "Done"
}
]
},
"confirmation_errors": {
"items": [
{
"description_token": "test"
}
]
}
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
/projects
Get available projects
get /projects
Get available projects
Json Web Token
Query Parameters
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- list: required(array of Project)
Items: Project
- id: required(string)
Unique delivery project id
- name: required(string)
Localized project name
- external_project_id: (string)
External project id
- id: required(string)
Example:
{
"list": [
{
"id": "project123",
"name": "name1",
"external_project_id": "123"
},
{
"id": "project123",
"name": "name2",
"external_project_id": "456"
}
],
"_metadata": {
"total": 2,
"limit": null,
"offset": 0
}
}
Get current default package size
Update default package size
Remove default package size
get /projects/{projectId}/default-package-size
Get current default package size
Json Web Token
URI Parameters
- projectId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- default_package_size: (object)
Default package size
- code: required(string)
Unique default package size code
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- code: required(string)
Example:
{
"default_package_size": {
"code": "XS",
"weight": 200,
"width": 200,
"length": 200,
"height": 200
}
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
put /projects/{projectId}/default-package-size
Update default package size
Json Web Token
URI Parameters
- projectId: required(string)
Body
Media type: application/json
Type: object
Properties- code: required(string)
Unique default package size code
Example:
{
"code": "XS"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- code: required(string)
Unique default package size code
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
Example:
{
"default_package_size": {
"code": "XS",
"weight": 200,
"width": 200,
"length": 200,
"height": 200
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
delete /projects/{projectId}/default-package-size
Remove default package size
Json Web Token
Get available project gateways
Update project gateways
get /projects/{projectId}/gateways
Get available project gateways
Json Web Token
URI Parameters
- projectId: required(string)
Query Parameters
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Shipment gateway
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
Example:
{
"list": [
{
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"logo": "http://delivery-api.dev.docker/img/gateway/dpd.png",
"enabled": true
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
put /projects/{projectId}/gateways
Update project gateways
Json Web Token
URI Parameters
- projectId: required(string)
Annotations
- generator_method_name_override
"updateProjectGateways"
Body
Media type: application/json
Type: object
Properties- list: required(array of ShipmentGatewayUpdate)
Items: Shipment gateway
- id: required(string)
- enabled: required(boolean)
Example:
{
"list": [
{
"id": "gateway123",
"enabled": true
},
{
"id": "gateway456",
"enabled": false
}
]
}
HTTP status code 200
Gateways data
Body
Media type: application/json
Type: object
Properties- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
Example:
{
"list": [
{
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"logo": "http://delivery-api.dev.docker/img/gateway/dpd.png",
"enabled": true
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
Update project shipment gateway
put /projects/{projectId}/gateways/{gatewayId}
Update project shipment gateway
Json Web Token
URI Parameters
- projectId: required(string)
- gatewayId: required(string)
Body
Media type: application/json
Type: object
Properties- enabled: required(boolean)
Example:
{
"enabled": true
}
HTTP status code 200
Shipment gateway data
Body
Media type: application/json
Type: object
Properties- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
Example:
{
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"logo": "http://delivery-api.dev.docker/img/gateway/dpd.png",
"enabled": true
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
Get available project methods
Update project methods
get /projects/{projectId}/methods
Get available project methods
Json Web Token
URI Parameters
- projectId: required(string)
Query Parameters
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Shipment method
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
Example:
{
"list": [
{
"id": "method123",
"code": "courier2courier",
"description": "Hand 2 Hand",
"receiver_code": "courier",
"enabled": true
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
put /projects/{projectId}/methods
Update project methods
Json Web Token
URI Parameters
- projectId: required(string)
Annotations
- generator_method_name_override
"updateProjectMethods"
Body
Media type: application/json
Type: object
Properties- list: required(array of ShipmentMethodUpdate)
Items: Shipment method
- id: required(string)
- enabled: required(boolean)
Example:
{
"list": [
{
"id": "method123",
"enabled": true
},
{
"id": "method456",
"enabled": false
}
]
}
HTTP status code 200
Methods data
Body
Media type: application/json
Type: object
Properties- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
Example:
{
"list": [
{
"id": "method123",
"code": "courier2courier",
"description": "Hand 2 Hand",
"receiver_code": "courier",
"enabled": true
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
Update project shipment method
put /projects/{projectId}/methods/{methodId}
Update project shipment method
Json Web Token
URI Parameters
- projectId: required(string)
- methodId: required(string)
Body
Media type: application/json
Type: object
Properties- enabled: required(boolean)
Example:
{
"enabled": true
}
HTTP status code 200
Shipment method data
Body
Media type: application/json
Type: object
Properties- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
Example:
{
"id": "method123",
"code": "courier2courier",
"description": "Hand 2 Hand",
"receiver_code": "courier",
"enabled": true
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
/orders-export
Export orders to file
get /orders-export
Export orders to file
Json Web Token
Query Parameters
- projects: (array of string)
- order_statuses: (array of string)
- receiver_country_code: (string)
Country code in ISO format (i. e. LT)
- receiver_name_part: (string)
- receiver_phone_part: (string)
- receiver_street_part: (string)
- created_date_from: required(string)
- created_date_till: required(string)
- number: (string)
- tracking_code: (string)
- shipping_gateway_code: (string)
- with_manifest: (boolean)
- with_label: (boolean)
- eshop_order_id: (string)
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- name: (string)
- content: required(string)
- mime_type: (string)
- size: (integer)
Example:
{
"name": "file.txt",
"content": "dGVzdA==",
"mime_type": "text/plain",
"size": 4
}
/orders-confirm
Confirm orders
post /orders-confirm
Confirm orders
Json Web Token
Body
Media type: application/json
Type: object
Properties- order_ids: required(array of string)
Example:
{
"order_ids": [
"order123",
"order456",
"order789"
]
}
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Order
- id: required(string)
Delivery order Id
- project_id: required(string)
Delivery project hash
- shipment_gateway: required(object)
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
- shipment_method: required(object)
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
- sender: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- receiver: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- shipments: required(object)
- list: required(array of Shipment)
Items: Shipment
- id: required(string)
Unique record id
- package_id: required(string)
shipments package id
- status: required(string)
shipment status
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- tracking_code: (string)
Shipment tracking code
- id: required(string)
- list: required(array of Shipment)
- manifest_exists: (boolean)
- label_exists: required(boolean)
- number: required(string)
order number from delivery api
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
- status: required(string)
order status
- status_description: required(string)
- price: required(object)
- amount: required(string)
- currency: required(string - minLength: 3 - maxLength: 3)
- created_at: required(integer)
- history: required(object)
- items: required(array of OrderHistory)
Items: Order history item
- date: required(integer)
- status: required(string)
- status_description: required(string)
- items: required(array of OrderHistory)
- confirmation_errors: (object)
- items: required(array of OrderConfirmationError)
Items: Order Confirmation Error
- description_token: required(string)
Token
- description_token: required(string)
- items: required(array of OrderConfirmationError)
- id: required(string)
Example:
{
"list": [
{
"id": "order123",
"project_id": "project123",
"shipment_gateway": {
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"enabled": true
},
"shipment_method": {
"id": "method123",
"code": "hand2hand",
"description": "Hand 2 Hand",
"enabled": true
},
"sender": {
"id": "sender123",
"project_id": "projeckt1234",
"type": "sender",
"saved": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"receiver": {
"id": "receiver123",
"project_id": "project123",
"type": "receiver",
"saved": true,
"additional_info": "additional info",
"contact": {
"party": {
"title": "Receiver Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"shipments": {
"list": [
{
"id": "shipment123",
"package_id": "package123",
"status": "new",
"weight": 200,
"width": 200,
"length": 200,
"height": 200,
"tracking_code": null
}
]
},
"manifest_exists": true,
"label_exists": true,
"number": "1",
"notes": "some notes here",
"eshop_order_id": "order123",
"status": "done",
"status_description": "Done",
"price": {
"amount": "5.55",
"currency": "EUR"
},
"created_at": "2021-01-01 00:00:00",
"history": {
"items": [
{
"date": "2021-01-01 00:00:00",
"status": "new",
"status_description": "New"
},
{
"date": "2021-01-01 00:00:00",
"status": "done",
"status_description": "Done"
}
]
},
"confirmation_errors": {
"items": [
{
"description_token": "test"
}
]
}
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
/orders
Add a new order
List orders
post /orders
Add a new order
Json Web Token
Body
Media type: application/json
Type: object
Properties- project_id: required(string)
Delivery project hash
- shipment_gateway_code: required(string)
shipment company identification code
- shipment_method_code: required(string)
shipping method which was chosen for delivery
- shipments: (array of ShipmentCreate)
list of shipments for order
Items: Shipment
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- weight: required(integer)
- sender_id: (string)
Required if sender is not passed and no default contact for project is set
- sender: (object)
Required if sender_id is not passed
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office_id: (string)
- parcel_machine_id: (string)
- default_contact: required(boolean)
Is shipment point default for project
- project_id: required(string)
- receiver_id: (string)
Required if receiver is not passed
- receiver: (object)
Required if receiver_id is not passed
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office_id: (string)
- parcel_machine_id: (string)
- default_contact: required(boolean)
Is shipment point default for project
- project_id: required(string)
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
Example:
{
"project_id": "order123",
"shipment_gateway_code": "dpd",
"shipment_method_code": "hand2hand",
"shipments": [
{
"weight": 200,
"width": 200,
"length": 200,
"height": 200
}
],
"sender_id": "sender123",
"sender": {
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"default_contact": true,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office_id": "post_office123",
"parcel_machine_id": "parcel_machine123"
},
"receiver_id": "receiver123",
"receiver": {
"project_id": "project1234",
"type": "receiver",
"saved": true,
"additional_info": null,
"default_contact": true,
"contact": {
"party": {
"title": "name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office_id": "post_office123",
"parcel_machine_id": "parcel_machine123"
},
"notes": "Some note for delivery person"
}
HTTP status code 200
New order data
Body
Media type: application/json
Type: object
Properties- id: required(string)
Delivery order Id
- project_id: required(string)
Delivery project hash
- shipment_gateway: required(object)
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
- shipment_method: required(object)
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
- sender: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- receiver: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- shipments: required(object)
- list: required(array of Shipment)
Items: Shipment
- id: required(string)
Unique record id
- package_id: required(string)
shipments package id
- status: required(string)
shipment status
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- tracking_code: (string)
Shipment tracking code
- id: required(string)
- list: required(array of Shipment)
- manifest_exists: (boolean)
- label_exists: required(boolean)
- number: required(string)
order number from delivery api
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
- status: required(string)
order status
- status_description: required(string)
- price: required(object)
- amount: required(string)
- currency: required(string - minLength: 3 - maxLength: 3)
- created_at: required(integer)
- history: required(object)
- items: required(array of OrderHistory)
Items: Order history item
- date: required(integer)
- status: required(string)
- status_description: required(string)
- items: required(array of OrderHistory)
- confirmation_errors: (object)
- items: required(array of OrderConfirmationError)
Items: Order Confirmation Error
- description_token: required(string)
Token
- description_token: required(string)
- items: required(array of OrderConfirmationError)
Example:
{
"id": "order123",
"project_id": "project123",
"shipment_gateway": {
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"enabled": true
},
"shipment_method": {
"id": "method123",
"code": "hand2hand",
"description": "Hand 2 Hand",
"enabled": true
},
"sender": {
"id": "sender123",
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"receiver": {
"id": "receiver123",
"project_id": "project123",
"type": "receiver",
"saved": true,
"additional_info": "additional info",
"contact": {
"party": {
"title": "Receiver Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"shipments": {
"list": [
{
"id": "shipment123",
"package_id": "package123",
"status": "new",
"weight": 200,
"width": 200,
"length": 200,
"height": 200,
"tracking_code": null
}
]
},
"manifest_exists": true,
"label_exists": true,
"number": "12",
"notes": "some notes here",
"eshop_order_id": "order123",
"status": "done",
"status_description": "Done",
"price": {
"amount": "5.55",
"currency": "EUR"
},
"created_at": "2021-01-01 00:00:00",
"history": {
"items": [
{
"date": "2021-01-01 00:00:00",
"status": "new",
"status_description": "New"
},
{
"date": "2021-01-01 00:00:00",
"status": "done",
"status_description": "Done"
}
]
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
get /orders
List orders
Json Web Token
Query Parameters
- projects: (array of string)
- order_statuses: (array of string)
- receiver_country_code: (string)
Country code in ISO format (i. e. LT)
- receiver_name_part: (string)
- receiver_phone_part: (string)
- receiver_street_part: (string)
- created_date_from: required(string)
- created_date_till: required(string)
- number: (string)
- tracking_code: (string)
- shipping_gateway_code: (string)
- with_manifest: (boolean)
- with_label: (boolean)
- eshop_order_id: (string)
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Order
- id: required(string)
Delivery order Id
- project_id: required(string)
Delivery project hash
- shipment_gateway: required(object)
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
- shipment_method: required(object)
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
- sender: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- receiver: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- shipments: required(object)
- list: required(array of Shipment)
Items: Shipment
- id: required(string)
Unique record id
- package_id: required(string)
shipments package id
- status: required(string)
shipment status
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- tracking_code: (string)
Shipment tracking code
- id: required(string)
- list: required(array of Shipment)
- manifest_exists: (boolean)
- label_exists: required(boolean)
- number: required(string)
order number from delivery api
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
- status: required(string)
order status
- status_description: required(string)
- price: required(object)
- amount: required(string)
- currency: required(string - minLength: 3 - maxLength: 3)
- created_at: required(integer)
- history: required(object)
- items: required(array of OrderHistory)
Items: Order history item
- date: required(integer)
- status: required(string)
- status_description: required(string)
- items: required(array of OrderHistory)
- confirmation_errors: (object)
- items: required(array of OrderConfirmationError)
Items: Order Confirmation Error
- description_token: required(string)
Token
- description_token: required(string)
- items: required(array of OrderConfirmationError)
- id: required(string)
Example:
{
"list": [
{
"id": "order123",
"project_id": "project123",
"shipment_gateway": {
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"enabled": true
},
"shipment_method": {
"id": "method123",
"code": "hand2hand",
"description": "Hand 2 Hand",
"enabled": true
},
"sender": {
"id": "sender123",
"project_id": "projeckt1234",
"type": "sender",
"saved": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"receiver": {
"id": "receiver123",
"project_id": "project123",
"type": "receiver",
"saved": true,
"additional_info": "additional info",
"contact": {
"party": {
"title": "Receiver Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"shipments": {
"list": [
{
"id": "shipment123",
"package_id": "package123",
"status": "new",
"weight": 200,
"width": 200,
"length": 200,
"height": 200,
"tracking_code": null
}
]
},
"manifest_exists": true,
"label_exists": true,
"number": "1",
"notes": "some notes here",
"eshop_order_id": "order123",
"status": "done",
"status_description": "Done",
"price": {
"amount": "5.55",
"currency": "EUR"
},
"created_at": "2021-01-01 00:00:00",
"history": {
"items": [
{
"date": "2021-01-01 00:00:00",
"status": "new",
"status_description": "New"
},
{
"date": "2021-01-01 00:00:00",
"status": "done",
"status_description": "Done"
}
]
},
"confirmation_errors": {
"items": [
{
"description_token": "test"
}
]
}
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
Get order by id
Update order
Delete order
get /orders/{id}
Get order by id
Json Web Token
URI Parameters
- id: required(string)
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- id: required(string)
Delivery order Id
- project_id: required(string)
Delivery project hash
- shipment_gateway: required(object)
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
- shipment_method: required(object)
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
- sender: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- receiver: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- shipments: required(object)
- list: required(array of Shipment)
Items: Shipment
- id: required(string)
Unique record id
- package_id: required(string)
shipments package id
- status: required(string)
shipment status
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- tracking_code: (string)
Shipment tracking code
- id: required(string)
- list: required(array of Shipment)
- manifest_exists: (boolean)
- label_exists: required(boolean)
- number: required(string)
order number from delivery api
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
- status: required(string)
order status
- status_description: required(string)
- price: required(object)
- amount: required(string)
- currency: required(string - minLength: 3 - maxLength: 3)
- created_at: required(integer)
- history: required(object)
- items: required(array of OrderHistory)
Items: Order history item
- date: required(integer)
- status: required(string)
- status_description: required(string)
- items: required(array of OrderHistory)
- confirmation_errors: (object)
- items: required(array of OrderConfirmationError)
Items: Order Confirmation Error
- description_token: required(string)
Token
- description_token: required(string)
- items: required(array of OrderConfirmationError)
Example:
{
"id": "order123",
"project_id": "project123",
"shipment_gateway": {
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"enabled": true
},
"shipment_method": {
"id": "method123",
"code": "hand2hand",
"description": "Hand 2 Hand",
"enabled": true
},
"sender": {
"id": "sender123",
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"receiver": {
"id": "receiver123",
"project_id": "project123",
"type": "receiver",
"saved": true,
"additional_info": "additional info",
"contact": {
"party": {
"title": "Receiver Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"shipments": {
"list": [
{
"id": "shipment123",
"package_id": "package123",
"status": "new",
"weight": 200,
"width": 200,
"length": 200,
"height": 200,
"tracking_code": null
}
]
},
"manifest_exists": true,
"label_exists": true,
"number": "12",
"notes": "some notes here",
"eshop_order_id": "order123",
"status": "done",
"status_description": "Done",
"price": {
"amount": "5.55",
"currency": "EUR"
},
"created_at": "2021-01-01 00:00:00",
"history": {
"items": [
{
"date": "2021-01-01 00:00:00",
"status": "new",
"status_description": "New"
},
{
"date": "2021-01-01 00:00:00",
"status": "done",
"status_description": "Done"
}
]
}
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
put /orders/{id}
Update order
Json Web Token
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: object
Properties- project_id: required(string)
Delivery project hash
- shipment_gateway_code: required(string)
shipment company identification code
- shipment_method_code: required(string)
shipping method which was chosen for delivery
- shipments: (array of ShipmentCreate)
list of shipments for order
Items: Shipment
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- weight: required(integer)
- sender_id: (string)
Required if sender is not passed and no default contact for project is set
- sender: (object)
Required if sender_id is not passed
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office_id: (string)
- parcel_machine_id: (string)
- default_contact: required(boolean)
Is shipment point default for project
- project_id: required(string)
- receiver_id: (string)
Required if receiver is not passed
- receiver: (object)
Required if receiver_id is not passed
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office_id: (string)
- parcel_machine_id: (string)
- default_contact: required(boolean)
Is shipment point default for project
- project_id: required(string)
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
Example:
{
"project_id": "order123",
"shipment_gateway_code": "dpd",
"shipment_method_code": "hand2hand",
"shipments": [
{
"weight": 200,
"width": 200,
"length": 200,
"height": 200
}
],
"sender_id": "sender123",
"sender": {
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"default_contact": true,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office_id": "post_office123",
"parcel_machine_id": "parcel_machine123"
},
"receiver_id": "receiver123",
"receiver": {
"project_id": "project1234",
"type": "receiver",
"saved": true,
"additional_info": null,
"default_contact": true,
"contact": {
"party": {
"title": "name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office_id": "post_office123",
"parcel_machine_id": "parcel_machine123"
},
"notes": "Some note for delivery person"
}
HTTP status code 200
Order data
Body
Media type: application/json
Type: object
Properties- id: required(string)
Delivery order Id
- project_id: required(string)
Delivery project hash
- shipment_gateway: required(object)
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
- shipment_method: required(object)
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
- sender: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- receiver: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- shipments: required(object)
- list: required(array of Shipment)
Items: Shipment
- id: required(string)
Unique record id
- package_id: required(string)
shipments package id
- status: required(string)
shipment status
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- tracking_code: (string)
Shipment tracking code
- id: required(string)
- list: required(array of Shipment)
- manifest_exists: (boolean)
- label_exists: required(boolean)
- number: required(string)
order number from delivery api
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
- status: required(string)
order status
- status_description: required(string)
- price: required(object)
- amount: required(string)
- currency: required(string - minLength: 3 - maxLength: 3)
- created_at: required(integer)
- history: required(object)
- items: required(array of OrderHistory)
Items: Order history item
- date: required(integer)
- status: required(string)
- status_description: required(string)
- items: required(array of OrderHistory)
- confirmation_errors: (object)
- items: required(array of OrderConfirmationError)
Items: Order Confirmation Error
- description_token: required(string)
Token
- description_token: required(string)
- items: required(array of OrderConfirmationError)
Example:
{
"id": "order123",
"project_id": "project123",
"shipment_gateway": {
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"enabled": true
},
"shipment_method": {
"id": "method123",
"code": "hand2hand",
"description": "Hand 2 Hand",
"enabled": true
},
"sender": {
"id": "sender123",
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"receiver": {
"id": "receiver123",
"project_id": "project123",
"type": "receiver",
"saved": true,
"additional_info": "additional info",
"contact": {
"party": {
"title": "Receiver Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"shipments": {
"list": [
{
"id": "shipment123",
"package_id": "package123",
"status": "new",
"weight": 200,
"width": 200,
"length": 200,
"height": 200,
"tracking_code": null
}
]
},
"manifest_exists": true,
"label_exists": true,
"number": "12",
"notes": "some notes here",
"eshop_order_id": "order123",
"status": "done",
"status_description": "Done",
"price": {
"amount": "5.55",
"currency": "EUR"
},
"created_at": "2021-01-01 00:00:00",
"history": {
"items": [
{
"date": "2021-01-01 00:00:00",
"status": "new",
"status_description": "New"
},
{
"date": "2021-01-01 00:00:00",
"status": "done",
"status_description": "Done"
}
]
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
delete /orders/{id}
Delete order
Json Web Token
URI Parameters
- id: required(string)
HTTP status code 204
Body
Media type: application/json
Type: any
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
Generate manifest and call courier for "label_generated" order
Get manifest file
post /orders/{id}/manifest
Generate manifest and call courier for "label_generated" order
Json Web Token
URI Parameters
- id: required(string)
HTTP status code 200
New order data
Body
Media type: application/json
Type: object
Properties- id: required(string)
Delivery order Id
- project_id: required(string)
Delivery project hash
- shipment_gateway: required(object)
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
- shipment_method: required(object)
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
- sender: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- receiver: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- shipments: required(object)
- list: required(array of Shipment)
Items: Shipment
- id: required(string)
Unique record id
- package_id: required(string)
shipments package id
- status: required(string)
shipment status
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- tracking_code: (string)
Shipment tracking code
- id: required(string)
- list: required(array of Shipment)
- manifest_exists: (boolean)
- label_exists: required(boolean)
- number: required(string)
order number from delivery api
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
- status: required(string)
order status
- status_description: required(string)
- price: required(object)
- amount: required(string)
- currency: required(string - minLength: 3 - maxLength: 3)
- created_at: required(integer)
- history: required(object)
- items: required(array of OrderHistory)
Items: Order history item
- date: required(integer)
- status: required(string)
- status_description: required(string)
- items: required(array of OrderHistory)
- confirmation_errors: (object)
- items: required(array of OrderConfirmationError)
Items: Order Confirmation Error
- description_token: required(string)
Token
- description_token: required(string)
- items: required(array of OrderConfirmationError)
Example:
{
"id": "order123",
"project_id": "project123",
"shipment_gateway": {
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"enabled": true
},
"shipment_method": {
"id": "method123",
"code": "hand2hand",
"description": "Hand 2 Hand",
"enabled": true
},
"sender": {
"id": "sender123",
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"receiver": {
"id": "receiver123",
"project_id": "project123",
"type": "receiver",
"saved": true,
"additional_info": "additional info",
"contact": {
"party": {
"title": "Receiver Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"shipments": {
"list": [
{
"id": "shipment123",
"package_id": "package123",
"status": "new",
"weight": 200,
"width": 200,
"length": 200,
"height": 200,
"tracking_code": null
}
]
},
"manifest_exists": true,
"label_exists": true,
"number": "12",
"notes": "some notes here",
"eshop_order_id": "order123",
"status": "done",
"status_description": "Done",
"price": {
"amount": "5.55",
"currency": "EUR"
},
"created_at": "2021-01-01 00:00:00",
"history": {
"items": [
{
"date": "2021-01-01 00:00:00",
"status": "new",
"status_description": "New"
},
{
"date": "2021-01-01 00:00:00",
"status": "done",
"status_description": "Done"
}
]
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
get /orders/{id}/manifest
Get manifest file
Json Web Token
URI Parameters
- id: required(string)
HTTP status code 200
Manifest file
Body
Media type: application/json
Type: object
Properties- name: (string)
- content: required(string)
- mime_type: (string)
- size: (integer)
Example:
{
"name": "file.txt",
"content": "dGVzdA==",
"mime_type": "text/plain",
"size": 4
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
Generate labels for "in progress" order
Get label file
post /orders/{id}/label
Generate labels for "in progress" order
Json Web Token
URI Parameters
- id: required(string)
HTTP status code 200
New order data
Body
Media type: application/json
Type: object
Properties- id: required(string)
Delivery order Id
- project_id: required(string)
Delivery project hash
- shipment_gateway: required(object)
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
- shipment_method: required(object)
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
- sender: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- receiver: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- shipments: required(object)
- list: required(array of Shipment)
Items: Shipment
- id: required(string)
Unique record id
- package_id: required(string)
shipments package id
- status: required(string)
shipment status
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- tracking_code: (string)
Shipment tracking code
- id: required(string)
- list: required(array of Shipment)
- manifest_exists: (boolean)
- label_exists: required(boolean)
- number: required(string)
order number from delivery api
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
- status: required(string)
order status
- status_description: required(string)
- price: required(object)
- amount: required(string)
- currency: required(string - minLength: 3 - maxLength: 3)
- created_at: required(integer)
- history: required(object)
- items: required(array of OrderHistory)
Items: Order history item
- date: required(integer)
- status: required(string)
- status_description: required(string)
- items: required(array of OrderHistory)
- confirmation_errors: (object)
- items: required(array of OrderConfirmationError)
Items: Order Confirmation Error
- description_token: required(string)
Token
- description_token: required(string)
- items: required(array of OrderConfirmationError)
Example:
{
"id": "order123",
"project_id": "project123",
"shipment_gateway": {
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"enabled": true
},
"shipment_method": {
"id": "method123",
"code": "hand2hand",
"description": "Hand 2 Hand",
"enabled": true
},
"sender": {
"id": "sender123",
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"receiver": {
"id": "receiver123",
"project_id": "project123",
"type": "receiver",
"saved": true,
"additional_info": "additional info",
"contact": {
"party": {
"title": "Receiver Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"shipments": {
"list": [
{
"id": "shipment123",
"package_id": "package123",
"status": "new",
"weight": 200,
"width": 200,
"length": 200,
"height": 200,
"tracking_code": null
}
]
},
"manifest_exists": true,
"label_exists": true,
"number": "12",
"notes": "some notes here",
"eshop_order_id": "order123",
"status": "done",
"status_description": "Done",
"price": {
"amount": "5.55",
"currency": "EUR"
},
"created_at": "2021-01-01 00:00:00",
"history": {
"items": [
{
"date": "2021-01-01 00:00:00",
"status": "new",
"status_description": "New"
},
{
"date": "2021-01-01 00:00:00",
"status": "done",
"status_description": "Done"
}
]
}
}
HTTP status code 400
Input failed
Body
Media type: application/json
Type: Error
Example:
{
"error": "invalid_parameters",
"error_description": "Invalid parameter: x"
}
HTTP status code 409
Invalid state
Body
Media type: application/json
Type: ApiError
Example:
{
"error": "invalid_state",
"error_description": "Requested action cannot be made to the current state of resource"
}
get /orders/{id}/label
Get label file
Json Web Token
URI Parameters
- id: required(string)
HTTP status code 200
Label file
Body
Media type: application/json
Type: object
Properties- name: (string)
- content: required(string)
- mime_type: (string)
- size: (integer)
Example:
{
"name": "file.txt",
"content": "dGVzdA==",
"mime_type": "text/plain",
"size": 4
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
/order-prices
List order prices
put /order-prices
List order prices
Json Web Token
Body
Media type: application/json
Type: object
Properties- project_id: required(string)
Delivery project hash
- sender_id: (string)
Required if sender is not passed and no default contact for project is set
- sender: (object)
Required if sender_id is not passed
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office_id: (string)
- parcel_machine_id: (string)
- default_contact: required(boolean)
Is shipment point default for project
- project_id: required(string)
- receiver_id: (string)
Required if receiver is not passed
- receiver: (object)
Required if receiver_id is not passed
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office_id: (string)
- parcel_machine_id: (string)
- default_contact: required(boolean)
Is shipment point default for project
- project_id: required(string)
- shipments: (array of ShipmentCreate)
Items: Shipment
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- weight: required(integer)
Example:
{
"project_id": "project123",
"sender_id": "sender123",
"sender": {
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"default_contact": true,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office_id": "post_office123",
"parcel_machine_id": "parcel_machine123"
},
"receiver_id": "receiver123",
"receiver": {
"project_id": "project123",
"type": "receiver",
"saved": true,
"additional_info": null,
"default_contact": true,
"contact": {
"party": {
"title": "name",
"company_code": "342344",
"email": "mail@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office_id": "post_office123",
"parcel_machine_id": "parcel_machine123"
},
"shipments": [
{
"width": 10,
"length": 10,
"weight": 10,
"height": 10
}
]
}
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- list: required(array of object)
Items: Order price item
- shipment_gateway: required(object)
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
- shipment_method: required(object)
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
- price: required(object)
- amount: required(string)
- currency: required(string - minLength: 3 - maxLength: 3)
- shipment_gateway: required(object)
Example:
{
"list": [
{
"shipment_gateway": {
"id": "gateway123",
"code": "dpd",
"description": "DPD gateway",
"enabled": true
},
"shipment_method": {
"id": "method123",
"code": "hand2hand",
"description": "Hand 2 Hand",
"enabled": true
},
"price": {
"amount": "5.000000",
"currency": "EUR"
}
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
/statistics
Get activity statistics data
get /statistics
Get activity statistics data
Json Web Token
Query Parameters
- projects: (array of string)
- date_from: required(string)
- date_till: required(string)
HTTP status code 200
Activity items
Body
Media type: application/json
Type: Paysera.Result
Properties- items: required(array of object)
Items: Activity statistics item
- day: required(string)
activity record date (format: YYYY-mm-dd)
- delivered: required(integer)
delivered shipments count
- on_road: required(integer)
on road shipments count
- total: required(integer)
total shipments count
- day: required(string)
Example:
{
"items": [
{
"day": "2020-01-01",
"delivered": 200,
"on_road": 200,
"total": 200
},
{
"day": "2020-02-01",
"delivered": 200,
"on_road": 200,
"total": 200
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
Get activity statistics file
get /statistics/export
Get activity statistics file
Json Web Token
Query Parameters
- projects: (array of string)
- date_from: required(string)
- date_till: required(string)
HTTP status code 200
Activity items
Body
Media type: application/json
Type: object
Properties- name: (string)
- content: required(string)
- mime_type: (string)
- size: (integer)
Example:
{
"name": "file.txt",
"content": "dGVzdA==",
"mime_type": "text/plain",
"size": 4
}
Get last activity
get /statistics/last-activity
Get last activity
Json Web Token
Query Parameters
- projects: (array of string)
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Activity items
Body
Media type: application/json
Type: Paysera.Result
Properties- items: required(array of object)
Items: Last activity item
- date: required(integer)
- status: required(string)
- status_description: required(string)
- order: required(object)
- id: required(string)
Delivery order Id
- project_id: required(string)
Delivery project hash
- shipment_gateway: required(object)
- id: required(string)
Unique record id
- code: required(string)
Unique identification code
- description: required(string)
Gateway's description
- logo: required(string)
Gateway's logo image URL
- enabled: required(boolean)
- id: required(string)
- shipment_method: required(object)
- id: required(string)
Unique record id
- code: required(one of courier2courier, courier2parcel-machine, courier2post-office, parcel-machine2courier, parcel-machine2parcel-machine, post-office2courier, post-office2post-office)
Unique identification code
- description: required(string)
Method's description
- receiver_code: required(one of courier, parcel-machine, post-office)
Receiver identification code
- enabled: required(boolean)
- id: required(string)
- sender: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- receiver: (object)
- id: required(string)
Unique shipment point id
- project_id: required(string)
Delivery project hash
- type: required(one of sender, receiver)
- saved: required(boolean)
Is contract saved for usage later
- contact: (object)
ShipmentPoint's contact
- party: required(object)
Contact party
- title: required(string)
Full name
- company_code: (string)
Company code, if any
- email: (string)
Email, if any
- phone: (string)
Phone, if any
- title: required(string)
- address: required(object)
Contact address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- party: required(object)
- post_office: (object)
- id: required(string)
Post Office Id
- shipment_gateway_code: required(string)
Shipment gateway identification code
- name: required(string)
- address: required(object)
post office address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- id: required(string)
- parcel_machine: (object)
- id: required(string)
Parcel Machine Id
- shipment_gateway_code: required(string)
shipment company identification code
- code: required(string)
parcel machine identification code
- address: required(object)
parcel machine address
- country: required(string)
Country code in ISO format (i. e. LT)
- state: (string)
State, if any
- municipality: (string)
Municipality, if any
- city: (string)
City name
- street: (string)
Street name, if any
- house_number: (string)
House number, if any
- apartment_number: (string)
Apartment number, if any
- postal_code: (string)
Postal code, if any
- country: required(string)
- coordinates: (object)
Location map coordinates
- longitude: (number)
Longitude coordinate
- latitude: (number)
Latitude coordinate
- longitude: (number)
- location_name: (string)
Location name
- enabled: required(boolean)
- id: required(string)
- additional_info: (string)
Additional shipment info
- default_contact: required(boolean)
Is shipment point default for project
- id: required(string)
- shipments: required(object)
- list: required(array of Shipment)
Items: Shipment
- id: required(string)
Unique record id
- package_id: required(string)
shipments package id
- status: required(string)
shipment status
- weight: required(integer)
Parcel weight in g
- width: required(integer)
Parcel width in mm
- length: required(integer)
Parcel length in mm
- height: required(integer)
Parcel height in mm
- tracking_code: (string)
Shipment tracking code
- id: required(string)
- list: required(array of Shipment)
- manifest_exists: (boolean)
- label_exists: required(boolean)
- number: required(string)
order number from delivery api
- notes: (string)
- eshop_order_id: (string)
id of the order, which is assigned by the eshop
- status: required(string)
order status
- status_description: required(string)
- price: required(object)
- amount: required(string)
- currency: required(string - minLength: 3 - maxLength: 3)
- created_at: required(integer)
- history: required(object)
- items: required(array of OrderHistory)
Items: Order history item
- date: required(integer)
- status: required(string)
- status_description: required(string)
- items: required(array of OrderHistory)
- confirmation_errors: (object)
- items: required(array of OrderConfirmationError)
Items: Order Confirmation Error
- description_token: required(string)
Token
- description_token: required(string)
- items: required(array of OrderConfirmationError)
- id: required(string)
Example:
{
"items": [
{
"date": "2021-01-01 00:00:00",
"status": "done",
"status_description": "Done",
"order": {
"id": "order123",
"project_id": "project123",
"shipment_gateway": {
"id": "gateway1234",
"code": "dpd",
"description": "DPD gateway",
"enabled": true
},
"shipment_method": {
"id": "method123",
"code": "hand2hand",
"description": "Hand 2 Hand",
"enabled": true
},
"sender": {
"id": "sender123",
"project_id": "project123",
"type": "sender",
"saved": true,
"additional_info": null,
"contact": {
"party": {
"title": "Sender Name",
"company_code": "342344",
"email": "test@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"receiver": {
"id": "receiver123",
"project_id": "project123",
"type": "receiver",
"saved": true,
"additional_info": "additional info",
"contact": {
"party": {
"title": "Receiver Name",
"company_code": "342344",
"email": "test@mail.com",
"phone": "+37061700000"
},
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"post_office": {
"id": "post_office123",
"shipment_gateway_code": "dpd",
"name": "Post Office Name",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
}
},
"parcel_machine": {
"id": "parcel_machine123",
"shipment_gateway_code": "dpd",
"code": "parcel123",
"address": {
"country": "LT",
"state": "Vilnius",
"municipality": "Vilnius",
"city": "Vilnius",
"street": "Pilaites",
"house_number": "10",
"apartment_number": "10",
"postal_code": "11111"
},
"enabled": true
}
},
"shipments": {
"list": [
{
"id": "shipment123",
"status": "new",
"weight": 200,
"width": 200,
"length": 200,
"height": 200
}
]
},
"manifest_exists": true,
"label_exists": true,
"number": "1",
"notes": "some notes here",
"status": "done",
"status_description": "Done",
"created_at": "2021-01-01 00:00:00",
"history": {
"items": [
{
"date": "2021-01-01 00:00:00",
"status": "new",
"status_description": "New"
},
{
"date": "2021-01-01 00:00:00",
"status": "done",
"status_description": "Done"
}
]
}
}
}
],
"_metadata": {
"offset": 0,
"limit": 50,
"total": 1,
"order_direction": "desc",
"order_by": "some_field",
"cursors": {
"after": "1521011322-188547827",
"before": "1521184305-189427706"
},
"has_next": false,
"has_previous": false
}
}
/countries
Get countries list
get /countries
Get countries list
Json Web Token
HTTP status code 200
Countries
Body
Media type: application/json
Type: Paysera.Result
Properties- items: required(array of object)
Items: Country
- country_code: required(string)
Country code in ISO format (i. e. LT)
- country_code: required(string)
Example:
{
"items": [
{
"country_code": "LT"
},
{
"country_code": "UA"
}
],
"_metadata": {
"total": 2,
"limit": null,
"offset": 0
}
}
/cities
List cities
get /cities
List cities
Json Web Token
Query Parameters
- country: (string)
Country code in ISO format (i. e. LT)
- gateway_code: (string)
- limit: (integer - default: 20)
- offset: (integer)
- order_by: (string - default: id)
- order_direction: (one of desc, asc)
- after: (string)
- before: (string)
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- items: required(array of object)
Items: City
- name: required(string)
City name
- name: required(string)
Example:
{
"items": [
{
"name": "Vilnius"
}
],
"_metadata": {
"total": 0,
"limit": null,
"offset": 0
}
}
/courier-api-credentials
Create new credentials
post /courier-api-credentials
Create new credentials
Json Web Token
Body
Media type: application/json
Type: object
Properties- project: required(string)
Projects hash
- gateway: required(string)
Gateways hash
- username: required(string)
API username
- password: required(string)
API password
- country: (string)
API country
Example:
{
"project":"project-hash",
"gateway":"gateway-hash",
"username":"username",
"password": "password",
"country":"LT"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- project: required(string)
- gateway: required(string)
- username: required(string)
- id: required(string)
Example:
{
"project":"project-hash",
"gateway":"gateway-hash",
"username":"username",
"hash":"hash-x",
"country":"LT"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}
List credentials
get /courier-api-credentials/{projectId}
List credentials
Json Web Token
URI Parameters
- projectId: required(string)
HTTP status code 200
Body
Media type: application/json
Type: Paysera.Result
Properties- items: required(array of object)
Items: CourierApiCredentials
- project: required(string)
- gateway: required(string)
- username: required(string)
- id: required(string)
Example:
{
"items":[
{
"project":"first",
"gateway":"dpd-enabled",
"username":"xxx",
"hash":"hash-x",
"country":"LT"
}
],
"_metadata":{
"total":1,
"limit":null,
"offset":0
}
}
Update credentials
Delete credentials
put /courier-api-credentials/{id}
Update credentials
Json Web Token
URI Parameters
- id: required(string)
Body
Media type: application/json
Type: object
Properties- project: required(string)
Projects hash
- gateway: required(string)
Gateways hash
- username: required(string)
API username
- password: required(string)
API password
- country: (string)
API country
Example:
{
"project":"project-hash",
"gateway":"gateway-hash",
"username":"username",
"password": "password",
"country":"LT"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- project: required(string)
- gateway: required(string)
- username: required(string)
- id: required(string)
Example:
{
"project":"project-hash",
"gateway":"gateway-hash",
"username":"username",
"hash":"hash-x",
"country":"LT"
}
HTTP status code 404
Resource not found
Body
Media type: application/json
Type: Error
Example:
{
"error": "not_found",
"error_description": "Object not found"
}