Skip to main content

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​

NameTypeRequiredDescription
citystringFilter by city name
countrystringFilter by country code
shipment_gateway_codestringFilter by gateway code
limitintegerMaximum number of results
offsetintegerNumber of results to skip
afterstringCursor for pagination (after)
beforestringCursor 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
city
Filter by city name
country
Filter by country code
shipment_gateway_code
Filter by gateway code
limit
Maximum number of results
offset
Number of results to skip
after
Cursor for pagination (after)
before
Cursor 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"
}
]
}