{"openapi":"3.1.0","info":{"title":"Paper Trails print API","version":"1.0.0","description":"Discover print options, edit private drafts and render the current revision. Recipes are versioned independently from this API."},"servers":[{"url":"https://staging.papertrails.io/api/v1"}],"paths":{"/print-options":{"get":{"operationId":"getPrintOptions","summary":"Discover supported design and purchase options","responses":{"200":{"description":"Themes, recipe links, endpoint icons, product prices in pence and delivery countries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintOptions"}}}}}}},"/print-drafts":{"post":{"operationId":"createPrintDraft","summary":"Create a private draft and render its first revision","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["recipe"],"properties":{"recipe":{"$ref":"#/components/schemas/Recipe"}},"additionalProperties":false}}}},"responses":{"201":{"description":"Current saved design and preview state. A design edit invalidates the previous preview link. Edits stay saved if rendering fails or is busy.","headers":{"ETag":{"description":"Strong tag for the current draft version. Send it verbatim in If-Match.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"428":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/print-drafts/{draftId}":{"parameters":[{"name":"draftId","in":"path","required":true,"description":"Private capability ID. Keep it out of logs and shared links.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}}],"get":{"operationId":"readPrintDraft","summary":"Read the current draft revision without renewing its expiry","responses":{"200":{"description":"Current saved design and preview state. A design edit invalidates the previous preview link. Edits stay saved if rendering fails or is busy.","headers":{"ETag":{"description":"Strong tag for the current draft version. Send it verbatim in If-Match.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"404":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"editPrintDraft","summary":"Replace the recipe and render the new revision","parameters":[{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"The current draft ETag, including its double quotes."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["recipe"],"properties":{"recipe":{"$ref":"#/components/schemas/Recipe"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Current saved design and preview state. A design edit invalidates the previous preview link. Edits stay saved if rendering fails or is busy.","headers":{"ETag":{"description":"Strong tag for the current draft version. Send it verbatim in If-Match.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"428":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/print-drafts/{draftId}/activity":{"parameters":[{"name":"draftId","in":"path","required":true,"description":"Private capability ID. Keep it out of logs and shared links.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"The current draft ETag, including its double quotes."}],"put":{"operationId":"uploadPrintActivity","summary":"Attach or replace GPX and render the new revision","requestBody":{"required":true,"description":"One GPX file up to 10 MiB before base64 encoding, with up to 35,000 total track and route points, 16 routes or tracks, and 32 levels of XML nesting. Each track must have one segment.","content":{"application/gpx+xml":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Current saved design and preview state. A design edit invalidates the previous preview link. Edits stay saved if rendering fails or is busy.","headers":{"ETag":{"description":"Strong tag for the current draft version. Send it verbatim in If-Match.","schema":{"type":"string"}},"X-Request-Id":{"description":"Server-generated ID for this upload. Use it to trace failures.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GpxUploadError"}}},"headers":{"X-Request-Id":{"description":"Server-generated ID for this upload. Use it to trace failures.","schema":{"type":"string","format":"uuid"}}}},"409":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GpxUploadError"}}},"headers":{"X-Request-Id":{"description":"Server-generated ID for this upload. Use it to trace failures.","schema":{"type":"string","format":"uuid"}}}},"415":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GpxUploadError"}}},"headers":{"X-Request-Id":{"description":"Server-generated ID for this upload. Use it to trace failures.","schema":{"type":"string","format":"uuid"}}}},"428":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"GPX imports are busy or the client is rate-limited.","headers":{"X-Request-Id":{"description":"Server-generated ID for this upload. Use it to trace failures.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GpxUploadError"},{"$ref":"#/components/schemas/Error"}]}}}},"500":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removePrintActivity","summary":"Remove GPX and its styles and render the new revision","responses":{"200":{"description":"Current saved design and preview state. A design edit invalidates the previous preview link. Edits stay saved if rendering fails or is busy.","headers":{"ETag":{"description":"Strong tag for the current draft version. Send it verbatim in If-Match.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"428":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/print-drafts/{draftId}/preview":{"parameters":[{"name":"draftId","in":"path","required":true,"description":"Private capability ID. Keep it out of logs and shared links.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"The current draft ETag, including its double quotes."}],"post":{"operationId":"getPrintPreview","summary":"Get the current revision’s preview or retry its render","description":"Send Accept: image/png for inline bytes. The response defaults to JSON. A retry can reuse a ready image while it is still valid for the current design.","responses":{"200":{"description":"Current preview metadata or the PNG itself.","headers":{"ETag":{"description":"Strong tag for the current draft version. Send it verbatim in If-Match.","schema":{"type":"string"}},"Link":{"description":"Share URL supplied with a PNG response.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewResult"}},"image/png":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"428":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The renderer is busy (preview result) or the API rate limit was reached (error). Wait for Retry-After before retrying the same revision.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PreviewResult"},{"$ref":"#/components/schemas/Error"}]}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"502":{"description":"Render or image retrieval failed. The revision remains saved.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PreviewResult"},{"$ref":"#/components/schemas/Error"}]}}}},"503":{"description":"Preview rendering or storage is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewResult"}}}},"504":{"description":"The render deadline expired. The revision remains saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewResult"}}}}}}},"/print-drafts/{draftId}/purchase":{"parameters":[{"name":"draftId","in":"path","required":true,"description":"Private capability ID. Keep it out of logs and shared links.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"The current draft ETag, including its double quotes."}],"put":{"operationId":"setPrintPurchase","summary":"Replace the purchase selection for the current revision","description":"Use a product ID from print options. Partial selections are saved until all fields needed for a quote are available.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseSelection"}}}},"responses":{"200":{"description":"Saved purchase selection.","headers":{"ETag":{"description":"Strong tag for the current draft version. Send it verbatim in If-Match.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseResult"}}}},"400":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"428":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/print-drafts/{draftId}/quote":{"parameters":[{"name":"draftId","in":"path","required":true,"description":"Private capability ID. Keep it out of logs and shared links.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"The current draft ETag, including its double quotes."}],"post":{"operationId":"quotePrintDraft","summary":"Get a GBP quote for the current revision and selection","description":"The server calculates prices and shipping in pence. A design or purchase change invalidates the quote. Incomplete selections return missingFields.","responses":{"200":{"description":"Current quote and purchase selection.","headers":{"ETag":{"description":"Strong tag for the current draft version. Send it verbatim in If-Match.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResult"}}}},"400":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"428":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/print-drafts/{draftId}/checkout":{"parameters":[{"name":"draftId","in":"path","required":true,"description":"Private capability ID. Keep it out of logs and shared links.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"If-Match","in":"header","required":true,"schema":{"type":"string"},"description":"The current draft ETag, including its double quotes."}],"post":{"operationId":"openPrintCheckout","summary":"Open Checkout for a buyer-approved preview and quote","description":"Call only after the buyer approves the current preview and price. Stripe hosts payment. The checkout is complete once the paid order has been saved.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["quoteId","previewImageId"],"properties":{"quoteId":{"type":"string","format":"uuid"},"previewImageId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}}}}}},"responses":{"200":{"description":"A hosted Checkout link or the status of an existing session.","headers":{"ETag":{"description":"Strong tag for the current draft version. Send it verbatim in If-Match.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["revisionId","quoteId","checkout"],"properties":{"revisionId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"quoteId":{"type":"string","format":"uuid"},"checkout":{"type":"object","required":["status"],"properties":{"status":{"enum":["open","complete","processing"]},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"428":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Request rejected. Consult the HTTP status and error message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/print-previews/{imageId}":{"parameters":[{"name":"imageId","in":"path","required":true,"description":"Image-only share ID. Valid for up to seven days, until a design edit or draft expiry.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}}],"get":{"operationId":"downloadPrintPreview","summary":"Download a shared preview image","responses":{"200":{"description":"Preview PNG","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Image unavailable or expired"},"502":{"description":"Image retrieval failed"}}},"head":{"operationId":"checkPrintPreview","summary":"Check whether a shared preview is still available","responses":{"200":{"description":"Preview exists"},"404":{"description":"Image unavailable or expired"},"502":{"description":"Image retrieval failed"}}}}},"components":{"schemas":{"Recipe":{"$ref":"/print-recipe/v1/schema.json"},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"missingFields":{"type":"array","items":{"type":"string"}}}},"GpxUploadError":{"type":"object","required":["error","code","guidance"],"properties":{"error":{"type":"string"},"code":{"type":"string"},"guidance":{"type":"string"},"limit":{"type":"object","required":["kind","maximum"],"properties":{"kind":{"enum":["fileBytes","points","tracks","xmlDepth"]},"maximum":{"type":"integer","minimum":1}}}}},"Draft":{"type":"object","required":["draftId","revisionId","expiresAt","recipe","activityCount","preview"],"properties":{"draftId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"revisionId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"expiresAt":{"type":"string","format":"date-time"},"recipe":{"$ref":"#/components/schemas/Recipe"},"activityCount":{"type":"integer","minimum":0},"preview":{"$ref":"#/components/schemas/Preview"},"purchase":{"$ref":"#/components/schemas/PurchaseSelection"},"quote":{"$ref":"#/components/schemas/Quote"}}},"PurchaseSelection":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"productId":{"type":"string","minLength":1},"quantity":{"type":"integer","minimum":1,"maximum":10},"shippingCountry":{"type":"string","minLength":2,"maxLength":2}},"additionalProperties":false},"PurchaseResult":{"type":"object","required":["revisionId","purchase"],"properties":{"revisionId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"purchase":{"$ref":"#/components/schemas/PurchaseSelection"}}},"QuoteResult":{"type":"object","required":["revisionId","purchase","quote"],"properties":{"revisionId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"purchase":{"$ref":"#/components/schemas/PurchaseSelection"},"quote":{"$ref":"#/components/schemas/Quote"}}},"Quote":{"type":"object","required":["quoteId","revisionId","currency","unitPricePence","subtotalPence","shippingPence","totalPence","shippingIsFallback","expiresAt"],"properties":{"quoteId":{"type":"string","format":"uuid"},"revisionId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"currency":{"const":"GBP"},"unitPricePence":{"type":"integer","minimum":0},"subtotalPence":{"type":"integer","minimum":0},"shippingPence":{"type":"integer","minimum":0},"totalPence":{"type":"integer","minimum":0},"shippingIsFallback":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"}}},"PreviewResult":{"type":"object","required":["preview"],"properties":{"revisionId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"preview":{"$ref":"#/components/schemas/Preview"}}},"Preview":{"oneOf":[{"type":"object","required":["status","imageId","url","expiresAt"],"properties":{"status":{"const":"ready"},"imageId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}}},{"type":"object","required":["status","retryAfter"],"properties":{"status":{"const":"busy"},"retryAfter":{"type":"integer","minimum":1}}},{"type":"object","required":["status"],"properties":{"status":{"enum":["pending","failed","timed_out","unavailable"]}}}]},"PrintOptions":{"type":"object","required":["apiVersion","recipeVersions","themes","defaultTheme","endpointIcons","products","currency","shippingCountries"],"properties":{"apiVersion":{"const":1},"recipeVersions":{"type":"array","items":{"type":"object","required":["version","schema","guide"],"properties":{"version":{"type":"integer"},"schema":{"type":"string","format":"uri-reference"},"guide":{"type":"string","format":"uri-reference"}}}},"themes":{"type":"array","items":{"type":"string"}},"defaultTheme":{"type":"string"},"endpointIcons":{"type":"array","items":{"$ref":"#/components/schemas/NamedOption"}},"products":{"type":"array","items":{"type":"object","required":["id","type","title","size","frame","unitPricePence"],"properties":{"id":{"type":"string"},"type":{"enum":["physical","digital"]},"title":{"type":"string"},"size":{"type":"string"},"frame":{"type":["string","null"]},"unitPricePence":{"type":"integer","minimum":0}}}},"currency":{"const":"GBP"},"shippingCountries":{"type":"array","items":{"type":"object","required":["code","name"],"properties":{"code":{"type":"string"},"name":{"type":"string"}}}}}},"NamedOption":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}