{"openapi":"3.1.0","info":{"title":"Priority Only API","version":"1.0.0","summary":"Send real USPS mail: design, pay, approve, track.","description":"The Priority Only REST API: send real USPS mail (letters from our templates or plain text in our standard layout, and greeting cards from our designs) with the same operations as the Priority Only MCP connector. Two steps: Proof, then Pay. Proof (preview_letter): it makes the final print proof, the exact file we print; show every page image and the total price and get an explicit \"yes\"; nothing is charged. Pay (checkout): the customer pays on Stripe, and paying approves that exact letter (there is no second approval). The card is held, not charged, until the letter goes to print. After giving the payment link, call get_status to confirm the payment yourself; never ask the customer to come back and tell you they paid. Typical flow: verify_address -> create_draft (or create_card) -> preview_letter (the final print proof) -> the user sees every page and the total, hears \"Paying approves this exact letter. You can cancel until it goes to print; after that it's final.\" and says yes -> checkout (paying is the approval) -> get_status right away to confirm the payment (it waits; never ask the user to say they paid) until approval_state is approved -> get_status to follow it. To change the letter before paying: update the draft (POST /v1/drafts/{draft_id}), show the updated text, then preview again (a new version). Cancel until it goes to print: POST /v1/orders/{order_id}/cancel. Always show every page of the final print proof and the total price, tell the customer \"Paying approves this exact letter. You can cancel until it goes to print; after that it's final.\", and get an explicit \"yes\" before calling checkout. Nothing is charged without that yes. The preview_letter images are the final print proof: we print exactly that. Paying approves it. Until the letter goes to print, the customer can cancel (cancel_letter, the Cancel link in our email, or their account): the hold on the card is released and nothing is charged. Once it goes to print, the card is charged and the letter is final: it can't be changed or cancelled, and there is no refund for a change of mind. To change anything before paying, call update_draft, show the customer the updated draft text, then call preview_letter again for the new final print proof (a new version); only the latest version can be paid. If the final print proof is still being prepared (final_proof \"pending\"), there is nothing to say yes to yet: tell the customer we'll email it when it is ready, and don't call checkout. Never tell the customer release or print times; only the estimated arrival. No account is needed: a call without sign-in names the customer with customer_email in the JSON body (never in the URL), and every later call for that letter needs the same customer_email. A call with an OAuth access token (the same sign-in as the MCP connector) acts for that user and leaves it out. Calls without sign-in are accepted from the priorityonly.com website and, where enabled, from servers; otherwise you get 403 agent_access_disabled: use the MCP connector or a fill-in link. A chatbot that can't call this API or the connector can prepare a fill-in link to the order form instead: see https://priorityonly.com/docs/agents/#fill-in-links. Errors are JSON: {\"error\":{\"code\",\"message\",\"retry_after\"?,\"details\"?}}; branch on the code and show the message. Every response carries an x-request-id header."},"security":[{},{"bearerAuth":[]}],"tags":[{"name":"Catalog","description":"Public, cacheable reads."},{"name":"Addresses"},{"name":"Letters"},{"name":"Cards","description":"Greeting cards from our own designs."},{"name":"Orders"},{"name":"Approve","description":"After payment: the Cancel link's page (until it goes to print) and, for older orders, the customer's separate decision on the final print proof."},{"name":"Quotes"},{"name":"Batches","description":"Orders to several people (up to 25): one card design or \"write my own\" letter, one payment. REST only."}],"paths":{"/v1/form-config":{"get":{"operationId":"form_config","summary":"Order form settings: whether orders are accepted, the spam-check key and limits.","description":"Public and cacheable for 60 seconds. Still answers while the API is paused (accepting_orders: false).","tags":["Catalog"],"security":[{}],"responses":{"200":{"description":"Order form settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormConfig"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/options":{"get":{"operationId":"get_options","summary":"Mail classes and prices in plain language.","description":"Public and cacheable. Quote prices from here; never estimate a price.","tags":["Catalog"],"x-mcp-tool":"get_options","security":[{}],"responses":{"200":{"description":"Mail classes and prices.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Options"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/templates":{"get":{"operationId":"list_templates","summary":"Letter templates with every field (type, limits, options) and who the recipient should be.","description":"Public and cacheable. Templates are general forms, not legal advice; template letters are always sent Certified Mail + electronic return receipt.","tags":["Catalog"],"x-mcp-tool":"list_templates","security":[{}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["credit","debt","housing","consumer","insurance","business","employment"]},"description":"Only templates in this category."}],"responses":{"200":{"description":"Letter templates and the disclaimer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateList"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/card-designs":{"get":{"operationId":"list_card_designs","summary":"Greeting-card occasions and designs, with each design's own fields and a thumbnail link.","description":"Public and cacheable. Every design is original. Ask the user only for the fields of the design they pick.","tags":["Cards"],"x-mcp-tool":"list_card_designs","security":[{}],"parameters":[{"name":"occasion","in":"query","required":false,"schema":{"type":"string","maxLength":40},"description":"Only this occasion, e.g. \"birthday\", \"thank-you\", \"sympathy\"."}],"responses":{"200":{"description":"Occasions and card designs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardDesignList"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/card-designs/{design_id}/thumbnail.png":{"get":{"operationId":"card_thumbnail","summary":"A small PNG of a card design's front.","description":"Public and cacheable for a day. Load it as an image.","tags":["Cards"],"security":[{}],"parameters":[{"name":"design_id","in":"path","required":true,"description":"A design id from GET /v1/card-designs.","schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"The PNG.","content":{"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/addresses/verify":{"post":{"operationId":"verify_address","summary":"Standardize a US address and check that USPS can deliver to it. Undeliverable addresses are blocked later.","description":"Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Addresses"],"x-mcp-tool":"verify_address","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyAddressRequest"}}}},"responses":{"200":{"description":"Deliverability and USPS's standard form of the address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyAddressResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/drafts":{"post":{"operationId":"create_draft","summary":"Create a letter draft from one of our templates plus fields, or from plain text in our standard layout.","description":"No account needed: pass the customer's email as customer_email, and the same address on every later call for this letter. Both addresses are checked; an undeliverable one returns address_undeliverable. Customer files and designs are not accepted (use POST /v1/quote-requests). Body: JSON (Content-Type: application/json), up to 128 KB.","tags":["Letters"],"x-mcp-tool":"create_draft","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftRequest"}}}},"responses":{"201":{"description":"Draft created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed, address_undeliverable. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed","address_undeliverable"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/drafts/{draft_id}":{"post":{"operationId":"update_draft","summary":"Change a letter before it is paid for (a new version of the same draft).","description":"Pass only what changes. The draft keeps its id and the result has the updated letter text to show the user; then POST /v1/drafts/{draft_id}/preview again for the new final print proof and total. A paid letter can't be changed (cancel it until it goes to print, or create a new draft); an open payment page for an earlier version must be cancelled first. Body: JSON (Content-Type: application/json), up to 128 KB.","tags":["Letters"],"x-mcp-tool":"update_draft","parameters":[{"name":"draft_id","in":"path","required":true,"description":"The draft id from POST /v1/drafts.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDraftRequest"}}}},"responses":{"200":{"description":"Draft changed; preview it again for the new final print proof.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDraftResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed, address_undeliverable. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed","address_undeliverable"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cards":{"post":{"operationId":"create_card","summary":"Create a greeting-card draft from one of our designs, with an optional deliver-by date.","description":"Then call POST /v1/drafts/{draft_id}/preview with the returned draft_id, exactly as for a letter, and checkout after the user says yes to the preview and price. After payment the user approves the final print proof, as for a letter. Same customer_email rules as letters. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Cards"],"x-mcp-tool":"create_card","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCardRequest"}}}},"responses":{"201":{"description":"Card draft created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCardResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed, address_undeliverable. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed","address_undeliverable"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/drafts/{draft_id}/preview":{"post":{"operationId":"preview_letter","summary":"Proof step: screen the draft, make its final print proof and email the page images (no price) to the customer.","description":"Proof step. Runs content screening first (borderline wording returns held_for_review with no proof), then makes the exact print file and gets the final print proof from the print partner's test system (never printed), auto-checks it, prices it and emails images of every page, without the price, to the customer. Nothing is charged. Show every page image and the itemized total to the user, with delivery_estimate.summary (the estimated arrival), and tell them: \"Paying approves this exact letter. You can cancel until it goes to print; after that it's final.\" If final_proof is \"pending\", the final print proof is still being prepared: there are no images and nothing to say yes to yet, and checkout refuses it (final_proof_not_ready); we email it when it is ready. A proof can't be checked out until that email has been sent. Each call makes a new proof version and sends a new email; only the latest version can be paid. To change the letter first, update the draft (POST /v1/drafts/{draft_id}), show the user the updated text, then preview again. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Letters"],"x-mcp-tool":"preview_letter","parameters":[{"name":"draft_id","in":"path","required":true,"description":"The draft (letter or card) to preview.","schema":{"type":"string","format":"uuid"}},{"name":"x-turnstile-token","in":"header","required":false,"description":"Website only: the priorityonly.com order form's Cloudflare Turnstile token, required on calls without sign-in from that page while the spam check is on. Other callers don't send it.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}}},"responses":{"201":{"description":"A new proof version with its page images and itemized price.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proof"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled, captcha_required, captcha_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled","captcha_required","captcha_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"held_for_review. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["held_for_review"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed, content_rejected. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed","content_rejected"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, captcha_unavailable, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","captcha_unavailable","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/checkout":{"post":{"operationId":"checkout","summary":"Pay step (paying approves the letter): get a Stripe Checkout link for the final print proof the user said yes to.","description":"Pay step (paying is the approval). Always show every page of the final print proof and the total price, tell the customer \"Paying approves this exact letter. You can cancel until it goes to print; after that it's final.\", and get an explicit \"yes\" before calling checkout. Before asking for the yes, tell the customer the estimated arrival for each recipient (from delivery_estimate.summary), together with the preview images and total price. Before calling this, show the user the final print proof's page images and the total price, and get an explicit yes for that exact proof version. Pass the total as confirmed_total_cents and the user's own words as user_confirmation (the order form sends its button label, e.g. \"Yes, the preview and the total of $19.99 are right\"). Without sign-in, also pass approval_token from the preview (it proves this client made the preview; don't share it): a missing or wrong token returns proof_stale. Only the latest, unexpired proof of a draft is accepted: an older version returns proof_stale, a proof older than 24 hours proof_expired, a different total price_mismatch, and anything but a clear yes confirmation_required. Returns a Stripe hosted Checkout URL and the order's private tracking link; card details never reach Priority Only. Calling again returns the same order and payment link. Before the user pays, tell them what paying means (final_notice): paying approves this exact letter; the card is held, not charged, until it goes to print; they can cancel until then; after that it's final. Then call get_status yourself to confirm the payment (POST /v1/orders/{order_id}/status waits up to about a minute and returns as soon as the order is paid and approved); never ask the user to tell you they paid. A proof still being prepared returns final_proof_not_ready. Redesign: when a paid order's stored print file failed a check before printing (approval_state redesign_needed), pass its id as redesign_order_id with the new final print proof. The same or a lower total reuses that card hold (checkout_url is null; the order is paid and approved at once and only the new total is charged when it goes to print); a higher total releases it and returns a new payment link. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Orders"],"x-mcp-tool":"checkout","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"The Stripe Checkout link and the order's private tracking link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"proof_not_approved, proof_stale, proof_expired, price_mismatch, held_for_review, not_available. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["proof_not_approved","proof_stale","proof_expired","price_mismatch","held_for_review","not_available"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed, confirmation_required, content_rejected. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed","confirmation_required","content_rejected"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-openai-isConsequential":true}},"/v1/orders/{order_id}/status":{"post":{"operationId":"get_status","summary":"Order status and the next step: the final print proof while it waits for approval, then tracking with a USPS link, the private tracking link, proof of mailing and the return receipt.","description":"A POST so that the customer's email stays out of the URL. Poll it for updates. While approval_state is preparing_final_proof, it waits up to about a minute while the final print proof is being prepared and returns it as soon as it is ready; if it is still preparing after that, next_step says to check again in a minute. After payment, call it until approval_state is awaiting_approval, show the user every page in final_proof_images, then pass their own answer to POST /v1/orders/{order_id}/decision. next_step says what to do in every state. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Orders"],"x-mcp-tool":"get_status","parameters":[{"name":"order_id","in":"path","required":true,"description":"The order id from checkout.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderLookupRequest"}}}},"responses":{"200":{"description":"Status, the approval state and next step, tracking and evidence links (older orders: the final print proof while it waits).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/orders/{order_id}/decision":{"post":{"operationId":"approve_print","summary":"Older orders only: the user's own decision on a final print proof that waits for a separate approval. Approve charges the card and is final; reject releases the hold, nothing is charged.","description":"Older orders and redesigns only: a new order is approved by paying (checkout), so don't call this for it. When get_status shows approval_state awaiting_approval (an order paid before 2026-11-23, when paying became the approval), show every page of its final print proof to the user and pass their own decision: approve or reject. Never decide for them. approve: the card is charged (charge_notice; charged_cents in the answer), and the order is final (older orders waiting for a separate approval; a new order is approved by paying, so approve answers already: true). If the card can't be charged, the answer is payment_required: the order is closed, nothing is charged, and the user orders again; not_available: the payment provider couldn't be reached, try again. reject: nothing is charged (the card hold is released), nothing is mailed, and the letter can be changed and proofed again; the Cancel link of a paid order sends reject until it goes to print. For an order to several people, one approval covers every piece still waiting. A repeated call changes nothing (already: true). final_proof_not_ready: there is nothing to decide yet (not paid, or a redesign is needed). approved_final: a reject (cancel) after the order went to print. Without sign-in, pass customer_email and the approval_token used for checkout (don't share it). One piece of an order to several people is decided with its group (POST /v1/order-groups/{order_group_id}/decision; the MCP tool takes order_group_id). Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Approve"],"x-mcp-tool":"approve_print","parameters":[{"name":"order_id","in":"path","required":true,"description":"The order id from checkout.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionRequest"}}}},"responses":{"200":{"description":"The decision's result (approved: final, charged; rejected: hold released) and the final proof view.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"payment_required. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payment_required"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"final_proof_not_ready, approved_final, not_available. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["final_proof_not_ready","approved_final","not_available"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-openai-isConsequential":true}},"/v1/checkout-sessions/{session_id}/final-proof":{"get":{"operationId":"final_proof_by_session","summary":"The final print proof of the order a Stripe Checkout payment was for, and where its decision stands.","description":"For the priorityonly.com page the customer returns to after paying: the Checkout Session id from Stripe's redirect is the credential, so there is no customer_email. It only shows; it never decides. While approval_state is preparing_final_proof, ask again after poll_after_ms. Assistants and other API clients use POST /v1/orders/{order_id}/status and POST /v1/orders/{order_id}/decision instead.","tags":["Approve"],"parameters":[{"name":"session_id","in":"path","required":true,"description":"The Stripe Checkout Session id from the redirect after payment.","schema":{"type":"string","minLength":8,"maxLength":255}}],"responses":{"200":{"description":"The order, its final print proof and where it stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalProofView"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/checkout-sessions/{session_id}/decision":{"post":{"operationId":"decide_by_session","summary":"Cancel the paid order (or, for an older order, approve or reject its final print proof) on the page shown after payment.","description":"The customer's own click on that page. approve: the card is charged (charge_notice; charged_cents in the answer), and the order is final (older orders waiting for a separate approval; a new order is approved by paying, so approve answers already: true). If the card can't be charged, the answer is payment_required: the order is closed, nothing is charged, and the user orders again; not_available: the payment provider couldn't be reached, try again. reject: nothing is charged (the card hold is released), nothing is mailed, and the letter can be changed and proofed again; the Cancel link of a paid order sends reject until it goes to print. For an order to several people, one approval covers every piece still waiting. A repeated call changes nothing (already: true). final_proof_not_ready: there is nothing to decide yet (not paid, or a redesign is needed). approved_final: a reject (cancel) after the order went to print. For an order to several people, reject with a piece's order_id leaves out only that person (left out of the one charge) while its can_drop is true; approve always covers every piece. Assistants and other API clients use POST /v1/orders/{order_id}/status and POST /v1/orders/{order_id}/decision instead. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Approve"],"parameters":[{"name":"session_id","in":"path","required":true,"description":"The Stripe Checkout Session id from the redirect after payment.","schema":{"type":"string","minLength":8,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDecisionRequest"}}}},"responses":{"200":{"description":"The result (cancelled, or an older order's decision) and the final proof view.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"payment_required. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payment_required"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"final_proof_not_ready, approved_final, not_available. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["final_proof_not_ready","approved_final","not_available"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-openai-isConsequential":true}},"/v1/final-decisions":{"get":{"operationId":"final_decision_link","summary":"The order and final print proof behind the link in our email, and where it stands.","description":"For the priorityonly.com page that the Cancel link of the payment email opens (older orders: the Approve and Reject buttons of the final proof email). The link's token goes in the x-decision-token header, never in the URL. It only shows; opening the link never decides, so a mail scanner can't approve. Assistants and other API clients use POST /v1/orders/{order_id}/status and POST /v1/orders/{order_id}/decision instead.","tags":["Approve"],"parameters":[{"name":"x-decision-token","in":"header","required":true,"description":"The token of the link in the customer's email. It is the customer's own secret: never ask for it, log it or share it.","schema":{"type":"string","minLength":1,"maxLength":200}}],"responses":{"200":{"description":"The final print proof and where the decision stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalProofView"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"decide_by_link","summary":"Cancel the paid order (or, for an older order, approve or reject its final print proof) from the link in our email.","description":"The customer's own click on the page that link opens; the token (t) is in the body. approve: the card is charged (charge_notice; charged_cents in the answer), and the order is final (older orders waiting for a separate approval; a new order is approved by paying, so approve answers already: true). If the card can't be charged, the answer is payment_required: the order is closed, nothing is charged, and the user orders again; not_available: the payment provider couldn't be reached, try again. reject: nothing is charged (the card hold is released), nothing is mailed, and the letter can be changed and proofed again; the Cancel link of a paid order sends reject until it goes to print. For an order to several people, one approval covers every piece still waiting. A repeated call changes nothing (already: true). final_proof_not_ready: there is nothing to decide yet (not paid, or a redesign is needed). approved_final: a reject (cancel) after the order went to print. For an order to several people, reject with a piece's order_id leaves out only that person (left out of the one charge) while its can_drop is true; approve always covers every piece. Assistants and other API clients use POST /v1/orders/{order_id}/status and POST /v1/orders/{order_id}/decision instead. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Approve"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionLinkRequest"}}}},"responses":{"200":{"description":"The decision's result and the final proof view.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"payment_required. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payment_required"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"final_proof_not_ready, approved_final, not_available. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["final_proof_not_ready","approved_final","not_available"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-openai-isConsequential":true}},"/v1/orders/{order_id}/cancel":{"post":{"operationId":"cancel_letter","summary":"Cancel an order (nothing charged; the card hold released) until its final print proof is approved.","description":"Cancels until the order goes to print: nothing is charged, the card hold is released and nothing is mailed. Without sign-in, a paid order also needs approval_token (the one the checkout was made with). For an order to several people that is paid, this cancels one piece (it is left out of the one charge). Once it has gone to print (and the card was charged), the letter is final: this returns approved_final, with no cancellation and no refund. A greeting card scheduled to mail more than 5 days after payment is charged at payment and is final from then. A mistake by us or our print partner is fixed with a free reprint, not a refund. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Orders"],"x-mcp-tool":"cancel_letter","parameters":[{"name":"order_id","in":"path","required":true,"description":"The order id from checkout.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderRequest"}}}},"responses":{"200":{"description":"Cancellation result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelResult"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"approved_final. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["approved_final"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-openai-isConsequential":true}},"/v1/quote-requests":{"post":{"operationId":"request_quote","summary":"Ask a person for a quote for custom work outside our templates.","description":"For custom work outside our templates and standard letter layout (custom designs, unusual formats, bulk). A person at Priority Only reviews it and replies by email with a quote. Nothing is printed or charged. No files: describe the job in words. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Quotes"],"x-mcp-tool":"request_quote","parameters":[{"name":"x-turnstile-token","in":"header","required":false,"description":"Website only: the priorityonly.com order form's Cloudflare Turnstile token, required on calls without sign-in from that page while the spam check is on. Other callers don't send it.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"201":{"description":"Quote request received.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled, captcha_required, captcha_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled","captcha_required","captcha_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, captcha_unavailable, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","captcha_unavailable","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches":{"post":{"operationId":"create_batch","summary":"Start an order to several people (up to 25): one greeting card design or \"write my own\" letter, one payment.","description":"Template letters stay one person each; more than 25 people is a quote request. The shared message or body_text may use {{name}} for each person's greeting name. Problems name the person by path, e.g. recipients.1.address.address_zip; an undeliverable address lists details.recipients as [{index, reason}]. Body: JSON (Content-Type: application/json), up to 128 KB.","tags":["Batches"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchRequest"}}}},"responses":{"201":{"description":"Batch created, with each person's recipient_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed, address_undeliverable. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed","address_undeliverable"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{batch_id}/content":{"post":{"operationId":"update_batch_content","summary":"Change the shared design, message or letter text.","description":"Same kind as the order. People whose wording changed lose their proofs (listed in revoked): preview again. Editing after the user said yes but before payment cancels the open payment page. Body: JSON (Content-Type: application/json), up to 128 KB.","tags":["Batches"],"parameters":[{"name":"batch_id","in":"path","required":true,"description":"The batch id from POST /v1/batches.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBatchContentRequest"}}}},"responses":{"200":{"description":"The shared content changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBatchContentResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{batch_id}/recipients":{"post":{"operationId":"add_batch_recipients","summary":"Add people to the order (up to 25 in all).","description":"Body: JSON (Content-Type: application/json), up to 128 KB.","tags":["Batches"],"parameters":[{"name":"batch_id","in":"path","required":true,"description":"The batch id from POST /v1/batches.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddBatchRecipientsRequest"}}}},"responses":{"200":{"description":"People added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddBatchRecipientsResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed, address_undeliverable. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed","address_undeliverable"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{batch_id}/recipients/{recipient_id}":{"post":{"operationId":"update_batch_recipient","summary":"Change one person: address, greeting name or their own wording.","description":"Body: JSON (Content-Type: application/json), up to 128 KB.","tags":["Batches"],"parameters":[{"name":"batch_id","in":"path","required":true,"description":"The batch id from POST /v1/batches.","schema":{"type":"string","format":"uuid"}},{"name":"recipient_id","in":"path","required":true,"description":"The person's recipient_id.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBatchRecipientRequest"}}}},"responses":{"200":{"description":"The person changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBatchRecipientResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed, address_undeliverable. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed","address_undeliverable"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{batch_id}/recipients/{recipient_id}/remove":{"post":{"operationId":"remove_batch_recipient","summary":"Remove one person from the order.","description":"Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Batches"],"parameters":[{"name":"batch_id","in":"path","required":true,"description":"The batch id from POST /v1/batches.","schema":{"type":"string","format":"uuid"}},{"name":"recipient_id","in":"path","required":true,"description":"The person's recipient_id.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchLookupRequest"}}}},"responses":{"200":{"description":"The person removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveBatchRecipientResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{batch_id}/preview":{"post":{"operationId":"preview_batch","summary":"Proof everyone who needs a new proof, in the background.","description":"Proof step for several people. Answers 202 at once: poll POST /v1/batches/{batch_id}/status every poll_after_ms until the round is done. Each person is screened and gets a final print proof; one email with every person's page images, without the price, goes to the customer. Show every person's pages and the total before asking for the user's yes. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Batches"],"parameters":[{"name":"batch_id","in":"path","required":true,"description":"The batch id from POST /v1/batches.","schema":{"type":"string","format":"uuid"}},{"name":"x-turnstile-token","in":"header","required":false,"description":"Website only: the priorityonly.com order form's Cloudflare Turnstile token, required on calls without sign-in from that page while the spam check is on. Other callers don't send it.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchLookupRequest"}}}},"responses":{"202":{"description":"Rendering started (or nothing needed a new proof).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewBatchResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled, captcha_required, captcha_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled","captcha_required","captcha_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, captcha_unavailable, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","captcha_unavailable","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{batch_id}/recipients/{recipient_id}/preview":{"post":{"operationId":"preview_batch_recipient","summary":"Proof one person now, like preview_letter.","description":"Screens and renders this person's piece and emails its page images, without the price. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Batches"],"parameters":[{"name":"batch_id","in":"path","required":true,"description":"The batch id from POST /v1/batches.","schema":{"type":"string","format":"uuid"}},{"name":"recipient_id","in":"path","required":true,"description":"The person's recipient_id.","schema":{"type":"string","format":"uuid"}},{"name":"x-turnstile-token","in":"header","required":false,"description":"Website only: the priorityonly.com order form's Cloudflare Turnstile token, required on calls without sign-in from that page while the spam check is on. Other callers don't send it.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchLookupRequest"}}}},"responses":{"201":{"description":"A new proof for this person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewBatchRecipientResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled, captcha_required, captcha_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled","captcha_required","captcha_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"held_for_review. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["held_for_review"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed, content_rejected. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed","content_rejected"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, captcha_unavailable, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","captcha_unavailable","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{batch_id}/status":{"post":{"operationId":"batch_status","summary":"Everyone's state and current proof, the total, and whether the order is ready for the user's yes.","description":"Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Batches"],"parameters":[{"name":"batch_id","in":"path","required":true,"description":"The batch id from POST /v1/batches.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchLookupRequest"}}}},"responses":{"200":{"description":"The batch's state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchStatusResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/batches/{batch_id}/checkout":{"post":{"operationId":"checkout_batch","summary":"Pay step for several people: one Stripe Checkout link for every piece (paying approves them).","description":"Always show every page of the final print proof and the total price, tell the customer \"Paying approves this exact letter. You can cancel until it goes to print; after that it's final.\", and get an explicit \"yes\" before calling checkout. Before asking for the yes, tell the customer the estimated arrival for each recipient (from delivery_estimate.summary), together with the preview images and total price. For several people: show every person's proof pages, their estimated arrival (recipients[].delivery_estimate.summary) and the total from batch_status, and get an explicit yes. Pass every person's current proof_id, the count and the total, the user's own words as user_confirmation and, without sign-in, the latest preview's approval_token (don't share it). A changed person, or a missing or old token, returns proof_stale (details.recipient_ids); a different count or total price_mismatch. Pieces held for review are split out and paid separately once cleared; if every piece is held, held_for_review. Card details never reach Priority Only. Paying approves every piece's final print proof. Until they go to print, the user can cancel single pieces (POST /v1/orders/{order_id}/cancel) or the whole order (POST /v1/order-groups/{order_group_id}/cancel): the hold is released for them, nothing charged; once they go to print they are final. Redesign: when a piece's stored print file failed a check before printing, pass the earlier order_group_id as redesign_group_id. At the same or a lower total the new order takes over its card hold (checkout_url null; only the new total is charged when it goes to print); a higher total releases it (nothing charged) and a new payment page opens. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Batches"],"parameters":[{"name":"batch_id","in":"path","required":true,"description":"The batch id from POST /v1/batches.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutBatchRequest"}}}},"responses":{"200":{"description":"The Stripe Checkout link and each piece's private tracking link.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutBatchResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"proof_stale, proof_expired, price_mismatch, held_for_review, not_available. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["proof_stale","proof_expired","price_mismatch","held_for_review","not_available"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed, confirmation_required. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed","confirmation_required"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-openai-isConsequential":true}},"/v1/order-groups/{order_group_id}/status":{"post":{"operationId":"order_group_status","summary":"Every piece of an order to several people: status, approval state and private tracking link.","description":"approval_state says where the whole order is after payment (approved: paid and approved, going to print, cancellable until then); each piece's details are in POST /v1/orders/{order_id}/status. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Batches"],"parameters":[{"name":"order_group_id","in":"path","required":true,"description":"The order_group_id from the batch checkout.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchLookupRequest"}}}},"responses":{"200":{"description":"Every piece's status and the order's approval state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderGroupStatusResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/order-groups/{order_group_id}/cancel":{"post":{"operationId":"cancel_order_group","summary":"Cancel every piece whose final print proof isn't approved yet.","description":"Each piece cancelled before its final print proof is approved is not charged (the card hold is released); without sign-in, a paid order also needs approval_token (the batch preview's). Approved pieces are final and can't be cancelled or refunded (their result says so). To leave out one piece of a paid order before approving, use POST /v1/orders/{order_id}/cancel with its order_id. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Batches"],"parameters":[{"name":"order_group_id","in":"path","required":true,"description":"The order_group_id from the batch checkout.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderGroupRequest"}}}},"responses":{"200":{"description":"What was cancelled (nothing charged for pieces not approved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderGroupResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-openai-isConsequential":true}},"/v1/order-groups/{order_group_id}/decision":{"post":{"operationId":"decide_order_group","summary":"Older orders to several people only: one decision on every piece's final print proof.","description":"A new order is approved by paying; this is only for older orders waiting for a separate approval. Show the user every piece's final print proof first (each piece's POST /v1/orders/{order_id}/status has its page images), then pass their own decision: approve or reject. Never decide for them. approve: the card is charged (charge_notice; charged_cents in the answer), and the order is final (older orders waiting for a separate approval; a new order is approved by paying, so approve answers already: true). If the card can't be charged, the answer is payment_required: the order is closed, nothing is charged, and the user orders again; not_available: the payment provider couldn't be reached, try again. reject: nothing is charged (the card hold is released), nothing is mailed, and the letter can be changed and proofed again; the Cancel link of a paid order sends reject until it goes to print. For an order to several people, one approval covers every piece still waiting. A repeated call changes nothing (already: true). final_proof_not_ready: there is nothing to decide yet (not paid, or a redesign is needed). approved_final: a reject (cancel) after the order went to print. Without sign-in, pass customer_email and the approval_token the batch checkout was made with (don't share it). The MCP tool approve_print does this with order_group_id. Body: JSON (Content-Type: application/json), up to 16 KB.","tags":["Approve"],"parameters":[{"name":"order_group_id","in":"path","required":true,"description":"The order_group_id from the batch checkout.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionRequest"}}}},"responses":{"200":{"description":"The decision's result for every piece and the final proof view.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"400":{"description":"validation_failed: the body is not valid JSON.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unauthorized"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"payment_required. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payment_required"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"forbidden_origin, agent_access_disabled. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["forbidden_origin","agent_access_disabled"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["not_found"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"final_proof_not_ready, approved_final, not_available. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["final_proof_not_ready","approved_final","not_available"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["payload_too_large"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"unsupported_media_type. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["unsupported_media_type"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_failed. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["validation_failed"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["rate_limited"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"internal. See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["internal"],"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"api_disabled, internal (sign-in could not be checked). See the ErrorCode schema or /docs/agents/#errors.","x-error-codes":["api_disabled","internal"],"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-openai-isConsequential":true}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Optional. An OAuth 2.1 access token from the same sign-in as the MCP connector (authorization code with PKCE); the authorization server is listed at /.well-known/oauth-protected-resource on the API server. Without a token, calls are guest calls identified by customer_email."}},"schemas":{"MailClassId":{"type":"string","enum":["first_class","certified","certified_return_receipt"],"description":"USPS mail class. Certified classes include tracking and proof of mailing."},"OrderStatus":{"type":"string","enum":["draft","proofed","previewed","paid","final_proof_ready","redesign_needed","approved","submitted","printed","mailed","in_transit","delivered","returned","failed","held_for_review","cancelled"],"description":"draft -> previewed -> paid -> approved -> submitted -> printed -> mailed -> in_transit -> delivered | returned | failed | held_for_review | cancelled. previewed: checkout created after the user said yes to the final print proof and price. paid -> approved: on payment (paying approves the final print proof; one approval). approved: paid and approved, going to print; the card is held and charged when it goes to print, and the user can cancel until then (approved -> cancelled, the hold is released). submitted: sent to print; final. redesign_needed: the stored print file failed a check before printing; the user gets a new final print proof (card hold kept) or cancels (the hold is released, nothing charged). final_proof_ready and proofed: older orders only."},"ApprovalState":{"type":"string","enum":["awaiting_payment","preparing_final_proof","awaiting_approval","redesign_needed","on_hold","approved","cancelled","failed"],"description":"Where an order is in Proof -> Pay (paying is the approval). awaiting_payment: checkout made, not paid yet. preparing_final_proof: paid (the card is held, not charged); the payment is being confirmed (usually seconds). approved: paid and approved; it goes to print next and can be cancelled until then (the card is held and charged when it goes to print); once it goes to print it is final. awaiting_approval: older orders only, a final print proof waiting for the user's separate decision. redesign_needed: the stored print file failed a check before printing; the user makes a new final print proof (the card hold is kept) or cancels (the hold is released). on_hold: our team is taking a quick look. cancelled: nothing is mailed or charged (any card hold is released; a payment charged before card holds was refunded in full). failed: it could not be printed or mailed."},"FinalDecisionChoice":{"type":"string","enum":["approve","reject"],"description":"The user's own decision on the final print proof. approve: charges the card hold; final, it can't be changed, cancelled or refunded afterwards. reject: nothing is charged (the card hold is released), nothing is mailed."},"ErrorCode":{"type":"string","enum":["validation_failed","unauthorized","not_found","address_undeliverable","content_rejected","held_for_review","proof_not_approved","proof_stale","proof_expired","price_mismatch","confirmation_required","payment_required","past_print_cutoff","final_proof_not_ready","approved_final","rate_limited","not_available","internal","forbidden_origin","agent_access_disabled","captcha_required","captcha_failed","captcha_unavailable","api_disabled","method_not_allowed","unsupported_media_type","payload_too_large"],"description":"What each code means (HTTP status in brackets; what to do: /docs/agents/#errors). validation_failed [422]: A field is missing or malformed, including a call without sign-in that has no customer_email. The REST API lists each problem in details.issues as {path, message}, e.g. sender.address_zip or content.fields.key_dates.0.date (HTTP 400 when the body isn't JSON at all). Also approve_print without sign-in and without the approval_token the checkout was made with (details.reason is approval_token). unauthorized [401]: An invalid, expired or revoked OAuth token (only connectors that sign in send one; calls without a token are guest calls), or, on the REST API, a call without a token while guest calls are switched off. not_found [404]: The draft, proof or order doesn't exist, or belongs to another account or another customer_email. Both get the same answer. On the REST API, also an unknown endpoint. address_undeliverable [422]: create_draft (or create_card) found the sender's or recipient's address undeliverable; details.which lists which (sender, recipient). content_rejected [422]: The letter breaks the acceptable use policy (threats, harassment, impersonating a court or agency). held_for_review [409]: Content screening flagged the letter at preview_letter (no proof is made or emailed), or checkout found the order needs a person's review, for example many orders to one address (details.order_id). Nothing prints or is charged until a person reviews it. proof_not_approved [409]: checkout was called for a proof (the Design preview) that was never emailed to the user for review, or that the user hasn't said yes to. proof_stale [409]: The letter, address, mail class or price changed after this proof, a newer proof exists, or a call without sign-in didn't pass the preview's approval_token. proof_expired [409]: The proof (the Design preview, valid 24 hours) has expired. price_mismatch [409]: confirmed_total_cents isn't the proof's total; details.total_cents has the real total. confirmation_required [422]: user_confirmation isn't the user's own clear yes (for example a question, a hedge or an empty string). payment_required [402]: The order exists but has no checkout or payment yet. On a decision (approve): the card couldn't be charged when the user approved (the hold expired or the card was declined), so the order was NOT approved and is closed; nothing is charged or mailed. past_print_cutoff [409]: MCP connector only: schedule_card was called for a greeting card that is already with the printer, so its date can no longer change. (Cancelling or rejecting an approved order returns approved_final.) final_proof_not_ready [409]: A decision on the final print proof (approve_print, or another decision endpoint) came when there is nothing to approve: the order isn't paid yet, the final print proof is still being prepared (usually a few minutes), it didn't match the preview (a redesign is needed), our team is reviewing the order, or the order is already cancelled or failed. details.statuses lists the order statuses. approved_final [409]: The customer already approved the final print proof, so the order is final: cancel_letter, a reject or (MCP connector) a new card date was refused. Nothing changed. rate_limited [429]: A rate limit was hit (see Rate limits and screening). Includes details.retry_after_seconds; the REST API also sends retry_after and a Retry-After header. Nothing is charged. not_available [409]: The feature isn't switched on yet, for example paying for a greeting card before cards launch. On a decision (approve): our payment provider couldn't be reached to charge the card, so nothing was approved or charged. internal [500]: Something went wrong on our side. Nothing was charged. (HTTP 503 with this code means sign-in couldn't be checked right now.) forbidden_origin [403]: REST only: a call without sign-in from another website's page (an Origin header that isn't priorityonly.com). agent_access_disabled [403]: REST only: a call without sign-in and without an Origin header (a server, script or GPT Action) while server access is switched off. captcha_required [403]: REST only: a call without sign-in from the priorityonly.com order form, without the x-turnstile-token header, on a preview or quote request while the spam check is on. captcha_failed [403]: REST only: the spam-check token was invalid, expired or already used. captcha_unavailable [503]: REST only: the spam check couldn't be reached and the server is set to refuse in that case. api_disabled [503]: REST only: the API is paused. GET /v1/form-config still answers, with accepting_orders: false. The MCP connector is not affected. method_not_allowed [405]: REST only: the wrong HTTP method for this endpoint; the Allow header lists the right one. unsupported_media_type [415]: REST only: a POST without Content-Type: application/json. payload_too_large [413]: REST only: the body is over 16 KB (128 KB for /v1/drafts, /v1/drafts/{draft_id}, /v1/batches, /v1/batches/{batch_id}/content, /v1/batches/{batch_id}/recipients, /v1/batches/{batch_id}/recipients/{recipient_id})."},"Issue":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string","description":"Where the problem is, e.g. \"sender.address_zip\" or \"content.fields.key_dates.0.date\"."},"message":{"type":"string"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string","description":"Plain language, safe to show the user."},"retry_after":{"type":"integer","minimum":1,"description":"rate_limited: seconds to wait (also in the Retry-After header)."},"details":{"type":"object","additionalProperties":true,"description":"validation_failed: issues (Issue[]); held_for_review at checkout: order_id; price_mismatch: total_cents; address_undeliverable: which; final_proof_not_ready: statuses; approved_final: order_ids.","properties":{"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}}}}}}}},"Address":{"type":"object","description":"A US address.","required":["name","address_line1","address_city","address_state","address_zip"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200,"description":"Full name as it should appear on the envelope."},"company":{"type":"string","maxLength":200},"address_line1":{"type":"string","minLength":1,"maxLength":200},"address_line2":{"type":"string","maxLength":200},"address_city":{"type":"string","minLength":1,"maxLength":100},"address_state":{"type":"string","minLength":2,"maxLength":2,"description":"Two-letter US state code, e.g. TX."},"address_zip":{"type":"string","pattern":"^\\d{5}(-?\\d{4})?$","description":"5 digits or ZIP+4."},"address_country":{"type":"string","const":"US","default":"US","description":"Only US addresses are supported."}}},"NormalizedAddress":{"type":"object","required":["address_line1","address_city","address_state","address_zip"],"properties":{"address_line1":{"type":"string"},"address_line2":{"type":"string"},"address_city":{"type":"string"},"address_state":{"type":"string"},"address_zip":{"type":"string"}}},"FormConfig":{"type":"object","required":["accepting_orders","captcha","proof_emails_per_day","max_body_chars","cards_available"],"properties":{"accepting_orders":{"type":"boolean","description":"False when the API is paused or calls without sign-in are switched off."},"captcha":{"anyOf":[{"type":"object","required":["provider","site_key"],"properties":{"provider":{"type":"string","const":"turnstile"},"site_key":{"type":"string"}},"description":"The website's spam check (Cloudflare Turnstile); null when it is off."},{"type":"null"}]},"proof_emails_per_day":{"type":"integer","description":"Proof emails one inbox can get per day."},"max_body_chars":{"type":"integer","description":"Longest plain letter (characters)."},"cards_available":{"type":"boolean","description":"Greeting-card checkout is on."},"earliest_deliver_by":{"type":"string","format":"date","description":"Earliest card deliver-by date accepted right now for the 48 contiguous states and DC (we release a card to the printer about 4 business days before the date)."},"earliest_deliver_by_far":{"type":"string","format":"date","description":"The same for Alaska, Hawaii, US territories and military addresses (about 10 business days before the date)."},"earliest_mail_date":{"type":"string","format":"date","description":"The earliest day something paid and approved now would be mailed. For planning only: tell customers the estimated arrival, never a release or print time."}}},"Options":{"type":"object","required":["mail_classes","template_letter_cents","included_pages","extra_page_cents","currency"],"description":"Amounts are in US cents.","properties":{"mail_classes":{"type":"array","items":{"type":"object","required":["id","name","description","price_cents"],"properties":{"id":{"$ref":"#/components/schemas/MailClassId"},"name":{"type":"string"},"description":{"type":"string"},"price_cents":{"type":"integer","minimum":0}}}},"template_letter_cents":{"type":"integer","description":"A template letter (always sent Certified Mail + electronic return receipt).","examples":[1999]},"included_pages":{"type":"integer","examples":[2]},"extra_page_cents":{"type":"integer","examples":[100]},"currency":{"type":"string","const":"usd"}}},"TemplateField":{"type":"object","description":"One template field: the key in content.fields (or a fill-in link's fields), with everything a form needs to build and check it.","required":["name","label","type","required"],"properties":{"name":{"type":"string","description":"Key in content.fields."},"label":{"type":"string"},"type":{"type":"string","enum":["text","long_text","date","money","enum","boolean","text_list","list"]},"required":{"type":"boolean"},"help":{"type":"string","description":"What to enter, with the format."},"description":{"type":"string"},"options":{"type":"array","items":{"type":"string"},"description":"enum: allowed values."},"max_length":{"type":"integer","description":"text, long_text, text_list items."},"max_items":{"type":"integer","description":"list, text_list."},"item_fields":{"type":"array","items":{"$ref":"#/components/schemas/TemplateField"},"description":"list: the fields of each item (an array of objects)."}}},"Template":{"type":"object","required":["id","name","category","summary","price_cents","mail_class","recipient_hint","fields"],"properties":{"id":{"type":"string","examples":["security-deposit-demand"]},"name":{"type":"string"},"category":{"type":"string","enum":["credit","debt","housing","consumer","insurance","business","employment"]},"summary":{"type":"string"},"price_cents":{"type":"integer","examples":[1999]},"mail_class":{"type":"string","const":"certified_return_receipt"},"recipient_hint":{"type":"string","description":"Who the recipient should be."},"fields":{"type":"array","items":{"$ref":"#/components/schemas/TemplateField"}}}},"TemplateList":{"type":"object","required":["templates","disclaimer"],"properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/Template"}},"disclaimer":{"type":"string","description":"Templates are general forms, not legal advice. Show this to the user."}}},"CardField":{"type":"object","description":"A field the user can tailor on this card design.","required":["id","label","kind","required"],"properties":{"id":{"type":"string","description":"Key in fields of POST /v1/cards."},"label":{"type":"string"},"kind":{"type":"string","enum":["text","choice"]},"required":{"type":"boolean"},"required_when":{"type":"object","required":["field","equals"],"properties":{"field":{"type":"string"},"equals":{"type":"string"}},"description":"Required only when another field has this value."},"max_length":{"type":"integer"},"max_lines":{"type":"integer"},"default":{"type":["string","null"],"description":"Used when the field is left out."},"suggestions":{"type":"array","items":{"type":"string"}},"options":{"type":"array","items":{"type":"object","required":["value","label"],"properties":{"value":{"type":"string"},"label":{"type":"string"}}},"description":"choice: send one of the values."},"help":{"type":"string"}}},"CardDesign":{"type":"object","required":["id","occasion","occasion_name","name","style","price_cents","fields","thumbnail_url"],"properties":{"id":{"type":"string"},"occasion":{"type":"string"},"occasion_name":{"type":"string"},"name":{"type":"string"},"style":{"type":"string"},"price_cents":{"type":"integer"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/CardField"},"description":"Ask the user only for these; leave a field out to use its default."},"thumbnail_url":{"type":"string","format":"uri","description":"Small PNG of the front (GET /v1/card-designs/{design_id}/thumbnail.png)."}}},"CardDesignList":{"type":"object","required":["occasions","designs","price_cents","currency","mail_class","mail_lead_business_days"],"description":"Amounts are in US cents.","properties":{"occasions":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"designs":{"type":"array","items":{"$ref":"#/components/schemas/CardDesign"}},"price_cents":{"type":"integer","examples":[499]},"currency":{"type":"string","const":"usd"},"mail_class":{"type":"string","const":"first_class"},"mail_lead_business_days":{"type":"integer","description":"We release a card to the printer about this many business days before its deliver-by date (48 contiguous states and DC)."},"mail_lead_business_days_far":{"type":"integer","description":"The same for Alaska, Hawaii, US territories and military addresses."}}},"DeliveryEstimate":{"type":"object","required":["region","mail_date","arrives_from","arrives_to","aim_by","too_soon","pay_by","summary"],"description":"Estimated arrival for one address, assuming the order is paid and its final print proof approved by pay_by. Tell the customer the summary; never a release or print time. USPS doesn't guarantee delivery dates.","properties":{"region":{"type":"string","enum":["standard","far"],"description":"\"standard\": the 48 contiguous states and DC; \"far\": Alaska, Hawaii, US territories and military addresses."},"mail_date":{"type":"string","format":"date","description":"The day we expect to mail it."},"arrives_from":{"type":"string","format":"date","description":"Estimated arrival, earliest."},"arrives_to":{"type":"string","format":"date","description":"Estimated arrival, latest."},"aim_by":{"type":["string","null"],"format":"date","description":"A card's deliver-by date, when one is set."},"too_soon":{"type":"boolean","description":"aim_by can no longer be met."},"pay_by":{"type":"string","format":"date-time","description":"The estimate holds if the order is paid and its final print proof approved by this time. Internal timing: don't tell the customer this time as a deadline or release time."},"summary":{"type":"string","description":"One plain sentence to tell the customer as is.","examples":["If you pay today, we mail it on Monday, November 23 and it should arrive between Wednesday, November 25 and Tuesday, December 1 (USPS doesn't guarantee delivery dates)."]}}},"VerifyAddressRequest":{"type":"object","required":["address"],"properties":{"address":{"$ref":"#/components/schemas/Address"}}},"VerifyAddressResponse":{"type":"object","required":["deliverable","deliverability","normalized"],"properties":{"deliverable":{"type":"boolean"},"deliverability":{"type":"string","description":"e.g. \"deliverable\", \"deliverable_missing_unit\", \"undeliverable\"."},"normalized":{"anyOf":[{"$ref":"#/components/schemas/NormalizedAddress"},{"type":"null"}]},"reason":{"type":"string"},"delivery_estimate":{"$ref":"#/components/schemas/DeliveryEstimate","description":"Deliverable addresses: the estimated arrival if a letter to it were paid and approved now."}}},"FieldValue":{"description":"Text, a number, true/false, or a list (of text for text_list fields, of small objects for list fields). Dates YYYY-MM-DD; amounts like 1850 or \"1850.00\".","anyOf":[{"type":"string","maxLength":20000},{"type":"number"},{"type":"boolean"},{"type":"array","maxItems":50,"items":{"anyOf":[{"type":"string","maxLength":2000},{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":2000},{"type":"number"},{"type":"boolean"}]}}]}}]},"BodyContent":{"type":"object","required":["kind","body_text"],"properties":{"kind":{"type":"string","const":"body"},"body_text":{"type":"string","minLength":1,"maxLength":20000,"description":"The letter's text, written for the user. Plain text, printed in our standard letter layout."}}},"TemplateContent":{"type":"object","required":["kind","template_id","fields"],"properties":{"kind":{"type":"string","const":"template"},"template_id":{"type":"string","minLength":1,"maxLength":100,"description":"An id from GET /v1/templates."},"fields":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/FieldValue"},"description":"Values for the template's fields, keyed by fields[].name."}}},"CreateDraftRequest":{"type":"object","required":["sender","recipient","content","mail_class"],"description":"Content is one of our templates plus field values, or plain body text in our standard layout. Customer-supplied files and designs are not accepted; use POST /v1/quote-requests for custom work.","properties":{"sender":{"$ref":"#/components/schemas/Address"},"recipient":{"$ref":"#/components/schemas/Address"},"content":{"oneOf":[{"$ref":"#/components/schemas/BodyContent"},{"$ref":"#/components/schemas/TemplateContent"}],"discriminator":{"propertyName":"kind","mapping":{"body":"#/components/schemas/BodyContent","template":"#/components/schemas/TemplateContent"}}},"mail_class":{"$ref":"#/components/schemas/MailClassId","description":"Template letters always go Certified Mail + electronic return receipt, whatever is sent here."},"title":{"type":"string","maxLength":200,"description":"Optional, for the user's history."},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The customer's email address, when calling without sign-in. Ask the user for it: the proof is emailed there for review, and the same address identifies their letters and orders on later calls. No account or password. Leave it out when signed in."},"promo_code":{"type":"string","maxLength":64,"description":"Optional partner or friend code the user gave you. It never lowers the price: on the user's first letter it adds the free Follow-Through Pack, shown as $0.00 lines on the preview. You may ask once whether they have one; never push. An unknown code, or the user's own, is a 422 validation_failed on promo_code."}}},"CreateDraftResponse":{"type":"object","required":["draft_id","mail_class","sender_verified","recipient_verified","warnings","customer_email"],"properties":{"draft_id":{"type":"string","format":"uuid"},"mail_class":{"$ref":"#/components/schemas/MailClassId"},"sender_verified":{"type":"boolean"},"recipient_verified":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"string"}},"customer_email":{"type":["string","null"],"description":"The email this draft belongs to; pass it on every later call (null when signed in)."},"delivery_estimate":{"$ref":"#/components/schemas/DeliveryEstimate","description":"Estimated arrival if the order is paid and its final print proof approved by delivery_estimate.pay_by. Before asking for the customer's yes, tell them delivery_estimate.summary together with the preview images and total price; never a release or print time."}}},"UpdateDraftRequest":{"type":"object","description":"Only the fields that change. Content is one of our templates plus field values, or plain body text in our standard layout (the whole new text). The draft keeps its id; the next preview is a new version.","properties":{"sender":{"$ref":"#/components/schemas/Address"},"recipient":{"$ref":"#/components/schemas/Address"},"content":{"oneOf":[{"$ref":"#/components/schemas/BodyContent"},{"$ref":"#/components/schemas/TemplateContent"}],"discriminator":{"propertyName":"kind","mapping":{"body":"#/components/schemas/BodyContent","template":"#/components/schemas/TemplateContent"}}},"mail_class":{"$ref":"#/components/schemas/MailClassId","description":"Template letters always go Certified Mail + electronic return receipt."},"title":{"type":"string","maxLength":200},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"UpdateDraftResponse":{"type":"object","required":["draft_id","changed","mail_class","draft_text","next_version","sender_verified","recipient_verified","warnings"],"properties":{"draft_id":{"type":"string","format":"uuid"},"changed":{"type":"array","items":{"type":"string","enum":["sender","recipient","content","mail_class","title"]}},"mail_class":{"$ref":"#/components/schemas/MailClassId"},"draft_text":{"type":"string","description":"The updated letter as it will be printed (plain text). Show it to the user before previewing again."},"next_version":{"type":"integer","description":"The version the next preview makes; earlier proofs can no longer be paid for."},"sender_verified":{"type":"boolean"},"recipient_verified":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"string"}},"delivery_estimate":{"$ref":"#/components/schemas/DeliveryEstimate","description":"Estimated arrival if the order is paid and its final print proof approved by delivery_estimate.pay_by. Before asking for the customer's yes, tell them delivery_estimate.summary together with the preview images and total price; never a release or print time."}}},"PreviewRequest":{"type":"object","properties":{"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"ProofImage":{"type":"object","required":["page","url","expires_at"],"properties":{"page":{"type":"integer","minimum":1},"label":{"type":"string","description":"Cards: \"front\" or \"inside\"."},"url":{"type":"string","format":"uri","description":"Signed PNG link."},"expires_at":{"type":"string","format":"date-time"}}},"PriceLine":{"type":"object","required":["label","amount_cents"],"properties":{"label":{"type":"string"},"amount_cents":{"type":"integer"}}},"Proof":{"type":"object","required":["proof_id","version","page_count","images","price","emailed_to","expires_at","screening","approval_token"],"properties":{"proof_id":{"type":"string","format":"uuid"},"kind":{"type":"string","const":"card","description":"Greeting cards: \"card\"; absent for letters."},"version":{"type":"integer","minimum":1},"page_count":{"type":"integer","minimum":1},"images":{"type":"array","items":{"$ref":"#/components/schemas/ProofImage"},"description":"One image per page of the final print proof (cards: front and inside): the print partner's test render of the exact print file. Show every one to the user before asking for the yes; paying approves exactly this."},"price":{"type":"object","required":["lines","total_cents","currency"],"description":"Amounts are in US cents.","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/PriceLine"}},"total_cents":{"type":"integer","minimum":0},"currency":{"type":"string","const":"usd"}}},"emailed_to":{"type":"string","description":"Where the review email (page images only, without the price) went."},"expires_at":{"type":"string","format":"date-time","description":"Get the user's yes and call checkout before this time; after that, preview again."},"final_proof":{"type":"string","enum":["ready","pending"],"description":"\"ready\": the images are the final print proof. \"pending\": it is being prepared (no images yet); checkout refuses the proof with final_proof_not_ready until it is ready, and it is emailed to emailed_to then."},"preview_source":{"type":"string","enum":["provider","own"],"description":"\"provider\": the images are our print partner's test render of the letter (never printed); \"own\": its test system was unavailable, so they are our own render."},"screening":{"type":"string","enum":["allow","review"]},"template_notice":{"type":"string","description":"Template letters only: the print-only statement and the advice to have a lawyer review the letter before approving it. Show it to the user with the preview."},"approval_token":{"type":"string","description":"Random, for this client only: pass it back unchanged as approval_token at checkout (required without sign-in). Never emailed and never in a URL; keep it in memory and do not show or share it."},"delivery_estimate":{"$ref":"#/components/schemas/DeliveryEstimate","description":"Estimated arrival if the order is paid and its final print proof approved by delivery_estimate.pay_by. Before asking for the customer's yes, tell them delivery_estimate.summary together with the preview images and total price; never a release or print time."}}},"CheckoutRequest":{"type":"object","required":["proof_id","confirmed_total_cents","user_confirmation"],"properties":{"proof_id":{"type":"string","format":"uuid","description":"The final print proof (the letter's latest version) whose pages and total the user said yes to."},"confirmed_total_cents":{"type":"integer","minimum":1,"description":"Copied from the proof's price.total_cents (never computed), the total the user agreed to."},"user_confirmation":{"type":"string","minLength":1,"maxLength":500,"description":"The user's own explicit yes to this preview and price, e.g. \"yes, send it\" (the order form sends its button label, \"Yes, the preview and the total of $19.99 are right\")."},"approval_token":{"type":"string","minLength":1,"maxLength":200,"description":"The approval_token from the preview that created this proof. Required without sign-in (a guest checkout without it, or with another one, returns proof_stale). Keep it for the decision on the final print proof. Don't share it."},"redesign_order_id":{"type":"string","format":"uuid","description":"A redesign: the earlier order whose final print proof didn't match its preview (approval_state redesign_needed). This new preview takes over its payment (a hold on the user's card): the same or a lower total needs no new payment (checkout_url is null; approving charges only the new total); a higher total releases the earlier hold and opens a new payment page."},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"CheckoutResponse":{"type":"object","required":["order_id","checkout_url","amount_cents","status","tracking_url","final_notice"],"properties":{"order_id":{"type":"string","format":"uuid"},"checkout_url":{"type":["string","null"],"format":"uri","description":"Stripe hosted Checkout. Send the user there; card details never reach us. Null for a redesign paid with the earlier payment (nothing more to pay)."},"amount_cents":{"type":"integer","description":"Exactly the total of the preview the user said yes to."},"status":{"$ref":"#/components/schemas/OrderStatus","description":"previewed until the payment completes; paid for a redesign paid with the earlier payment."},"tracking_url":{"type":"string","format":"uri","description":"The order's private tracking page (no sign-in needed). Give it to the user."},"final_notice":{"type":"string","description":"What paying means and what happens after payment (paying approves this exact letter; cancel until it goes to print). Tell the user with the payment link, before they pay.","examples":["Paying approves this exact letter. You can cancel until it goes to print; after that it's final. Your card is held now, not charged: it's charged when your order goes to print. If you cancel before then, the hold is released and nothing is charged. (A greeting card scheduled to mail more than 5 days from now is charged now and is final from now.) If we make a mistake, we reprint it free."]},"redesign":{"type":"object","required":["replaces_order_id","refunded_cents"],"description":"A redesign: the earlier order whose payment this one took over. refunded_cents is 0 for a card hold (nothing was charged); for a payment charged before card holds, the difference refunded.","properties":{"replaces_order_id":{"type":"string","format":"uuid"},"refunded_cents":{"type":"integer","minimum":0}}},"approve_url":{"type":"string","format":"uri","description":"A redesign paid with the earlier payment (checkout_url is null): the user's private page for approving the new final print proof once it is ready, the same link as in the final proof email. Give it only to the user."}}},"OrderLookupRequest":{"type":"object","properties":{"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"CancelOrderRequest":{"type":"object","properties":{"approval_token":{"type":"string","minLength":1,"maxLength":200,"description":"Without sign-in, for a paid order (card held, not approved yet): the approval_token the checkout was made with (the preview's; for one person of an order to several people, the batch preview's). Required then; without it the user can use the Reject button in the final proof email. Don't share it."},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"StatusEvent":{"type":"object","required":["at","description"],"properties":{"at":{"type":"string","format":"date-time"},"status":{"type":"string"},"description":{"type":"string"}}},"Status":{"type":"object","required":["order_id","status","tracking_number","expected_delivery_date","events","proof_of_mailing_url","return_receipt_url","tracking_url","usps_tracking_url","approval_state","final_proof_images","approve_by","next_step"],"properties":{"order_id":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/OrderStatus"},"approval_state":{"$ref":"#/components/schemas/ApprovalState"},"final_proof_images":{"type":"array","items":{"$ref":"#/components/schemas/ProofImage"},"description":"While approval_state is awaiting_approval: one image per page of the final print proof (signed links, valid about 24 hours; ask again for new ones). Show every page to the user before asking them to approve or reject. Empty otherwise."},"approve_by":{"type":["string","null"],"format":"date","description":"While awaiting approval: the last day to approve (US Central). After it the card hold is released and nothing is mailed or charged. Null otherwise."},"next_step":{"type":"string","description":"One sentence: what the user, or you, should do next.","examples":["Payment received. We're preparing the final print proof (usually a few minutes; we also email it). Call get_status again shortly, then show the user every page of it."]},"order_group_id":{"type":["string","null"],"format":"uuid","description":"Set when this is one piece of an order to several people: it is approved or rejected together with its group (POST /v1/order-groups/{order_group_id}/decision)."},"tracking_number":{"type":["string","null"]},"expected_delivery_date":{"type":["string","null"],"format":"date"},"events":{"type":"array","items":{"$ref":"#/components/schemas/StatusEvent"},"description":"Newest first."},"proof_of_mailing_url":{"type":["string","null"],"format":"uri"},"return_receipt_url":{"type":["string","null"],"format":"uri"},"tracking_url":{"type":"string","format":"uri","description":"The order's private tracking page (no sign-in needed)."},"usps_tracking_url":{"type":["string","null"],"format":"uri"},"delivery_estimate":{"anyOf":[{"$ref":"#/components/schemas/DeliveryEstimate","description":"Before it is mailed: the estimated arrival (null once mailed, cancelled or failed)."},{"type":"null"}]}}},"CancelResult":{"type":"object","required":["order_id","cancelled","status","message"],"properties":{"order_id":{"type":"string","format":"uuid"},"cancelled":{"type":"boolean"},"status":{"$ref":"#/components/schemas/OrderStatus"},"message":{"type":"string","description":"What happened, to show the user."}}},"DecisionRequest":{"type":"object","required":["decision"],"properties":{"decision":{"$ref":"#/components/schemas/FinalDecisionChoice"},"approval_token":{"type":"string","minLength":1,"maxLength":200,"description":"Without sign-in: the approval_token the checkout was made with (the preview's). Required then; without it the user can decide with the Approve or Reject button in the final proof email. Don't share it."},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"SessionDecisionRequest":{"type":"object","required":["decision"],"properties":{"decision":{"$ref":"#/components/schemas/FinalDecisionChoice"},"order_id":{"type":"string","format":"uuid","description":"An order to several people, with reject only: leave out this one piece (left out of the one charge on approval) before the order is approved, where its can_drop is true. Without it, the decision covers every piece."}}},"DecisionLinkRequest":{"type":"object","required":["t","decision"],"properties":{"t":{"type":"string","minLength":1,"maxLength":200,"description":"The token of the link in the customer's email. It is the customer's own secret: never ask for it, log it or share it."},"decision":{"$ref":"#/components/schemas/FinalDecisionChoice"},"order_id":{"type":"string","format":"uuid","description":"An order to several people, with reject only: leave out this one piece (left out of the one charge on approval) before the order is approved, where its can_drop is true. Without it, the decision covers every piece."}}},"FinalProofPiece":{"type":"object","required":["order_id","name","city_state","status","approval_state","price_cents","images","can_drop","template_notice"],"description":"One piece's final print proof (an order to several people has one per person).","properties":{"order_id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The recipient's name."},"city_state":{"type":"string","description":"The recipient's city and state, e.g. \"Austin, TX\"."},"status":{"$ref":"#/components/schemas/OrderStatus"},"approval_state":{"$ref":"#/components/schemas/ApprovalState"},"price_cents":{"type":"integer","description":"What was paid for this piece."},"images":{"type":"array","items":{"$ref":"#/components/schemas/ProofImage"},"description":"While awaiting approval: one image per page of the print partner's test render of the exact print file (signed links, valid about 24 hours; get the view again for new ones). Page images only, never a PDF. Empty otherwise."},"can_drop":{"type":"boolean","description":"An order to several people before its approval: this piece can be left out (reject with its order_id); it is left out of the one charge on approval."},"template_notice":{"type":["string","null"],"description":"Template letters: the print-only statement and the advice to have a lawyer review the letter. Show it next to Approve. Null otherwise."}}},"FinalProofView":{"type":"object","required":["order_id","order_group_id","what","approval_state","message","pieces","total_cents","can_approve","can_reject","approve_by","approve_by_at","final_notice","template_notice","estimated_arrival","tracking_url","poll_after_ms"],"description":"The final print proof and where the decision stands. Amounts are in US cents.","properties":{"order_id":{"type":["string","null"],"format":"uuid","description":"One order; null for an order to several people."},"order_group_id":{"type":["string","null"],"format":"uuid","description":"An order to several people; null for a single order."},"what":{"type":"string","enum":["letter","card"]},"approval_state":{"$ref":"#/components/schemas/ApprovalState"},"message":{"type":"string","description":"One plain sentence for the customer."},"pieces":{"type":"array","items":{"$ref":"#/components/schemas/FinalProofPiece"},"description":"Every piece still in the order (one for a single order)."},"total_cents":{"type":"integer","description":"What was paid in all."},"can_approve":{"type":"boolean","description":"Approve is possible: every piece's final print proof is ready. One approval covers every piece and is final."},"can_reject":{"type":"boolean","description":"Reject (cancel: nothing is charged, the card hold is released) is possible: until the order is approved, also when a redesign is needed."},"approve_by":{"type":["string","null"],"format":"date","description":"While awaiting approval: the last day to approve (US Central). After it the card hold is released and nothing is mailed or charged."},"approve_by_at":{"type":["string","null"],"format":"date-time","description":"The same deadline as an instant."},"final_notice":{"type":"string","description":"Show it next to the Approve button.","examples":["Once you approve, your letter is final and can't be changed or cancelled."]},"charge_notice":{"type":"string","description":"Card holds: payment only held the card; Approve charges it total_cents. Show it next to the Approve button, after final_notice.","examples":["Approving charges your card $4.99."]},"hold_expires_at":{"type":["string","null"],"format":"date-time","description":"When the hold on the card lapses; the order is closed (nothing charged) 24 hours before if it isn't approved. Null once charged."},"template_notice":{"type":["string","null"],"description":"Template letters: the print-only statement and the advice to have a lawyer review the letter. Show it next to Approve. Null otherwise."},"estimated_arrival":{"type":["string","null"],"description":"The estimated arrival in one sentence (if approved today, or once approved). Never a release or print time."},"tracking_url":{"type":["string","null"],"format":"uri","description":"The order's private tracking page (single orders)."},"poll_after_ms":{"type":["integer","null"],"description":"While approval_state is preparing_final_proof: ask again after this many milliseconds (3000). Null otherwise."},"edit":{"oneOf":[{"$ref":"#/components/schemas/FinalProofEdit"},{"type":"null"}],"description":"Only on these two views (the payment success page and the decision link), once the order is cancelled or needs a redesign: what was ordered, so the customer can change it and make a new preview. Absent otherwise."}},"examples":[{"order_id":null,"order_group_id":"5b9f2d1c-3a47-4e0b-8f6d-9c2e7a1b4d30","what":"letter","approval_state":"awaiting_approval","message":"Here is the final print proof of your letters. Check every page, then approve or reject it.","pieces":[{"order_id":"0c7e4a9d-51b2-4f38-a6de-3f1b8c2d7e90","name":"Sam Rivera","city_state":"Austin, TX","status":"final_proof_ready","approval_state":"awaiting_approval","price_cents":499,"images":[{"page":1,"url":"https://files.example.com/final-proof/1/page-01.png","expires_at":"2026-11-21T21:14:00.000Z"}],"can_drop":true,"template_notice":null},{"order_id":"9a3d6f10-7c2b-4e85-b1f4-6d0e2c8a5b17","name":"Dana Wu","city_state":"Portland, OR","status":"final_proof_ready","approval_state":"awaiting_approval","price_cents":499,"images":[{"page":1,"url":"https://files.example.com/final-proof/2/page-01.png","expires_at":"2026-11-21T21:14:00.000Z"}],"can_drop":true,"template_notice":null}],"total_cents":998,"can_approve":true,"can_reject":true,"approve_by":"2026-11-25","approve_by_at":"2026-11-25T21:14:00.000Z","final_notice":"Once you approve, your letter is final and can't be changed or cancelled.","charge_notice":"Approving charges your card $9.98.","hold_expires_at":"2026-11-29T15:02:00.000Z","template_notice":null,"estimated_arrival":"If you approve the final print proof today, we mail it on Monday, November 23 and it should arrive between Wednesday, November 25 and Tuesday, December 1 (USPS doesn't guarantee delivery dates).","tracking_url":null,"poll_after_ms":null}]},"FinalProofEdit":{"type":"object","required":["what","order_id","order_group_id","batch_id","customer_email","sender","recipients","mail_class","add_ons","content","mail_by"],"description":"An order's inputs (one order, or an order to several people with its batch): change them and make a new final print proof.","properties":{"what":{"type":"string","enum":["letter","card"]},"order_id":{"type":["string","null"],"format":"uuid"},"order_group_id":{"type":["string","null"],"format":"uuid"},"batch_id":{"type":["string","null"],"format":"uuid"},"customer_email":{"type":["string","null"]},"sender":{"$ref":"#/components/schemas/Address"},"recipients":{"type":"array","items":{"type":"object","required":["address","recipient_id","ref","greeting_name","override"],"properties":{"address":{"$ref":"#/components/schemas/Address"},"recipient_id":{"type":["string","null"]},"ref":{"type":["string","null"]},"greeting_name":{"type":["string","null"]},"override":{"type":["string","null"]}}}},"mail_class":{"$ref":"#/components/schemas/MailClassId"},"add_ons":{"type":"array","items":{"type":"string"}},"content":{"oneOf":[{"$ref":"#/components/schemas/BodyContent"},{"$ref":"#/components/schemas/TemplateContent"},{"type":"object","required":["kind","design_id","occasion","fields","deliver_by"],"properties":{"kind":{"type":"string","const":"card"},"design_id":{"type":"string"},"occasion":{"type":["string","null"]},"fields":{"type":"object","additionalProperties":{"type":"string"}},"deliver_by":{"type":["string","null"],"format":"date"}}}]},"mail_by":{"type":["string","null"],"format":"date"}}},"DecisionResponse":{"type":"object","required":["decision","result","already","message","order_ids","order_group_id","refunded_cents","refund_pending_cents","estimated_arrival","final_proof"],"description":"The answer to a decision on the final print proof. Amounts are in US cents.","properties":{"decision":{"$ref":"#/components/schemas/FinalDecisionChoice"},"result":{"type":"string","enum":["approved","rejected"],"description":"approved: final, the card was charged, it goes to print. rejected: cancelled, nothing charged (the card hold is released); nothing is mailed."},"already":{"type":"boolean","description":"It was already decided this way; the repeated call changed nothing."},"message":{"type":"string","description":"What happened, to show the user."},"order_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The orders this decision covered."},"order_group_id":{"type":["string","null"],"format":"uuid"},"refunded_cents":{"type":"integer","description":"reject of a payment charged before card holds: refunded to the original payment method. 0 for a card hold (released, nothing charged)."},"refund_pending_cents":{"type":"integer","description":"reject: a refund that could not be issued automatically; our team issues it within one business day."},"charged_cents":{"type":"integer","description":"approve: what was charged to the card (the hold captured). 0 for a reject."},"estimated_arrival":{"type":["string","null"],"description":"approve, single orders: the estimated arrival in one sentence. Never a release or print time."},"final_proof":{"$ref":"#/components/schemas/FinalProofView"}},"examples":[{"decision":"approve","result":"approved","already":false,"message":"Approved: the letters are final and can't be changed or cancelled. The card was charged $9.98. We send them to print and email the user when they are in the mail.","order_ids":["0c7e4a9d-51b2-4f38-a6de-3f1b8c2d7e90","9a3d6f10-7c2b-4e85-b1f4-6d0e2c8a5b17"],"order_group_id":"5b9f2d1c-3a47-4e0b-8f6d-9c2e7a1b4d30","refunded_cents":0,"refund_pending_cents":0,"charged_cents":998,"estimated_arrival":null,"final_proof":{"order_id":null,"order_group_id":"5b9f2d1c-3a47-4e0b-8f6d-9c2e7a1b4d30","what":"letter","approval_state":"approved","message":"You approved it: your letters are final. We'll email you when they are in the mail.","pieces":[{"order_id":"0c7e4a9d-51b2-4f38-a6de-3f1b8c2d7e90","name":"Sam Rivera","city_state":"Austin, TX","status":"approved","approval_state":"approved","price_cents":499,"images":[],"can_drop":false,"template_notice":null},{"order_id":"9a3d6f10-7c2b-4e85-b1f4-6d0e2c8a5b17","name":"Dana Wu","city_state":"Portland, OR","status":"approved","approval_state":"approved","price_cents":499,"images":[],"can_drop":false,"template_notice":null}],"total_cents":998,"can_approve":false,"can_reject":false,"approve_by":null,"approve_by_at":null,"final_notice":"Once you approve, your letter is final and can't be changed or cancelled.","charge_notice":"Approving charges your card $9.98.","hold_expires_at":"2026-11-29T15:02:00.000Z","template_notice":null,"estimated_arrival":"We mail it on Monday, November 23 and it should arrive between Wednesday, November 25 and Tuesday, December 1 (USPS doesn't guarantee delivery dates).","tracking_url":null,"poll_after_ms":null}}]},"QuoteRequest":{"type":"object","required":["description","contact_email"],"properties":{"description":{"type":"string","minLength":1,"maxLength":5000,"description":"What the customer needs (custom design, unusual format, bulk mailing, ...)."},"contact_email":{"type":"string","format":"email","maxLength":320,"description":"Where we reply."},"draft_id":{"type":"string","format":"uuid","description":"Optional related draft."},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The user's email address, if it differs from contact_email (without it, contact_email is used). Leave it out when signed in."}}},"QuoteResponse":{"type":"object","required":["quote_request_id","status"],"properties":{"quote_request_id":{"type":"string"},"status":{"type":"string","const":"new"}}},"CreateCardRequest":{"type":"object","required":["design_id","sender","recipient"],"description":"A card is one of our designs plus values for that design's own fields. There is no input for a file, photo, logo or URL.","properties":{"design_id":{"type":"string","minLength":1,"maxLength":100,"description":"A design id from GET /v1/card-designs."},"fields":{"type":"object","additionalProperties":{"type":"string","maxLength":2000},"description":"Values for THIS design's fields, by field id. Leave a field out to use its default."},"sender":{"$ref":"#/components/schemas/Address"},"recipient":{"$ref":"#/components/schemas/Address"},"deliver_by":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Optional YYYY-MM-DD the card should arrive. We release it to the printer about 4 business days before the date (about 10 for Alaska, Hawaii, US territories and military addresses); too-soon dates are refused with the earliest possible date."},"title":{"type":"string","maxLength":200},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The customer's email address, when calling without sign-in. Ask the user for it: the proof is emailed there for review, and the same address identifies their letters and orders on later calls. No account or password. Leave it out when signed in."}}},"CreateCardResponse":{"type":"object","required":["draft_id","design_id","deliver_by","mail_by","customer_email","fields","mail_class","sender_verified","recipient_verified","warnings"],"properties":{"draft_id":{"type":"string","format":"uuid"},"design_id":{"type":"string"},"deliver_by":{"type":["string","null"],"format":"date"},"mail_by":{"type":["string","null"],"format":"date"},"customer_email":{"type":["string","null"]},"fields":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"Every field of the design as it will print (defaults applied)."},"mail_class":{"type":"string","const":"first_class"},"sender_verified":{"type":"boolean"},"recipient_verified":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"string"}},"delivery_estimate":{"$ref":"#/components/schemas/DeliveryEstimate","description":"Estimated arrival if the order is paid and its final print proof approved by delivery_estimate.pay_by. Before asking for the customer's yes, tell them delivery_estimate.summary together with the preview images and total price; never a release or print time."}}},"BatchOverride":{"type":"object","description":"This person's own wording instead of the shared one.","properties":{"message":{"type":"string","maxLength":2000,"description":"Cards: their own message."},"body_text":{"type":"string","minLength":1,"maxLength":20000,"description":"Letters: their own text."}}},"BatchRecipientInput":{"type":"object","description":"One person: a new address, or (signed in only) a saved address by contact_id. Exactly one of the two.","properties":{"ref":{"type":"string","description":"Your own key for this row, echoed back (e.g. \"r1\")."},"address":{"$ref":"#/components/schemas/Address"},"contact_id":{"type":"string","description":"A saved address's id (signed-in callers only)."},"greeting_name":{"type":"string","maxLength":40,"description":"How the card or letter greets this person: \"Dear <greeting_name>,\". Default: their first name (or a title with the family name); \"\" for no greeting."},"override":{"$ref":"#/components/schemas/BatchOverride"}},"oneOf":[{"required":["address"]},{"required":["contact_id"]}]},"CardBatchContent":{"type":"object","required":["design_id"],"description":"One of our card designs for everyone. The message may use {{name}}.","properties":{"design_id":{"type":"string","minLength":1,"maxLength":100,"description":"A design id from GET /v1/card-designs."},"fields":{"type":"object","additionalProperties":{"type":"string","maxLength":2000},"description":"Values for the design's fields, by field id."},"deliver_by":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Optional YYYY-MM-DD every card should arrive; omit to mail them once paid."}}},"LetterBatchContent":{"type":"object","required":["body_text","mail_class"],"description":"A \"write my own\" letter for everyone (template letters go to one person each). body_text may use {{name}}. At most 10 pages per letter.","properties":{"body_text":{"type":"string","minLength":1,"maxLength":20000},"mail_class":{"$ref":"#/components/schemas/MailClassId"}}},"CreateCardBatchRequest":{"type":"object","required":["kind","sender","content","recipients"],"properties":{"kind":{"type":"string","const":"card"},"sender":{"$ref":"#/components/schemas/Address"},"content":{"$ref":"#/components/schemas/CardBatchContent"},"recipients":{"type":"array","minItems":1,"maxItems":25,"items":{"$ref":"#/components/schemas/BatchRecipientInput"}},"title":{"type":"string","maxLength":200},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The customer's email address, when calling without sign-in. Ask the user for it: the proof is emailed there for review, and the same address identifies their letters and orders on later calls. No account or password. Leave it out when signed in."}}},"CreateLetterBatchRequest":{"type":"object","required":["kind","sender","content","recipients"],"properties":{"kind":{"type":"string","const":"letter"},"sender":{"$ref":"#/components/schemas/Address"},"content":{"$ref":"#/components/schemas/LetterBatchContent"},"recipients":{"type":"array","minItems":1,"maxItems":25,"items":{"$ref":"#/components/schemas/BatchRecipientInput"}},"title":{"type":"string","maxLength":200},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The customer's email address, when calling without sign-in. Ask the user for it: the proof is emailed there for review, and the same address identifies their letters and orders on later calls. No account or password. Leave it out when signed in."}}},"CreateBatchRequest":{"oneOf":[{"$ref":"#/components/schemas/CreateCardBatchRequest"},{"$ref":"#/components/schemas/CreateLetterBatchRequest"}],"discriminator":{"propertyName":"kind","mapping":{"card":"#/components/schemas/CreateCardBatchRequest","letter":"#/components/schemas/CreateLetterBatchRequest"}}},"BatchRecipient":{"type":"object","required":["recipient_id","ref","name","city_state","greeting_name","has_override","warnings"],"properties":{"recipient_id":{"type":"string","description":"This person's piece (its draft id)."},"ref":{"type":["string","null"]},"name":{"type":"string"},"city_state":{"type":"string","examples":["Austin, TX"]},"greeting_name":{"type":["string","null"],"description":"Null: no greeting line."},"has_override":{"type":"boolean"},"warnings":{"type":"array","items":{"type":"string"}},"delivery_estimate":{"$ref":"#/components/schemas/DeliveryEstimate","description":"This person's estimated arrival (each address has its own). Tell the customer each person's summary before asking for their yes."}}},"CreateBatchResponse":{"type":"object","required":["batch_id","kind","mail_by","customer_email","recipients"],"properties":{"batch_id":{"type":"string"},"kind":{"type":"string","enum":["card","letter"]},"mail_by":{"type":["string","null"],"format":"date","description":"Cards with a deliver-by date: the first day any of them is mailed (cards to Alaska, Hawaii, US territories and military addresses go out earlier). Each person's dates are in their delivery_estimate."},"customer_email":{"type":["string","null"]},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/BatchRecipient"}}}},"UpdateBatchContentRequest":{"type":"object","required":["content"],"properties":{"content":{"anyOf":[{"$ref":"#/components/schemas/CardBatchContent"},{"$ref":"#/components/schemas/LetterBatchContent"}],"description":"The shared content again (same kind as the order)."},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"UpdateBatchContentResponse":{"type":"object","required":["batch_id","mail_by","recipients","revoked"],"properties":{"batch_id":{"type":"string"},"mail_by":{"type":["string","null"],"format":"date"},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/BatchRecipient"}},"revoked":{"type":"array","items":{"type":"string"},"description":"People whose wording changed: their proofs were revoked (preview again)."}}},"AddBatchRecipientsRequest":{"type":"object","required":["recipients"],"properties":{"recipients":{"type":"array","minItems":1,"maxItems":25,"items":{"$ref":"#/components/schemas/BatchRecipientInput"}},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"AddBatchRecipientsResponse":{"type":"object","required":["batch_id","recipients","count"],"properties":{"batch_id":{"type":"string"},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/BatchRecipient"},"description":"The people just added."},"count":{"type":"integer","description":"People in the order now."}}},"UpdateBatchRecipientRequest":{"type":"object","properties":{"address":{"$ref":"#/components/schemas/Address"},"greeting_name":{"type":"string","maxLength":40,"description":"\"\" for no greeting."},"override":{"anyOf":[{"$ref":"#/components/schemas/BatchOverride"},{"type":"null"}],"description":"This person's own wording; null goes back to the shared wording."},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"UpdateBatchRecipientResponse":{"type":"object","required":["recipient","proof_revoked"],"properties":{"recipient":{"$ref":"#/components/schemas/BatchRecipient"},"proof_revoked":{"type":"boolean","description":"Their proof was revoked (preview again)."}}},"BatchLookupRequest":{"type":"object","properties":{"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"CancelOrderGroupRequest":{"type":"object","properties":{"approval_token":{"type":"string","minLength":1,"maxLength":200,"description":"Without sign-in, to cancel a paid order (card held, not approved yet): the approval_token of the batch preview this order was checked out with. Required then. Don't share it."},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"RemoveBatchRecipientResponse":{"type":"object","required":["recipient_id","removed","count"],"properties":{"recipient_id":{"type":"string"},"removed":{"type":"boolean","const":true},"count":{"type":"integer"}}},"PreviewBatchResponse":{"type":"object","required":["round_id","status","to_render","poll_after_ms","approval_token"],"properties":{"round_id":{"type":["string","null"],"description":"Null when nothing needed a new proof."},"status":{"type":"string","enum":["rendering","done"]},"to_render":{"type":"integer"},"poll_after_ms":{"type":"integer","description":"Poll batch_status after this long."},"approval_token":{"type":"string","description":"Random, for this client only: pass it back unchanged as approval_token at checkout (required without sign-in). Never emailed and never in a URL; keep it in memory and do not show or share it. Each preview of the batch (everyone, or one person) replaces it; send the latest with checkout_batch."}}},"PreviewBatchRecipientResponse":{"allOf":[{"$ref":"#/components/schemas/Proof"},{"type":"object","required":["recipient_id"],"properties":{"recipient_id":{"type":"string"}}}]},"BatchProof":{"type":"object","required":["proof_id","version","images","price_cents","expires_at","screening"],"properties":{"proof_id":{"type":"string"},"version":{"type":"integer","minimum":1},"images":{"type":"array","items":{"$ref":"#/components/schemas/ProofImage"}},"price_cents":{"type":"integer"},"price_lines":{"type":"array","description":"Itemized price, summing to price_cents. A referred customer's first letter shows the free Follow-Through Pack as $0.00 lines.","items":{"type":"object","required":["label","amount_cents"],"properties":{"label":{"type":"string"},"amount_cents":{"type":"integer"}}}},"expires_at":{"type":"string","format":"date-time"},"screening":{"type":"string","enum":["allow","review"]}}},"BatchStatusRecipient":{"type":"object","required":["recipient_id","name","city_state","greeting_name","has_override","state"],"properties":{"recipient_id":{"type":"string"},"name":{"type":"string"},"city_state":{"type":"string"},"greeting_name":{"type":["string","null"]},"has_override":{"type":"boolean"},"state":{"type":"string","enum":["pending","rendering","ready","content_rejected","needs_rewording","failed"]},"proof":{"$ref":"#/components/schemas/BatchProof","description":"ready: the proof to show (emailed without the price)."},"message":{"type":"string","description":"content_rejected, needs_rewording, failed: plain language."},"delivery_estimate":{"$ref":"#/components/schemas/DeliveryEstimate","description":"This person's estimated arrival (each address has its own). Tell the customer each person's summary before asking for their yes."}}},"BatchTotal":{"type":"object","required":["count","total_cents","unit_cents","uniform","lines"],"description":"Ready people only. Amounts in US cents.","properties":{"count":{"type":"integer"},"total_cents":{"type":"integer"},"unit_cents":{"type":["integer","null"],"description":"The one price when every piece costs the same, else null."},"uniform":{"type":"boolean"},"lines":{"type":"array","items":{"type":"object","required":["unit_cents","quantity","amount_cents"],"properties":{"unit_cents":{"type":"integer"},"quantity":{"type":"integer"},"amount_cents":{"type":"integer"}}}}}},"OrderGroupStatus":{"type":"string","enum":["previewed","paid","cancelled"],"description":"The group's payment: previewed (waiting for payment), paid or cancelled. Where the order stands after payment is approval_state."},"BatchStatusResponse":{"type":"object","required":["batch_id","kind","mail_by","round","recipients","total","ready_to_approve","order_group"],"properties":{"batch_id":{"type":"string"},"kind":{"type":"string","enum":["card","letter"]},"mail_by":{"type":["string","null"],"format":"date"},"round":{"anyOf":[{"type":"object","required":["id","status","rendered","total","emailed_to"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["rendering","done","failed"]},"rendered":{"type":"integer"},"total":{"type":"integer"},"emailed_to":{"type":["string","null"]}}},{"type":"null"}]},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/BatchStatusRecipient"}},"total":{"$ref":"#/components/schemas/BatchTotal"},"ready_to_approve":{"type":"boolean","description":"Every person has a current emailed proof and nothing is rendering."},"order_group":{"anyOf":[{"type":"object","required":["order_group_id","status","amount_cents","piece_count"],"properties":{"order_group_id":{"type":"string"},"status":{"$ref":"#/components/schemas/OrderGroupStatus"},"amount_cents":{"type":"integer"},"piece_count":{"type":"integer"}}},{"type":"null"}]}}},"CheckoutBatchRequest":{"type":"object","required":["proof_ids","confirmed_count","confirmed_total_cents","user_confirmation"],"properties":{"proof_ids":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"string"},"description":"Every person's current proof, exactly (from batch_status)."},"confirmed_count":{"type":"integer","minimum":1,"maximum":25},"confirmed_total_cents":{"type":"integer","minimum":1,"description":"Copied from batch_status total.total_cents (never computed)."},"user_confirmation":{"type":"string","minLength":1,"maxLength":500,"description":"The user's own explicit yes to these previews and the total (the order form sends its button label, e.g. \"Yes, these 25 previews and the total of $124.75 are right\")."},"approval_token":{"type":"string","minLength":1,"maxLength":200,"description":"The approval_token of the latest preview of this batch (preview or one person's preview). Required without sign-in. Keep it for the decision on the final print proofs. Don't share it."},"redesign_group_id":{"type":"string","format":"uuid","description":"A redesign: the earlier order group with a piece whose final print proof didn't match its preview. At the same or a lower total the new order takes over its card hold (checkout_url is null: nothing more to pay; approving charges only the new total). A higher total releases it (nothing charged) and a new payment page opens."},"customer_email":{"type":"string","format":"email","maxLength":320,"description":"The same email address the letter or card was created with, when calling without sign-in. An id alone is never enough. Leave it out when signed in."}}},"CheckoutBatchResponse":{"type":"object","required":["order_group_id","checkout_url","amount_cents","piece_count","orders","held"],"properties":{"order_group_id":{"type":"string"},"checkout_url":{"type":["string","null"],"format":"uri","description":"One Stripe Checkout page for every piece not held. Null for a redesign paid with the earlier order's card hold (nothing more to pay)."},"amount_cents":{"type":"integer","description":"What the payment page charges (less than the confirmed total when some are held)."},"piece_count":{"type":"integer"},"orders":{"type":"array","items":{"type":"object","required":["order_id","recipient_id","amount_cents","tracking_url"],"properties":{"order_id":{"type":"string"},"recipient_id":{"type":"string"},"amount_cents":{"type":"integer"},"tracking_url":{"type":"string","format":"uri","description":"This piece's private tracking page."}}}},"held":{"type":"array","description":"Pieces held for a quick review before payment (paid separately once cleared).","items":{"type":"object","required":["order_id","recipient_id","amount_cents","reason"],"properties":{"order_id":{"type":"string"},"recipient_id":{"type":"string"},"amount_cents":{"type":"integer"},"reason":{"type":"string"}}}},"redesign":{"type":"object","required":["replaces_order_group_id"],"description":"A redesign that took over the earlier order's card hold (checkout_url is null): nothing more is held or charged now.","properties":{"replaces_order_group_id":{"type":"string","format":"uuid"}}},"approve_url":{"type":"string","format":"uri","description":"A redesign paid with the earlier card hold (checkout_url is null): the user's private page for approving the new final print proofs once they are ready, the same link as in the email. Give it only to the user."}}},"OrderGroupStatusResponse":{"type":"object","required":["order_group_id","status","amount_cents","refunded_cents","approval_state","approve_by","pieces"],"properties":{"order_group_id":{"type":"string"},"status":{"$ref":"#/components/schemas/OrderGroupStatus"},"amount_cents":{"type":"integer"},"refunded_cents":{"type":"integer"},"approval_state":{"$ref":"#/components/schemas/ApprovalState","description":"Where the whole order is after payment: one payment approves every piece."},"approve_by":{"type":["string","null"],"format":"date-time","description":"While awaiting approval: approve by this time; after it the card hold is released and nothing is mailed or charged. Null otherwise."},"pieces":{"type":"array","items":{"type":"object","required":["order_id","recipient_id","name","city_state","status","approval_state","tracking_url","cancellable","cancellable_until"],"properties":{"order_id":{"type":"string"},"recipient_id":{"type":"string"},"name":{"type":"string"},"city_state":{"type":"string"},"status":{"$ref":"#/components/schemas/OrderStatus"},"approval_state":{"$ref":"#/components/schemas/ApprovalState"},"tracking_url":{"type":"string","format":"uri"},"cancellable":{"type":"boolean","description":"Cancelling this piece (POST /v1/orders/{order_id}/cancel) leaves it out of the one charge on approval. False once the order is approved: final."},"cancellable_until":{"type":["string","null"],"format":"date-time","description":"Older orders waiting for a separate approval: the approval deadline, when the piece is closed anyway (nothing charged) if it isn't approved. Null otherwise."}}}}}},"CancelOrderGroupResponse":{"type":"object","required":["order_group_id","results","refunded_cents"],"properties":{"order_group_id":{"type":"string"},"results":{"type":"array","items":{"type":"object","required":["order_id","cancelled","status","refunded_cents","message"],"properties":{"order_id":{"type":"string"},"cancelled":{"type":"boolean"},"status":{"$ref":"#/components/schemas/OrderStatus"},"refunded_cents":{"type":"integer"},"message":{"type":"string"}}}},"refunded_cents":{"type":"integer"}}}}}}