Create a print document
const url = 'http://127.0.0.1:8080/api/v1/print/documents';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"book":"example","options":{"claims":true,"custom_scale":"example","description":true,"image":"automatic","layout":"automatic","locale":"example","measurement":"original","microwave_output_watts":1,"notes":true,"nutrition":true,"output":"native","scale":"original","size":"letter","source":true},"recipes":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://127.0.0.1:8080/api/v1/print/documents \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "book": "example", "options": { "claims": true, "custom_scale": "example", "description": true, "image": "automatic", "layout": "automatic", "locale": "example", "measurement": "original", "microwave_output_watts": 1, "notes": true, "nutrition": true, "output": "native", "scale": "original", "size": "letter", "source": true }, "recipes": [ "example" ] }'Freezes the revision of every named recipe, resolves the batch and measures asked for, and typesets the result. The document is generated on demand and is not stored as part of any recipe.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Book to print instead of a recipe selection
object
Print the dietary and allergen statements the recipe’s source makes
Exact batch factor, required when scale is custom
Print the recipe’s headnote
Whether the recipe photograph is printed
Full-page composition
Language tag the document is presented in
Measures the recipe is written in for this print
Explicit cooking-output basis for an adjusted print; omitted prints authored timings
Print the recipe’s notes
Print the nutrition the recipe’s source states; off by default
Whether cards become pages of their own size or are arranged on sheets for trimming
Which batch to print
Physical output size
Print where the recipe came from
Library entries to print, in the order they should appear. Capabilities report the most one document holds.
Responses
Section titled “Responses”Created
object
Suggested filename for a download
object
Exact card size when cards are arranged on sheets
object
object
object
object
object
Signature of the renderer, effective title, source identity and revision, authorization scope, recipe revisions, preferences, and print options
Exactly which version of each recipe was printed
object
Where to read the generated PDF
What degraded without invalidating the document, such as a photograph this library no longer holds
Example
{ "format": { "card": { "height": { "unit": "in" }, "width": { "unit": "in" } }, "height": { "unit": "in" }, "width": { "unit": "in" } }}Headers
Section titled “Headers”Bad Request
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}No valid session or API token (authentication-required), or the credential sent is invalid (invalid-credentials).
object
Examplegenerated
{ "code": "example", "detail": "example", "status": 1, "title": "example", "type": "example"}Not Found
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Request Entity Too Large
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Unprocessable Entity
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Internal Server Error
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}Service Unavailable
object
Stable application error code; clients may also use the problem type suffix.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
Structured context for the stable error code.
object
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
object
object
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}