Skip to main content

Create a new delivery order

POST https://delivery-api.paysera.com/rest/v1/orders

Create a new delivery order with shipment details, sender and receiver information.

You can specify sender/receiver using either:

  • Existing shipment point IDs (sender_id, receiver_id)
  • Inline shipment point objects (sender, receiver)

Webhooks​

Configure order notifications using the order_notification parameter to receive updates on order status changes.

Order Status​

Use order_initial_status to set the initial status:

  • draft - Order in draft state (default)
  • prepaid - Order is prepaid and ready for processing

Authorization​

This endpoint requires MAC (Message Authentication Code) authentication.

Authorization Header Format:

Authorization: MAC id="YOUR_PROJECT_ID",ts="1234567890",nonce="xyz123",mac="GENERATED_MAC_HASH"

Example:

Authorization: MAC id="a9b8c7d6e5f4g3h2", ts="1234567890", nonce="xyz123abc456def", mac="dGhpcyBpcyBhIHJhbmRvbSBtYWMgaGFzaCB2YWx1ZQ==", ext="body_hash=cmFuZG9tQm9keUhhc2hWYWx1ZQ%3D%3D"

For more details, please refer to the Authentication section.

Request Body​

FieldTypeRequiredDescription
project_idstring✓Project identifier
shipment_gateway_codestringPreferred shipping gateway code (optional)
shipment_method_codestringPreferred shipping method code (optional)
shipmentsarray✓List of shipments in this order
sender_idstringExisting sender shipment point ID (use this OR sender object)
senderobject
receiver_idstringExisting receiver shipment point ID (use this OR receiver object)
receiverobject
notesstringAdditional notes for the order
eshop_order_idstringE-shop order reference
order_creation_typestringHow the order is being created
order_notificationobject
order_initial_statusstringInitial order status
test_modebooleanMark order as test mode

Example​

Request​

POST https://delivery-api.paysera.com/rest/v1/orders
Content-Type: application/json
Authorization: MAC id="YOUR_PROJECT_ID",ts="1234567890",nonce="xyz123",mac="GENERATED_MAC_HASH"
{
"project_id": "proj_123",
"shipment_gateway_code": "omniva",
"shipment_method_code": "parcel-machine2parcel-machine",
"shipments": [
{
"weight": 2000,
"width": 300,
"length": 400,
"height": 200
}
],
"sender": {
"project_id": "project_123",
"type": "sender",
"saved": true,
"default_contact": true,
"contact": {
"party": {
"title": "My Company Ltd",
"company_code": "123456789",
"email": "info@mycompany.com",
"phone": "+37060000001"
},
"address": {
"country": "LT",
"city": "Vilnius",
"street": "Gedimino pr.",
"house_number": "10",
"postal_code": "01103"
}
}
},
"receiver": {
"project_id": "project_123",
"type": "receiver",
"saved": false,
"default_contact": false,
"contact": {
"party": {
"title": "John Doe",
"email": "john@example.com",
"phone": "+37061111111"
},
"address": {
"country": "LV",
"city": "Riga",
"street": "Brivibas iela",
"house_number": "20",
"apartment_number": "5",
"postal_code": "LV-1010"
}
}
},
"notes": "Please deliver before 5 PM",
"eshop_order_id": "SHOP-2024-001",
"order_creation_type": "eshop",
"order_initial_status": "draft",
"test_mode": false
}

Response​

{
"id": "ord_123456",
"project_id": "proj_123",
"number": "D323232323230",
"status": "new",
"status_description": "Order created and awaiting processing",
"shipment_gateway": {
"code": "omniva",
"title": "Omniva"
},
"shipment_method": {
"code": "parcel-machine2parcel-machine",
"title": "Parcel Machine to Parcel Machine"
},
"sender": {
"id": "sp_sender_123",
"type": "sender",
"contact": {
"party": {
"title": "My Company Ltd",
"company_code": "123456789",
"email": "info@mycompany.com",
"phone": "+37060000001"
},
"address": {
"country": "LT",
"city": "Vilnius",
"street": "Gedimino pr.",
"house_number": "10",
"postal_code": "01103"
}
}
},
"receiver": {
"id": "sp_receiver_456",
"type": "receiver",
"contact": {
"party": {
"title": "John Doe",
"email": "john@example.com",
"phone": "+37061111111"
},
"address": {
"country": "LV",
"city": "Riga",
"street": "Brivibas iela",
"house_number": "20",
"apartment_number": "5",
"postal_code": "LV-1010"
}
}
},
"shipments": {
"list": [
{
"weight": 2000,
"width": 300,
"length": 400,
"height": 200
}
]
},
"manifest_exists": false,
"label_exists": false,
"is_merchant_api_login": true,
"notes": "Please deliver before 5 PM",
"eshop_order_id": "SHOP-2024-001",
"order_creation_type": "eshop",
"test_mode": false,
"created_at": 1609459200
}

AUTHORIZATION: HTTP

REQUEST

Base URL
https://delivery-api.paysera.com

RESPONSE

Order created successfully
{}