Get post office locations
GET https://delivery-api.paysera.com/rest/v1/post-offices
Retrieve post office locations with optional filtering.
Filtering Options​
- City
- Country
- Shipment gateway code
Pagination​
Use limit and offset parameters or cursor-based navigation.
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.
Parameters​
Query Parameters​
| Name | Type | Required | Description |
|---|---|---|---|
city | string | Filter by city name | |
country | string | Filter by country code | |
shipment_gateway_code | string | Filter by gateway code | |
limit | integer | Maximum number of results | |
offset | integer | Number of results to skip | |
after | string | Cursor for pagination (after) | |
before | string | Cursor for pagination (before) |
Example​
Request​
GET https://delivery-api.paysera.com/rest/v1/post-offices?city=Vilnius&country=LT&shipment_gateway_code=omniva&limit=20&offset=value&after=value&before=value
Authorization: MAC id="CLIENT_ID", ts="TIMESTAMP", nonce="RANDOM_STRING", mac="MAC_HASH"
Response​
{
"_metadata": {
"total": 25,
"offset": 0,
"limit": 20,
"has_next": true,
"has_previous": false
},
"post_offices": [
{
"id": "po_123",
"name": "Vilnius Central Post Office",
"city": "Vilnius",
"country": "LT",
"address": "Gedimino pr. 7",
"postal_code": "01103",
"latitude": 54.6872,
"longitude": 25.2797,
"gateway_code": "lietuvos_pastas"
},
{
"id": "po_124",
"name": "Kaunas Main Post Office",
"city": "Kaunas",
"country": "LT",
"address": "LaisvÄ—s al. 102",
"postal_code": "44251",
"latitude": 54.8985,
"longitude": 23.9036,
"gateway_code": "lietuvos_pastas"
}
]
}
AUTHORIZATION: HTTP
REQUEST
Base URL
https://delivery-api.paysera.com
Query Parameters
cityFilter by city name
countryFilter by country code
shipment_gateway_codeFilter by gateway code
limitMaximum number of results
offsetNumber of results to skip
afterCursor for pagination (after)
beforeCursor for pagination (before)
RESPONSE
Post offices retrieved successfully
{
"_metadata": {
"total": 25,
"offset": 0,
"limit": 20,
"has_next": true,
"has_previous": false
},
"post_offices": [
{
"id": "po_123",
"name": "Vilnius Central Post Office",
"city": "Vilnius",
"country": "LT",
"address": "Gedimino pr. 7",
"postal_code": "01103",
"latitude": 54.6872,
"longitude": 25.2797,
"gateway_code": "lietuvos_pastas"
},
{
"id": "po_124",
"name": "Kaunas Main Post Office",
"city": "Kaunas",
"country": "LT",
"address": "LaisvÄ—s al. 102",
"postal_code": "44251",
"latitude": 54.8985,
"longitude": 23.9036,
"gateway_code": "lietuvos_pastas"
}
]
}