Create an order
Creates a new order from an existing template, copying its design and product settings, and returns the new order's ID. Add recipients and execute checkout separately to send the order.
Creates a new order from an existing template, copying its design and product settings, and returns the new order's ID. Add recipients and execute checkout separately to send the order.
Authorization
ApiKey In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
External Orders Create Order From TemplateId
The template to create the order from. Obtain it from the templates listing; note that a template is itself an order that is never fulfilled, so this is an order identifier.
Whether the generated mail piece should include the template's QR code. true = include the QR code at its existing template placement; false = remove it. The selected template must already have a QR code element placed on its design, otherwise the request is rejected. Omit to keep the template's current setting.
Optional target URL the QR code should direct to. When supplied, overrides the template's existing QR target; when omitted (with UseQr true) the template target is kept.
Optional handwriting style identifier. Must be a style supported by LettrLabs and available to the authenticated account. Handwriting styles are global only — fonts uploaded to the account cannot be used for handwriting and are rejected. Use the fonts listing operation to discover valid values. Omit to use the template's default style.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/order" \ -H "Content-Type: application/json" \ -d '{ "templateId": 48213 }'{ "profile": { "id": 0, "aadId": "1cbad290-069a-4527-be23-a0c144b5302d", "email": "string", "firstName": "string", "lastName": "string", "company": "string", "created": "2019-08-24T14:15:22Z", "shouldProcessQrCodes": true }, "payload": { "orderId": 0, "status": "Success" }, "errorCode": "UNAUTHENTICATED", "errors": [ "string" ], "hasErrors": true, "warnings": [ "string" ], "hasWarnings": true, "errorDetails": [ null ], "metadata": { "property1": null, "property2": null }}{ "profile": { "id": 0, "aadId": "1cbad290-069a-4527-be23-a0c144b5302d", "email": "string", "firstName": "string", "lastName": "string", "company": "string", "created": "2019-08-24T14:15:22Z", "shouldProcessQrCodes": true }, "payload": { "orderId": 0, "status": "Success" }, "errorCode": "UNAUTHENTICATED", "errors": [ "string" ], "hasErrors": true, "warnings": [ "string" ], "hasWarnings": true, "errorDetails": [ null ], "metadata": { "property1": null, "property2": null }}"string"{ "profile": { "id": 0, "aadId": "1cbad290-069a-4527-be23-a0c144b5302d", "email": "string", "firstName": "string", "lastName": "string", "company": "string", "created": "2019-08-24T14:15:22Z", "shouldProcessQrCodes": true }, "payload": { "orderId": 0, "status": "Success" }, "errorCode": "UNAUTHENTICATED", "errors": [ "string" ], "hasErrors": true, "warnings": [ "string" ], "hasWarnings": true, "errorDetails": [ null ], "metadata": { "property1": null, "property2": null }}Append recipients to an order PUT
Adds recipients to an existing order without replacing the ones already on it. Accepts up to 5,000 recipients per request. The order must be editable — status Draft or Edits Needed; once a checkout has been accepted (Paid, Ready For Production, and later statuses) appends are rejected with a 400 invalid-status error, matching the recipient-delete and checkout operations.
Retrieve order transactions GET
Returns the financial transactions recorded for the orders named in the Id query parameter (a comma-separated list of order IDs), including transaction type, amounts, and discounts. Orders that cannot be processed are reported per-order with an error status rather than failing the whole request.