Calculate delivery prices
PUT https://delivery-api.paysera.com/rest/v1/order-prices
Calculate delivery prices for given shipment parameters.
Use this endpoint to get price estimates before creating an order.
Authorization​
This endpoint requires MAC (Message Authentication Code) authentication.
The Authorization header must include the following parameters:
id: Your Project IDts: Unix timestampnonce: Unique random stringmac: Message authentication code (calculated hash using Project Password)
Example:
Authorization: MAC id="YOUR_PROJECT_ID",ts="1234567890",nonce="xyz123",mac="GENERATED_MAC_HASH"
For more details, please refer to the Authentication section.
Request Body​
| Field | Type | Required | Description |
|---|---|---|---|
project_id | string | ✓ | Project identifier |
from_country_code | string | ✓ | Origin country code (ISO 3166-1 alpha-2) |
to_country_code | string | ✓ | Destination country code (ISO 3166-1 alpha-2) |
shipment_gateway_code | string | Specific gateway code (optional) | |
shipment_method_code | string | Specific method code (optional) | |
shipments | array | ✓ | Shipments to calculate prices for |
Example​
Request​
PUT https://delivery-api.paysera.com/rest/v1/order-prices
Content-Type: application/json
Authorization: MAC id="YOUR_PROJECT_ID",ts="1234567890",nonce="xyz123",mac="GENERATED_MAC_HASH"
{}
Response​
{}
AUTHORIZATION: HTTP
REQUEST
Base URL
https://delivery-api.paysera.com
RESPONSE
Prices calculated successfully
{}