Team and administration
API endpoints
Let programs, scripts and automations send documents to a secret URL and print them.
An API endpoint is a secret URL that programs send documents to, for example invoices from an ERP system, labels from an online shop or reports from a script. Every document becomes a job on behalf of the person who created the endpoint and goes to the endpoint's destination. The URL itself is the access key, so no API token is needed. The API reference describes every option.
Prerequisites
- An admin switches on the inbound channel REST API under Settings → Inbound channels. It is off by default.
- Every member can create API endpoints. Users see their own, admins all endpoints of the organization.
- Included in every plan.
One-time setup
- Go to Sources → API endpoints and select New API endpoint.
- Enter a Name that says what the endpoint is used for, for example "ERP invoices".
- Choose the Destination for jobs whose request names none. The default routing uses your default destination.
- Optionally choose a Workflow, for example to hold every document in Sealed Print first (see Hold and workflows).
- Select Create and copy the Endpoint URL into your program.
Send the document as the request body with a matching Content-Type:
curl -X POST "https://www.sealedprint.com/api/print/sp_ep_…?name=Invoice" \
-H "Content-Type: application/pdf" \
--data-binary @invoice.pdf
Or as a form with the field file; options go along as form fields:
curl -X POST "https://www.sealedprint.com/api/print/sp_ep_…" \
-F "[email protected]" \
-F "name=Invoice" \
-F "copies=2"
destinationId, destinationIds or groupId override the endpoint's destination for one request; print options
such as copies or sides go along as query parameters or form fields. The response is the job (HTTP 201).
Every time
- Last used on the endpoint shows whether a program still sends documents.
- Edit changes the name, the destination and the workflow; the URL stays the same.
- Generate new URL replaces the URL; the old one stops working at once. Delete ends the endpoint for good.
- To follow a job's status from your program, use an API token.
Troubleshooting
- HTTP 403: the inbound channel REST API is switched off, or the person who created the endpoint left the organization. Create a new endpoint with another member.
- HTTP 404: the URL is wrong or was replaced by a new one.
- HTTP 413 or 415: the file is larger than the plan allows, or not a PDF, JPEG or PNG.
- The URL was copied somewhere it should not be: select Generate new URL right away.
What's next
- API reference: every endpoint, with the OpenAPI description.
- API tokens
- Inbound and outbound channels