Get available shipment methods
PUT https://delivery-api.paysera.com/rest/v1/methods
Retrieve available shipment methods based on project, origin/destination countries, and shipment dimensions.
Returns methods with codes like:
courier2courier- Courier to courier deliveryparcel-machine2courier- Parcel machine to courier deliverycourier2parcel-machine- Courier to parcel machine deliveryparcel-machine2parcel-machine- Parcel machine to parcel machine delivery
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​
| Field | Type | Required | Description |
|---|---|---|---|
project_id | string | Project identifier (optional) | |
from_country_code | string | ✓ | Origin country code (ISO 3166-1 alpha-2) |
to_country_code | string | ✓ | Destination country code (ISO 3166-1 alpha-2) |
shipments | array | ✓ | Array of shipment specifications |
Example​
Request​
PUT https://delivery-api.paysera.com/rest/v1/methods
Content-Type: application/json
Authorization: MAC id="YOUR_PROJECT_ID",ts="1234567890",nonce="xyz123",mac="GENERATED_MAC_HASH"
{
"project_id": "proj_123",
"from_country_code": "LT",
"to_country_code": "LV",
"shipments": [
{
"weight": 2000,
"width": 300,
"length": 400,
"height": 200
}
]
}
Response​
{
"methods": [
{
"id": 1,
"code": "courier2courier",
"name": "Courier to courier",
"description": "Door-to-door delivery service"
},
{
"id": 2,
"code": "parcel-machine2courier",
"name": "Parcel machine to courier",
"description": "Pick up from parcel machine, deliver to address"
}
]
}
AUTHORIZATION: HTTP
REQUEST
Base URL
https://delivery-api.paysera.com
Body REQUIRED
{
"project_id": "proj_123",
"from_country": "LT",
"to_country": "LV",
"shipments": [
{
"weight": 2000,
"width": 300,
"length": 400,
"height": 200
}
]
}
RESPONSE
Methods retrieved successfully
{
"methods": [
{
"id": 1,
"code": "courier2courier",
"name": "Courier to courier",
"description": "Door-to-door delivery service"
},
{
"id": 2,
"code": "parcel-machine2courier",
"name": "Parcel machine to courier",
"description": "Pick up from parcel machine, deliver to address"
}
]
}