Overview
The label-templates API delivers production-ready Zebra Programming Language (ZPL) layouts for the most common label sizes used in shipping, compliance, and operations. You can browse template families, inspect placeholder definitions, and render a ZPL snippet by POSTing contextual data. The service is stateless and optimized for low-latency label generation in fulfillment lines or internal tools.
Base URL
https://label-templates.com
Authentication
APIs require a bearer token generated from your dashboard. Tokens are scoped per user and can be revoked at any time. Send the token via the Authorization header.
Authorization: Bearer pk_live_your_api_token
- Tokens inherit quotas from your subscription plan.
- Rotate credentials periodically and revoke unused tokens in the dashboard.
- Do not embed tokens in client-side code; proxy requests through your backend.
Rate limits & quotas
Every plan enforces per-second and monthly quotas. Responses include X-Usage-* headers to help you throttle proactively.
| Plan | Requests / sec | Monthly quota |
|---|---|---|
| Free | 1 | 500 |
| Plus | 5 | 5000 |
| Business | 10 | 20000 |
| Custom | 20 | Unlimited |
If you exceed a limit, the API returns HTTP 429. Retry after the Retry-After interval or upgrade your plan. Each response includes usage headers:
X-Usage-Limit— Monthly request quota.X-Usage-Remaining— Requests remaining in the current month.X-Usage-Reset— Unix timestamp when the monthly window resets.X-Usage-Policy— Per-second throttle policy.
REST endpoints
All responses are JSON and follow the application/json media type. Examples use curl.
List label sizes
Retrieve the canonical set of supported label dimensions.
GET /api/template-sizes
{
"data": [
{
"id": 1,
"name": "4 x 6 inch",
"slug": "4x6-inch",
"width": 4,
"height": 6,
"unit": "in"
}
]
}
Render template
Create a ZPL snippet by providing all required placeholders. Responses only include a success flag and the inline ZPL string—no template payloads or personal data are persisted.
POST /api/templates/{template_id}/render
curl -X POST https://label-templates.com/api/templates/12/render \
-H "Authorization: Bearer <API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"placeholders": {
"company_name": "Label Templates Inc.",
"ship_from_address": "500 Howard St, San Francisco CA 94105",
"ship_to_name": "Jane Smith",
"ship_to_address_line1": "120 Innovation Way",
"ship_to_city_state_zip": "Austin, TX 73301",
"service_level": "2-Day Air",
"tracking_number": "1Z12345E0205271688"
}
}'
{
"success": true,
"zpl": "^XA\\n^PW812\\n^LL1218\\n^CI28\\n..."
}
Idempotency & retries
Rendering is idempotent: you can safely retry the same payload if the network fails. Include a unique Idempotency-Key header (UUID v4) if you want request collapsing on our side.
Error handling
Errors follow the JSON:API error object guidelines. Each response includes an application-specific error code.
{
"errors": [
{
"status": "422",
"code": "PLACEHOLDER_VALIDATION_FAILED",
"title": "Invalid placeholder payload.",
"detail": "placeholders.tracking_number is required.",
"meta": {
"missing": ["tracking_number"]
}
}
]
}
Common status codes
400— Malformed request.401— Missing or invalid bearer token.403— Token disabled or plan inactive.422— Placeholder validation error.429— Rate limit exceeded.
Correlation IDs
Every response includes X-Request-Id. Include the value when contacting support for faster traces.
Support & SLAs
Enterprise plans include 24/7 support with a 1-hour response SLA. Free and Plus accounts can email support@label-templates.io during business hours.
Have ideas or need a custom template? Submit a request via the dashboard or contact your customer success manager.