Getting Started
What is ZEMLOG API v1?
The current version of the API built to let you perform the operations of the ZEMLOG app panel from other systems. All requests go to a single base URL; the full path of each endpoint is given on its own page.
ℹ️ Migrating from the legacy API?
The v1 equivalents of the legacy endpoints and the changed fields are listed on the Migrating from Legacy API page.
API Variables
| Variable | Type | Sample value |
|---|---|---|
| token | string | |
| api_url | string | https://gateway.zemlog.com |
API v1 requests are sent to https://gateway.zemlog.com. https://api.zemlog.com remains in use only for the deprecated legacy endpoints.
Scope
With API v1 you can:
- Get a token
- Calculate prices, create shipments and single point imports
- List invoices
- List countries, cities, counties, currencies, units of measure and export codes
Requests starting with /api/v1/public/ do not require a token. All other requests require a token in the Authorization header.
Request Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes (except /public/ requests) | Bearer {token} |
Content-Type | For requests with a body | application/json |
Accept-Language | No | tr (default) or en (values starting with en, e.g. en-US, count as English). Country, unit of measure, status and package additional fee names and validation messages use this language. |
Every response contains the Zemlog-Request-Id header. Share this value in support requests so we can find your request quickly.
Response Envelope
Requests returning a single record:
{
"success": true,
"message": "Gönderi oluşturuldu",
"data": {}
}Lists return items instead of data; paginated lists also return meta:
{
"success": true,
"message": "Faturalar listelendi",
"items": [],
"meta": { "page": 1, "perPage": 25, "total": 3, "pageCount": 1 }
}Operations without a body (e.g. completing a single point import) return only success and message. Dates are ISO 8601 in UTC (e.g. 2026-10-10T10:24:19.000Z).
Pagination
List requests accept the page (default 1), perPage (at most 200), sortBy and sortOrder (asc / desc) query parameters.
Error Envelope
{
"success": false,
"code": "VALIDATION_FAILED",
"message": "Validation failed.",
"errors": [{ "path": "recipientAddress.zipCode", "message": "Zip code is required." }]
}| HTTP | Meaning | code |
|---|---|---|
| 400 | Business rule error, record not found or unreadable JSON body | Operation-specific code (e.g. CARRIER_IS_NOT_FOUND); BAD_REQUEST for not-found cases without their own code and for an unreadable body |
| 401 | Missing, invalid or expired token; application inactive or deleted; the user who created the application is no longer an organization member | SESSION_TIME_HAS_EXPIRED (no token, missing Bearer prefix or expired), TOKEN_COULD_NOT_BE_VERIFIED, APPLICATION_IS_NOT_ACTIVE, APPLICATION_IS_NOT_FOUND, ORGANIZATION_IS_NOT_SELECTED |
| 403 | The user who created the application lacks the permission | ACCESS_DENIED; FORBIDDEN for fields that need an extra permission granted by ZEMLOG (e.g. shipment comment) |
| 404 | Unknown path (returned without a body) | — |
| 422 | The request could not be validated; errors lists the invalid fields | VALIDATION_FAILED |
| 500 | Unexpected server error | INTERNAL_ERROR |
| 503 | The API is temporarily unavailable; retry the request | DEPENDENCY_UNAVAILABLE |
Use the code field rather than message in your integration. Success, business rule, authorization and 503 messages are returned in Turkish regardless of the Accept-Language header. For validation errors, errors contains only the first error per field.
Permissions
An application token works with the permissions that the user who created the application has in the organization. If a permission is missing, the request returns 403 ACCESS_DENIED.
| Operation | Required permission |
|---|---|
| Calculate Price, Validate Destination | Calculate Price or Shipments (amounts are not returned with Shipments only) |
| Create Document and Package Shipment | Shipments |
| Create and Complete Single Point Import | Single Point Import |
| Invoice List | Invoices |
| Helper API | No permission required |
How to Get Tokens for the API?
For detailed information on how to get tokens, click here.
⚠️ Warning
You cannot use ZEMLOG API v1 without completing these steps (except /api/v1/public/ requests).
