Bulk import shipment points
POST https://delivery-api.paysera.com/rest/v1/shipment-points-import
Import shipment points from a file.
File Format​
The file content must be base64-encoded with the appropriate mime_type specified.
Returns an array of imported shipment points.
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 |
|---|---|---|---|
file | object | ✓ |
Example​
Request​
POST https://delivery-api.paysera.com/rest/v1/shipment-points-import
Content-Type: application/json
Authorization: MAC id="YOUR_PROJECT_ID",ts="1234567890",nonce="xyz123",mac="GENERATED_MAC_HASH"
{
"file": {
"content": "YmFzZTY0X2VuY29kZWRfY29udGVudF9oZXJl",
"mime_type": "text/csv"
}
}
Response​
{
"imported_count": 10,
"shipment_points": [
{
"id": 1,
"type": "sender",
"contact": {
"name": "Company ABC",
"phone": "+37060000001",
"email": "[email protected]"
},
"address": {
"country": "LT",
"city": "Vilnius",
"street": "Gedimino pr.",
"house_number": "10",
"postal_code": "01103"
}
}
]
}
AUTHORIZATION: HTTP
REQUEST
Base URL
https://delivery-api.paysera.com
Body REQUIRED
{
"file": {
"content": "YmFzZTY0X2VuY29kZWRfY29udGVudF9oZXJl",
"mime_type": "text/csv"
}
}
RESPONSE
Shipment points imported successfully
{
"imported_count": 10,
"shipment_points": [
{
"id": 1,
"type": "sender",
"contact": {
"name": "Company ABC",
"phone": "+37060000001",
"email": "[email protected]"
},
"address": {
"country": "LT",
"city": "Vilnius",
"street": "Gedimino pr.",
"house_number": "10",
"postal_code": "01103"
}
}
]
}