{"openapi":"3.1.0","info":{"title":"Deliva API","version":"1.0.0","summary":"Custom products an AI agent can order for its user.","description":"Find a product, send a picture, and get back a picture of it on the product, the price with shipping, and a link your user opens to look at the design, change it and order it. No account and no API key.\n\nThe shortest path is one request: `POST /v1/previews`, or `GET /v1/previews/new` for a client that can only open URLs. A client that cannot open a URL it composed, or a picture without a public URL, leads to a product's `links.user_link`, which makes nothing until the user presses a button.\n\nA preview is one design under one ID. Each change makes the next numbered revision. The picture, the price and an order all belong to a revision, and the link stays the same.\n\n**Ordering.** `POST /v1/orders` orders a preview's revision at the price your user saw. Order only when your user has seen the design and its price and asked for it. Your user can also add it to the cart on the preview's `approval_url` and press \"Pay\" at checkout.\n\n**Who can open what.** Whoever has a preview's ID or its `approval_url` can see the artwork, change the design and delete it. A picture's URL shows that picture and nothing else.\n\n**Sending a picture.** The terms at https://deliva.ai/terms and the content policy at https://deliva.ai/content-policy apply.\n\n**Reading answers.** `/v1/products/{product}`, `/v1/quotes`, `/v1/previews/new` and `/v1/previews/{preview}/status` always answer `200`, because some URL-opening tools hide the body of any other status. Read `object`. `problem` means it did not work: `status` is what another route would have answered, and `next_url` is the URL that helps next. Every other route answers errors with their own status.\n\n**Unknown names.** A name we do not know is ignored and listed in `issues` as a warning. Tracking tags such as `utm_source` are ignored silently.\n\n**Changes.** Ignore response fields, and values of `code`, that you do not know. New ones are added within v1.\n\nJSON is sent as `text/plain` to a client whose `Accept` header names `text/html` and no JSON type. The bytes are the same, and `X-Content-Type-Options: nosniff` is sent with them.","contact":{"name":"Deliva","url":"https://deliva.ai/contact","email":"legal@signa.so"},"termsOfService":"https://deliva.ai/terms"},"servers":[{"url":"https://api.deliva.ai"}],"security":[],"tags":[{"name":"Catalog","description":"Products and prices with shipping."},{"name":"Artwork","description":"Pictures to print."},{"name":"Previews","description":"A design on a product, with its picture, price and approval link."},{"name":"Ordering","description":"The order step and the sign-up list."},{"name":"System","description":"Index, health and this file."}],"components":{"schemas":{"Index":{"type":"object","properties":{"object":{"type":"string","enum":["index"]},"name":{"type":"string"},"summary":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}},"links":{"type":"object","properties":{"products":{"type":"string","format":"uri"},"previews":{"type":"string","format":"uri"},"new_preview_template":{"type":"string","description":"A URL that makes a preview once its braces are filled in."},"user_link_template":{"type":"string","description":"A page for your user. It makes nothing until they press a button."},"openapi":{"type":"string","format":"uri"},"mcp":{"type":"string","format":"uri","description":"The same as MCP tools."},"llms_txt":{"type":"string","enum":["https://deliva.ai/llms.txt"]}},"required":["products","openapi","llms_txt","previews","new_preview_template","user_link_template","mcp"],"additionalProperties":false}},"required":["object","name","summary","steps","links"],"additionalProperties":false},"Problem":{"type":"object","properties":{"object":{"type":"string","enum":["problem"]},"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"code":{"type":"string","pattern":"^[a-z_]+$"},"detail":{"type":"string"},"suggestion":{"type":"string"},"retryable":{"type":"boolean"},"retry_after":{"type":["integer","null"],"description":"Seconds."},"errors":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"next_url":{"type":["string","null"],"format":"uri","description":"The URL that helps next. It never holds a URL the caller sent."},"request_id":{"$ref":"#/components/schemas/RequestId"}},"required":["object","type","title","status","code","detail","suggestion","retryable","retry_after","errors","next_url","request_id"],"additionalProperties":false,"description":"RFC 9457 problem. Branch on `code`. `type` names the kind of problem."},"Issue":{"type":"object","properties":{"field":{"type":"string","description":"Path in the request, such as `options.size`."},"code":{"type":"string","pattern":"^[a-z_]+$","description":"New codes may be added. Known: missing, read_as, unknown_value, unknown_parameter, unavailable_combination, out_of_range, no_match, url_not_encoded, image_unreachable, image_unsupported, image_too_large, image_too_small, upload_not_found, low_resolution, heavy_crop, uncovered_area, on_wrap, under_frame, out_of_date, country_not_served, pricing_unavailable, picture_delayed, render_failed."},"severity":{"type":"string","enum":["blocking","warning"],"description":"`blocking`: the design or its price is not complete until it is fixed."},"detail":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"},"description":"Values that would work. Empty when there is no list."}},"required":["field","code","severity","detail","allowed"],"additionalProperties":false,"description":"One thing about one field."},"RequestId":{"type":"string","pattern":"^req_[0-9a-hjkmnp-tv-z]{16}$"},"ProductList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductSummary"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]},"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}}},"required":["object","data","has_more","next_cursor","issues"],"additionalProperties":false},"ProductSummary":{"type":"object","properties":{"object":{"type":"string","enum":["product_summary"]},"id":{"$ref":"#/components/schemas/ProductSlug"},"name":{"type":"string"},"summary":{"type":"string"},"category":{"type":"string"},"inputs_needed":{"type":"array","items":{"$ref":"#/components/schemas/FieldName"},"description":"Names of the required inputs."},"photo_url":{"type":["string","null"],"format":"uri"},"from_price":{"anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"description":"Lowest price with shipping in `country`, of `from_variant`. Null without `country`, or when we have not checked one."},"from_variant":{"type":["string","null"],"description":"The variant that `from_price` buys, which may not be the default. Null when `from_price` is."},"links":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"page":{"type":"string","format":"uri"}},"required":["self","page"],"additionalProperties":false}},"required":["object","id","name","summary","category","inputs_needed","photo_url","from_price","from_variant","links"],"additionalProperties":false},"ProductSlug":{"type":"string","maxLength":60,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"FieldName":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$","description":"An option's or an input's name, such as `size` or `artwork`."},"Price":{"type":"object","properties":{"total":{"$ref":"#/components/schemas/Money"},"breakdown":{"$ref":"#/components/schemas/PriceBreakdown"},"price_status":{"type":"string","enum":["final","estimate"]},"unknown_charges":{"type":"array","items":{"$ref":"#/components/schemas/UnknownCharge"}}},"required":["total","breakdown","price_status","unknown_charges"],"additionalProperties":false,"description":"The one shape every price has. `total` is the sum of the breakdown's known parts. There is one price per country, whatever the address. `final`: nothing comes on top. `estimate`: what is missing is named in `unknown_charges`, such as sales tax in the United States and Canada, which depends on the address.","oneOf":[{"properties":{"price_status":{"const":"final"},"unknown_charges":{"maxItems":0},"breakdown":{"properties":{"tax":{"not":{"type":"null"}}}}}},{"properties":{"price_status":{"const":"estimate"},"unknown_charges":{"minItems":1}}}]},"Money":{"type":"object","properties":{"amount":{"type":"string","pattern":"^[0-9]+\\.[0-9]{2}$"},"currency":{"$ref":"#/components/schemas/Currency"}},"required":["amount","currency"],"additionalProperties":false,"description":"Decimal string and currency. Never a bare number."},"Currency":{"type":"string","enum":["USD","EUR","GBP","NOK","SEK","DKK","CAD","AUD"],"description":"The destination country's currency."},"PriceBreakdown":{"type":"object","properties":{"items":{"$ref":"#/components/schemas/Money"},"shipping":{"$ref":"#/components/schemas/Money"},"tax":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"Tax in `total`, calculated at the standard rate of the country. It is a calculation: how Deliva is taxed there has not been confirmed. Null when it is not known. `0.00` only when no tax is due."}},"required":["items","shipping","tax"],"additionalProperties":false},"UnknownCharge":{"type":"object","properties":{"charge":{"type":"string","enum":["tax","duties"]},"due":{"type":"string","enum":["not_included","on_arrival"],"description":"`not_included`: not in `total`. `on_arrival`: the carrier or customs collects it."},"detail":{"type":"string"}},"required":["charge","due","detail"],"additionalProperties":false,"description":"Something that may come on top of `total`."},"Product":{"type":"object","properties":{"object":{"type":"string","enum":["product"]},"id":{"$ref":"#/components/schemas/ProductSlug"},"name":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"inputs_needed":{"type":"array","items":{"$ref":"#/components/schemas/FieldName"},"description":"Names of the required inputs."},"photo_url":{"type":["string","null"],"format":"uri"},"photos":{"type":"array","items":{"$ref":"#/components/schemas/Photo"}},"from_price":{"anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"description":"Lowest price with shipping in `country`, of `from_variant`. Null without `country`, or when we have not checked one."},"from_variant":{"type":["string","null"],"description":"The variant that `from_price` buys, which may not be the default. Null when `from_price` is."},"inputs":{"type":"array","items":{"$ref":"#/components/schemas/Input"},"minItems":1},"options":{"type":"array","items":{"$ref":"#/components/schemas/Option"}},"areas":{"type":"array","items":{"$ref":"#/components/schemas/PrintArea"}},"print_specs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PrintSpec"}},"variants":{"type":"array","items":{"$ref":"#/components/schemas/Variant"},"minItems":1,"description":"Those whose print size is verified."},"specs":{"type":"array","items":{"$ref":"#/components/schemas/Spec"}},"size_chart":{"anyOf":[{"$ref":"#/components/schemas/SizeChart"},{"type":"null"}],"description":"Measurements by size. Null for a product that is not worn."},"priced_countries":{"type":"array","items":{"$ref":"#/components/schemas/CountryCode"},"description":"Countries where at least one variant has a price today."},"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"links":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"page":{"type":"string","format":"uri"},"quotes":{"type":"string","format":"uri"},"new_preview_template":{"type":"string","description":"A URL that makes a preview once its braces are filled in, with the picture URL percent-encoded. Under 250 characters is safest."},"user_link_template":{"type":"string","description":"The same for a page your user opens."},"user_link":{"type":"string","format":"uri","description":"A page where your user adds a picture. Opening it makes nothing, so it is the same for everybody."}},"required":["self","page","quotes","new_preview_template","user_link_template","user_link"],"additionalProperties":false}},"required":["object","id","name","summary","description","category","inputs_needed","photo_url","photos","from_price","from_variant","inputs","options","areas","print_specs","variants","specs","size_chart","priced_countries","issues","links"],"additionalProperties":false},"Photo":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"alt":{"type":"string"}},"required":["url","alt"],"additionalProperties":false},"Input":{"oneOf":[{"$ref":"#/components/schemas/ImageInput"}],"discriminator":{"propertyName":"type","mapping":{"image":"#/components/schemas/ImageInput"}},"description":"Something the product is made from, sent in `inputs.<name>` as a string. New types may be added. Skip an optional one you do not know."},"ImageInput":{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"name":{"$ref":"#/components/schemas/FieldName"},"label":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean"},"example":{"type":"string"},"area":{"type":"string","description":"The print area it is printed on."}},"required":["type","name","label","description","required","example","area"],"additionalProperties":false,"description":"A picture. Sent in `inputs.<name>` as a public https URL of a PNG, JPEG or WebP, or as an upload ID."},"Option":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/FieldName"},"label":{"type":"string"},"default":{"type":"string","description":"Used for the picture and the price until somebody chooses."},"values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"},"minItems":1}},"required":["name","label","default","values"],"additionalProperties":false},"OptionValue":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"hex":{"type":["string","null"],"pattern":"^#[0-9a-f]{6}$"}},"required":["value","label","hex"],"additionalProperties":false},"PrintArea":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ProductSlug"},"label":{"type":"string"},"method":{"type":"string"},"default_placement":{"type":"object","properties":{"fit":{"type":"string","enum":["cover","contain"]},"scale":{"type":"number"},"x":{"type":"number"},"y":{"type":"number"}},"required":["fit","scale","x","y"],"additionalProperties":false,"description":"Where a picture goes until somebody moves it."}},"required":["id","label","method","default_placement"],"additionalProperties":false},"PrintSpec":{"type":"object","properties":{"width_px":{"type":"integer","minimum":1},"height_px":{"type":"integer","minimum":1},"width_mm":{"type":"number","exclusiveMinimum":0},"height_mm":{"type":"number","exclusiveMinimum":0},"bleed_px":{"type":["integer","null"],"minimum":0,"description":"Cut off on each side."},"safe_inset_px":{"type":["integer","null"],"minimum":0,"description":"Text and faces belong inside it."},"wrap_px":{"type":["integer","null"],"minimum":0,"description":"Folded round each side, for a canvas."},"min_dpi":{"type":"integer","minimum":1,"description":"Below this the preview carries a `low_resolution` warning."},"transparency":{"type":"string","enum":["kept","filled"],"description":"`kept`: transparent and uncovered pixels print nothing. `filled`: they take `placement.background`, or white."}},"required":["width_px","height_px","width_mm","height_mm","bleed_px","safe_inset_px","wrap_px","min_dpi","transparency"],"additionalProperties":false,"description":"The whole print file for one area at one size, verified. Pixels and millimeters include bleed and wrap. The safe inset is measured inward from the edge that remains after both. In `bleed_px`, `safe_inset_px` and `wrap_px`, null means the maker does not say and 0 means there is none."},"Variant":{"type":"object","properties":{"id":{"type":"string"},"options":{"$ref":"#/components/schemas/OptionValues"},"print":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ProductSlug"},"description":"Print area to the key of its print spec."},"dimensions":{"anyOf":[{"$ref":"#/components/schemas/Dimensions"},{"type":"null"}],"description":"The size made for `country`. Null without `country`."},"price":{"anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}],"description":"Price with shipping of one, in `country`. Null without `country`, or when we have not checked it."}},"required":["id","options","print","dimensions","price"],"additionalProperties":false},"OptionValues":{"type":"object","additionalProperties":{"type":"string"},"description":"One value per option."},"Dimensions":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0},"unit":{"type":"string","enum":["in","cm","mm"]},"text":{"type":"string","description":"In words, such as `45 x 60 cm`."}},"required":["width","height","unit","text"],"additionalProperties":false,"description":"The size made for the destination country, in the unit it is made in there. Wall art is made in inches for the United States and Canada and in centimeters elsewhere. A mug is its height and its width across."},"Spec":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"additionalProperties":false},"SizeChart":{"type":"object","properties":{"option":{"type":"string","description":"The option whose values the rows are."},"rows":{"type":"array","items":{"type":"object","properties":{"size":{"type":"string","description":"A value of `option`."},"width":{"type":"object","properties":{"in":{"type":"number","description":"Width, in inches."},"cm":{"type":"number","description":"Width, in centimeters, to one decimal."}},"required":["in","cm"],"additionalProperties":false,"description":"Laid flat, from the seam under one sleeve to the seam under the other."},"length":{"type":"object","properties":{"in":{"type":"number","description":"Length, in inches."},"cm":{"type":"number","description":"Length, in centimeters, to one decimal."}},"required":["in","cm"],"additionalProperties":false,"description":"From the highest point of the shoulder, beside the collar, to the hem."},"chest":{"type":"object","properties":{"min":{"type":"object","properties":{"in":{"type":"number","description":"Chest, in inches."},"cm":{"type":"number","description":"Chest, in centimeters, to one decimal."}},"required":["in","cm"],"additionalProperties":false,"description":"The smallest chest the size is made for, measured round its fullest part."},"max":{"type":"object","properties":{"in":{"type":"number","description":"Chest, in inches."},"cm":{"type":"number","description":"Chest, in centimeters, to one decimal."}},"required":["in","cm"],"additionalProperties":false,"description":"The largest."}},"required":["min","max"],"additionalProperties":false}},"required":["size","width","length","chest"],"additionalProperties":false}},"tolerance":{"type":"object","properties":{"in":{"type":"number","description":"Tolerance, in inches."},"cm":{"type":"number","description":"Tolerance, in centimeters, to one decimal."}},"required":["in","cm"],"additionalProperties":false,"description":"A garment can differ from its figures by up to this much."},"checked_on":{"type":"string","description":"When the maker's size guide was read, YYYY-MM-DD."}},"required":["option","rows","tolerance","checked_on"],"additionalProperties":false,"description":"A garment's measurements by size, from the maker's public size guide."},"CountryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2."},"QuoteList":{"type":"object","properties":{"object":{"type":"string","enum":["quote_list"]},"product":{"$ref":"#/components/schemas/ProductSlug"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}},"unavailable":{"type":"array","items":{"$ref":"#/components/schemas/UnpricedCountry"}},"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}}},"required":["object","product","data","unavailable","issues"],"additionalProperties":false},"Quote":{"type":"object","properties":{"object":{"type":"string","enum":["quote"]},"product":{"$ref":"#/components/schemas/ProductSlug"},"variant":{"type":"string","description":"The variant this prices."},"options":{"$ref":"#/components/schemas/OptionValues"},"dimensions":{"anyOf":[{"$ref":"#/components/schemas/Dimensions"},{"type":"null"}],"description":"The size made for `country`. Null for a product we hold no size for."},"quantity":{"type":"integer","minimum":1,"maximum":50},"country":{"$ref":"#/components/schemas/CountryCode"},"price_id":{"$ref":"#/components/schemas/PriceId"},"price":{"$ref":"#/components/schemas/Price"},"production_days":{"anyOf":[{"$ref":"#/components/schemas/DayRange"},{"type":"null"}],"description":"How long the maker says making takes. Null when we have not checked it."},"summary":{"type":"string","description":"The price in one sentence, with what it buys: the product, its size in `country`, its options, the quantity and the country."}},"required":["object","product","variant","options","dimensions","quantity","country","price_id","price","production_days","summary"],"additionalProperties":false,"description":"The price with shipping of one variant to one country, calculated when it was read."},"PriceId":{"type":"string","pattern":"^prc_[0-9a-hjkmnp-tv-z]{16}$","description":"Names one exact set of price terms: every amount, what is not included, and who collects it. Equal terms have equal IDs."},"DayRange":{"type":"object","properties":{"min":{"type":"integer","minimum":0},"max":{"type":"integer","minimum":0}},"required":["min","max"],"additionalProperties":false,"description":"Business days."},"UnpricedCountry":{"type":"object","properties":{"country":{"type":"string","description":"As it was sent."},"code":{"type":"string","enum":["unknown_country","country_not_served","pricing_unavailable"],"description":"`pricing_unavailable`: we have not checked this price, or the check is out of date. `country_not_served`: Deliva does not deliver there."},"detail":{"type":"string"}},"required":["country","code","detail"],"additionalProperties":false},"Health":{"type":"object","properties":{"object":{"type":"string","enum":["health"]},"status":{"type":"string","enum":["ok"]}},"required":["object","status"],"additionalProperties":false},"Upload":{"type":"object","properties":{"object":{"type":"string","enum":["upload"]},"id":{"$ref":"#/components/schemas/UploadId"},"content_type":{"type":"string","enum":["image/png","image/jpeg","image/webp"]},"size_bytes":{"type":"integer"},"width_px":{"type":"integer","description":"After applying the photo's orientation."},"height_px":{"type":"integer"},"has_transparency":{"type":"boolean"},"created_at":{"$ref":"#/components/schemas/Timestamp"},"expires_at":{"allOf":[{"$ref":"#/components/schemas/Timestamp"},{"description":"7 days from now. A preview that uses it keeps it as long as itself."}]}},"required":["object","id","content_type","size_bytes","width_px","height_px","has_transparency","created_at","expires_at"],"additionalProperties":false},"UploadId":{"type":"string","pattern":"^upl_[0-9a-hjkmnp-tv-z]{16}$"},"Timestamp":{"type":"string","format":"date-time"},"Preview":{"type":"object","properties":{"object":{"type":"string","enum":["preview"]},"id":{"$ref":"#/components/schemas/PreviewId"},"revision":{"$ref":"#/components/schemas/Revision"},"status":{"type":"string","enum":["needs_input","rendering","ready","failed"],"description":"`needs_input`: a blocking issue must be fixed. Otherwise the same as `image_status`. `ready`: nothing is missing from the design."},"editable":{"type":"boolean","description":"False only for the public example preview."},"product":{"$ref":"#/components/schemas/ProductSlug"},"variant":{"type":"string","description":"The variant in the picture and the price."},"options":{"$ref":"#/components/schemas/OptionValues"},"inputs":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/UploadId"},{"type":"null"}]},"description":"A picture URL comes back as the upload it became."},"placement":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Placement"}},"country":{"anyOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}],"description":"The destination."},"quantity":{"type":"integer","minimum":1,"maximum":50},"image_url":{"type":["string","null"],"format":"uri","description":"The main picture of this revision. Null until `image_status` is `ready`. It names the picture, not the preview."},"image_status":{"type":"string","enum":["rendering","ready","failed"],"description":"`failed` is final for this revision. A change tries again."},"images":{"type":"array","items":{"$ref":"#/components/schemas/PreviewImage"},"description":"Every view. Empty until `image_status` is `ready`."},"approval_url":{"type":"string","format":"uri","description":"The page your user opens to see and change the design. The same for every revision. Whoever has it can change the design and delete it."},"quote":{"anyOf":[{"$ref":"#/components/schemas/Quote"},{"type":"null"}],"description":"Null until `country` is known and its price has been checked. `issues` says which."},"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"order_attempt":{"anyOf":[{"$ref":"#/components/schemas/OrderAttempt"},{"type":"null"}],"description":"The last order call for this preview. Null before one."},"retry_after":{"type":["integer","null"],"description":"Seconds to wait before `links.check_again`. Null when there is nothing to wait for."},"next_step":{"type":"string","description":"What there is now, where to find it, and what to do next."},"links":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"check_again":{"type":"string","format":"uri","description":"A fresh URL for this preview that always answers `200`."},"product":{"type":"string","format":"uri"}},"required":["self","check_again","product"],"additionalProperties":false},"created_at":{"$ref":"#/components/schemas/Timestamp"},"updated_at":{"$ref":"#/components/schemas/Timestamp"},"expires_at":{"anyOf":[{"$ref":"#/components/schemas/Timestamp"},{"type":"null"}],"description":"7 days after it was made while nobody has changed it, opened it on the page or tried to order it. Otherwise 90 days after the last change. Null for the public example."}},"required":["object","id","revision","status","editable","product","variant","options","inputs","placement","country","quantity","image_url","image_status","images","approval_url","quote","issues","retry_after","next_step","links","created_at","updated_at","expires_at","order_attempt"],"additionalProperties":false},"PreviewId":{"type":"string","pattern":"^prv_[0-9a-hjkmnp-tv-z]{16}$"},"Revision":{"type":"integer","minimum":1,"description":"The number of a design within its preview."},"Placement":{"type":"object","properties":{"fit":{"type":"string","enum":["cover","contain"],"description":"cover: fill the area and crop. contain: show the whole image."},"scale":{"type":"number","minimum":0.1,"maximum":5,"description":"1 is the fitted size."},"x":{"type":"number","minimum":-1,"maximum":1,"description":"Image center, right of the area's center, as a fraction of the area's width."},"y":{"type":"number","minimum":-1,"maximum":1,"description":"Image center, below the area's center, as a fraction of the area's height. Negative is up."},"rotation":{"type":"number","minimum":-180,"maximum":180,"description":"Degrees clockwise."},"background":{"type":["string","null"],"pattern":"^#[0-9a-f]{6}$","description":"Color under the image and where it does not reach. Null: white when the print spec says `filled`, nothing when it says `kept`."}},"required":["fit","scale","x","y","rotation","background"],"additionalProperties":false,"description":"Where an image sits in its print area. The area is the whole print file, bleed and wrap included. Values are relative, so they survive a change of size. Order: fit the image to the area, scale it, rotate it about its center, then move its center. The picture and the print file use the same steps and the same rule for transparent and uncovered pixels."},"PreviewImage":{"type":"object","properties":{"view":{"type":"string","description":"`front`, or for a mug `left`, `front` and `right`: the product alone. Then the same design photographed: `scene_front` square on, `scene_context` in its setting at its true size, `scene_closeup` close up at an angle. A T-shirt has the three photographed views only, in the chosen color: laid flat and seen from above, on a table, and close up."},"url":{"type":"string","format":"uri"},"width_px":{"type":"integer"},"height_px":{"type":"integer"}},"required":["view","url","width_px","height_px"],"additionalProperties":false},"OrderAttempt":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/OrderAttemptId"},"preview":{"$ref":"#/components/schemas/PreviewId"},"revision":{"$ref":"#/components/schemas/Revision"},"code":{"type":"string","description":"What the order call answered."},"detail":{"type":"string"},"times":{"type":"integer","minimum":1,"description":"How often this revision was ordered."},"first_at":{"$ref":"#/components/schemas/Timestamp"},"last_at":{"$ref":"#/components/schemas/Timestamp"}},"required":["id","preview","revision","code","detail","times","first_at","last_at"],"additionalProperties":false,"description":"The order call for one preview revision. There is one per revision, however often it is made."},"OrderAttemptId":{"type":"string","pattern":"^att_[0-9a-hjkmnp-tv-z]{16}$"},"PreviewRequest":{"type":"object","properties":{"product":{"type":"string","maxLength":60,"description":"The product's ID, such as `poster`."},"options":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/LooseValue"},"description":"Such as `{\"size\": \"18x24\"}`. An option left out takes its default."},"inputs":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/LooseValue"},"description":"One value per input of the product: a public https picture URL, or an upload ID."},"placement":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/LoosePlacement"},"description":"Per image input, such as `{\"artwork\": {\"scale\": 0.8}}`."},"country":{"allOf":[{"$ref":"#/components/schemas/LooseValue"},{"description":"A two-letter code or an English name. The country, not the city."}]},"quantity":{"allOf":[{"$ref":"#/components/schemas/LooseValue"},{"description":"From 1 to 50. Defaults to 1."}]}},"required":["product"],"additionalProperties":{},"description":"Read leniently. A value that cannot be used becomes an issue on the preview. An unknown key at any depth becomes a warning."},"LooseValue":{"anyOf":[{"type":"string","maxLength":4096},{"type":"number"},{"type":"boolean"},{"type":"null"}],"description":"A value read leniently. A number and its text are the same. Null is the same as leaving it out."},"LoosePlacement":{"type":"object","properties":{"fit":{"$ref":"#/components/schemas/LooseValue"},"scale":{"$ref":"#/components/schemas/LooseValue"},"x":{"$ref":"#/components/schemas/LooseValue"},"y":{"$ref":"#/components/schemas/LooseValue"},"rotation":{"$ref":"#/components/schemas/LooseValue"},"background":{"$ref":"#/components/schemas/LooseValue"}},"additionalProperties":{},"description":"The fields of `Placement`, read leniently. One that cannot be used takes its default and adds a warning."},"PreviewUpdate":{"type":"object","properties":{"revision":{"allOf":[{"$ref":"#/components/schemas/Revision"},{"description":"The current revision. The change is refused when it is not."}]},"options":{"type":"object","additionalProperties":{"type":["string","null"]}},"inputs":{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":4096}},"placement":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/PlacementUpdate"},{"type":"null"}]}},"country":{"anyOf":[{"$ref":"#/components/schemas/CountryCode"},{"type":"null"}]},"quantity":{"type":"integer","minimum":1,"maximum":50}},"required":["revision"],"additionalProperties":false,"description":"Read strictly. Nothing changes unless every value can be used.","minProperties":2},"PlacementUpdate":{"type":"object","properties":{"fit":{"type":"string","enum":["cover","contain"],"description":"cover: fill the area and crop. contain: show the whole image."},"scale":{"type":"number","minimum":0.1,"maximum":5,"description":"1 is the fitted size."},"x":{"type":"number","minimum":-1,"maximum":1,"description":"Image center, right of the area's center, as a fraction of the area's width."},"y":{"type":"number","minimum":-1,"maximum":1,"description":"Image center, below the area's center, as a fraction of the area's height. Negative is up."},"rotation":{"type":"number","minimum":-180,"maximum":180,"description":"Degrees clockwise."},"background":{"type":["string","null"],"pattern":"^#[0-9a-f]{6}$","description":"Color under the image and where it does not reach. Null: white when the print spec says `filled`, nothing when it says `kept`."}},"additionalProperties":false},"OrderAnswer":{"type":"object","properties":{"object":{"type":"string","enum":["problem"]},"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"number","enum":[403]},"code":{"type":"string"},"detail":{"type":"string"},"suggestion":{"type":"string"},"retryable":{"type":"boolean","enum":[false]},"retry_after":{"type":"null"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/Issue"},"maxItems":0},"next_url":{"type":["string","null"],"format":"uri"},"request_id":{"$ref":"#/components/schemas/RequestId"},"order_attempts":{"type":"array","items":{"$ref":"#/components/schemas/OrderAttempt"},"minItems":1,"description":"One per item."},"approval_urls":{"type":"array","items":{"type":"string","format":"uri"},"minItems":1,"description":"One per preview. They keep working."},"price":{"$ref":"#/components/schemas/Price"},"signup_url":{"type":"string","format":"uri","description":"A page where the user can leave an email."},"signup_endpoint":{"type":"string","format":"uri","description":"Takes the email as a POST instead."}},"required":["object","type","title","status","code","detail","suggestion","retryable","retry_after","errors","next_url","request_id","order_attempts","approval_urls","price","signup_url","signup_endpoint"],"additionalProperties":false,"description":"A `Problem` that says what happened to the order, with its record and where to leave an email."},"OrderRequest":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"preview":{"$ref":"#/components/schemas/PreviewId"},"revision":{"allOf":[{"$ref":"#/components/schemas/Revision"},{"description":"The revision your user saw. Refused if the preview has changed since."}]},"price_id":{"allOf":[{"$ref":"#/components/schemas/PriceId"},{"description":"`quote.price_id` of the price your user saw. Refused if any term has changed, even when the total has not."}]}},"required":["preview","revision","price_id"],"additionalProperties":false},"minItems":1,"maxItems":1,"description":"The design to order."}},"required":["items"],"additionalProperties":false},"Signup":{"type":"object","properties":{"object":{"type":"string","enum":["signup"]},"status":{"type":"string","enum":["not_confirmed"]},"detail":{"type":"string"}},"required":["object","status","detail"],"additionalProperties":false},"SignupRequest":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"consent":{"type":"boolean","enum":[true],"description":"The person asked to be emailed about this order."},"order_attempt":{"$ref":"#/components/schemas/OrderAttemptId"}},"required":["email","consent"],"additionalProperties":false}}},"paths":{"/v1":{"get":{"operationId":"getIndex","tags":["System"],"summary":"Get Index","description":"Say what Deliva does and link to every step, for a client with no prior knowledge.","responses":{"200":{"description":"The index.","headers":{"ETag":{"schema":{"type":"string","description":"Send it back as If-None-Match for a 304."},"required":true,"description":"Send it back as If-None-Match for a 304."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Index"}}}},"default":{"description":"Any other error, such as `internal_error` or `route_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/products":{"get":{"operationId":"listProducts","tags":["Catalog"],"summary":"List Products","description":"Search the catalog. With `country`, each product carries its lowest price with shipping there.","parameters":[{"name":"q","in":"query","description":"Words to search for, such as `wall art`.","schema":{"type":"string","maxLength":100},"example":"wall art"},{"name":"category","in":"query","description":"Comma-separated category slugs.","schema":{"type":"string","maxLength":200},"example":"wall-art"},{"name":"country","in":"query","description":"Destination country, not the city: a two-letter code, or an English name such as Ireland or the Netherlands. One we cannot read is listed in `issues`. Without a country there is no price.","schema":{"type":"string","maxLength":60},"example":"DE"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"cursor","in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Products, best match first.","headers":{"ETag":{"schema":{"type":"string","description":"Send it back as If-None-Match for a 304."},"required":true,"description":"Send it back as If-None-Match for a 304."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductList"}}}},"400":{"description":"`invalid_request`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error, such as `internal_error` or `route_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/products/{product}":{"get":{"operationId":"retrieveProduct","tags":["Catalog"],"summary":"Retrieve Product","description":"Get a product's inputs, options, variants and print areas. With `country`, each variant carries its price with shipping. Only variants whose print size we have verified are listed. A price we have never checked is null, and `issues` says so.\n\nAlways answers `200`. An unknown product is a `problem` that names the closest one.","parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string","maxLength":60},"example":"poster"},{"name":"country","in":"query","description":"Destination country, not the city: a two-letter code, or an English name such as Ireland or the Netherlands. One we cannot read is listed in `issues`. Without a country there is no price.","schema":{"type":"string","maxLength":60},"example":"DE"}],"responses":{"200":{"description":"The product, or a problem. Read `object`.","headers":{"ETag":{"schema":{"type":"string","description":"Send it back as If-None-Match for a 304."},"required":true,"description":"Send it back as If-None-Match for a 304."}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/Problem"}],"discriminator":{"propertyName":"object","mapping":{"product":"#/components/schemas/Product","problem":"#/components/schemas/Problem"}}}}}}}}},"/v1/quotes":{"get":{"operationId":"getQuotes","tags":["Catalog"],"summary":"Get Quotes","description":"Get the price with shipping of one variant in up to 30 countries, with no artwork. Nothing is stored.\n\nA country or a quantity whose price we have not checked is listed in `unavailable`. It is never priced from a guess, from an old figure or at zero. Always answers `200`.","parameters":[{"name":"product","in":"query","required":true,"schema":{"type":"string","maxLength":60},"example":"poster"},{"name":"country","in":"query","required":true,"description":"Comma-separated countries, at most 30. Two-letter codes or English names.","schema":{"type":"string","minLength":2,"maxLength":1000},"example":"DE,US"},{"name":"quantity","in":"query","description":"From 1 to 50.","schema":{"type":"string","maxLength":10,"default":"1"}},{"name":"options","in":"query","style":"form","explode":true,"description":"One parameter per option, written `options.<name>`, such as `options.size=18x24`. The name alone works too. An option left out is priced at its default.","schema":{"type":"object","additionalProperties":{"type":"string","maxLength":4096}},"example":{"options.size":"18x24"}}],"responses":{"200":{"description":"One quote per country that can be priced, or a problem. Read `object`.","headers":{"ETag":{"schema":{"type":"string","description":"Send it back as If-None-Match for a 304."},"required":true,"description":"Send it back as If-None-Match for a 304."}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/QuoteList"},{"$ref":"#/components/schemas/Problem"}],"discriminator":{"propertyName":"object","mapping":{"quote_list":"#/components/schemas/QuoteList","problem":"#/components/schemas/Problem"}}}}}}}}},"/v1/health":{"get":{"operationId":"getHealth","tags":["System"],"summary":"Get Health","description":"Check that the API is up.","responses":{"200":{"description":"The API is up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"default":{"description":"Any other error, such as `internal_error` or `route_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/openapi.json":{"get":{"operationId":"getOpenapi","tags":["System"],"summary":"Get OpenAPI File","description":"Get this file as JSON. It is generated from the code that answers.","responses":{"200":{"description":"An OpenAPI 3.1 document.","headers":{"ETag":{"schema":{"type":"string","description":"Send it back as If-None-Match for a 304."},"required":true,"description":"Send it back as If-None-Match for a 304."}},"content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"type":"string"}},"required":["openapi"],"additionalProperties":{}}}}},"default":{"description":"Any other error, such as `internal_error` or `route_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/uploads":{"post":{"operationId":"createUpload","tags":["Artwork"],"summary":"Create Upload","description":"Store a picture to print, up to 4 MB. Optional: a preview also takes a public picture URL. The site shrinks a larger photo in the browser first.\n\nPNG, JPEG or WebP, at most 40 megapixels and 12,000 px a side. The answer comes after the picture has been read, so an upload that exists can be used. The terms at https://deliva.ai/terms and the content policy at https://deliva.ai/content-policy apply.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"PNG, JPEG or WebP, up to 4 MB. The type is read from the bytes.","contentMediaType":"application/octet-stream"}},"required":["file"],"additionalProperties":false}}}},"responses":{"201":{"description":"The upload.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upload"}}}},"400":{"description":"`invalid_request`, `unknown_parameter`, `id_type_mismatch`, or `country_not_served` for a country that is closed.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`product_not_found`, `upload_not_found`, `preview_not_found` or `picture_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"`payload_too_large`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"`unsupported_media_type`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`invalid_field`, with one entry per field in `errors`. Nothing was changed.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`capacity_reached`: no new previews for a while. `service_unavailable`: our store did not answer, and nothing was recorded.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error, such as `internal_error`, `service_unavailable` or `route_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/previews/new":{"get":{"operationId":"createPreviewFromUrl","tags":["Previews"],"summary":"Create Preview From URL","description":"Create a preview by opening a URL that holds a picture URL. Short form: `/v1/previews/new?product=poster&country=DE&artwork=<picture URL, percent-encoded>`.\n\nThe full form is the `POST /v1/previews` body with nested keys joined by dots: `options.size=18x24`, `inputs.artwork=...`, `placement.artwork.scale=0.8`. A name alone works when it belongs to one option or input of the product.\n\nUnder 250 characters is safest. Some URL-opening tools refuse longer URLs, and URLs that seem to hold a credential. A client that cannot open such a URL gives its user `links.user_link` of the product.\n\nWithout a picture nothing is made, and the answer is the product, with its price. With one, each request creates a new preview. A GET never changes or orders an existing one. HEAD and prefetch requests create nothing. Always answers `200`.","parameters":[{"name":"product","in":"query","required":true,"description":"The product's ID.","schema":{"type":"string","maxLength":60},"example":"poster"},{"name":"country","in":"query","description":"Destination country, not the city: a two-letter code, or an English name such as Ireland or the Netherlands. One we cannot read is listed in `issues`. Without a country there is no price.","schema":{"type":"string","maxLength":60},"example":"DE"},{"name":"quantity","in":"query","description":"From 1 to 50.","schema":{"type":"string","maxLength":10,"default":"1"}},{"name":"nocache","in":"query","description":"Ignored. Gives a client that caches by URL a fresh URL. The `check_again` links fill it in.","schema":{"type":"string","maxLength":32}},{"name":"fields","in":"query","style":"form","explode":true,"description":"One parameter per field, written `options.<name>`, `inputs.<name>` or `placement.<input>.<field>`, or the name alone. A picture URL goes last.","schema":{"type":"object","additionalProperties":{"type":"string","maxLength":4096}},"example":{"artwork":"https://images.example.com/team-photo.png"}}],"responses":{"200":{"description":"The new preview, the product when no picture was sent, or a problem. Read `object`.","headers":{"X-Robots-Tag":{"schema":{"type":"string","enum":["noindex"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Referrer-Policy":{"schema":{"type":"string","enum":["no-referrer"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Preview"},{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/Problem"}],"discriminator":{"propertyName":"object","mapping":{"preview":"#/components/schemas/Preview","product":"#/components/schemas/Product","problem":"#/components/schemas/Problem"}}}}}}}}},"/v1/previews":{"post":{"operationId":"createPreview","tags":["Previews"],"summary":"Create Preview","description":"Put a picture on a product and get an image of it, the price with shipping and an approval link. Only `product` is required. Anything missing or wrong is listed in `issues`, with the values that work.\n\nValues are read leniently: `Germany` becomes `DE`, and `\"2\"` becomes `2`. What cannot be read becomes an issue, not an error. Without artwork the picture shows the plain product.\n\nEach request makes a new preview, unless it carries an `Idempotency-Key` that the same address sent within a day with the same body: then the answer is the preview that the first one made, with the header `Idempotent-Replayed: true`.","parameters":[{"schema":{"type":"string","maxLength":255,"description":"Any text up to 255 characters, new for each preview you mean to make. Send it again with a retried request."},"required":false,"description":"Any text up to 255 characters, new for each preview you mean to make. Send it again with a retried request.","name":"Idempotency-Key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}}},"responses":{"201":{"description":"The preview. Read `status` and `issues`.","headers":{"X-Robots-Tag":{"schema":{"type":"string","enum":["noindex"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Referrer-Policy":{"schema":{"type":"string","enum":["no-referrer"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Location":{"schema":{"type":"string","description":"The new resource's URL."},"required":true,"description":"The new resource's URL."},"RateLimit-Policy":{"schema":{"type":"string","description":"Such as `\"ip\";q=30;w=60`."},"required":true,"description":"Such as `\"ip\";q=30;w=60`."},"RateLimit":{"schema":{"type":"string","description":"Such as `\"ip\";r=29;t=60`."},"required":true,"description":"Such as `\"ip\";r=29;t=60`."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Preview"}}}},"400":{"description":"`invalid_request`, `unknown_parameter`, `id_type_mismatch`, or `country_not_served` for a country that is closed.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`product_not_found`, `upload_not_found`, `preview_not_found` or `picture_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"`payload_too_large`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"`unsupported_media_type`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`capacity_reached`: no new previews for a while. `service_unavailable`: our store did not answer, and nothing was recorded.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error, such as `internal_error`, `service_unavailable` or `route_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/previews/{preview}":{"get":{"operationId":"retrievePreview","tags":["Previews"],"summary":"Retrieve Preview","description":"Get the current revision. A read also continues a picture that is not finished.","parameters":[{"name":"preview","in":"path","required":true,"schema":{"$ref":"#/components/schemas/PreviewId"},"example":"prv_6h1n4v8b2c7z3w9k"},{"name":"nocache","in":"query","description":"Ignored. Gives a client that caches by URL a fresh URL. The `check_again` links fill it in.","schema":{"type":"string","maxLength":32}}],"responses":{"200":{"description":"The preview.","headers":{"X-Robots-Tag":{"schema":{"type":"string","enum":["noindex"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Referrer-Policy":{"schema":{"type":"string","enum":["no-referrer"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Preview"}}}},"400":{"description":"`invalid_request`, `unknown_parameter`, `id_type_mismatch`, or `country_not_served` for a country that is closed.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`product_not_found`, `upload_not_found`, `preview_not_found` or `picture_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"`preview_expired`, `preview_deleted`, `picture_expired` or `upload_expired`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error, such as `internal_error`, `service_unavailable` or `route_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updatePreview","tags":["Previews"],"summary":"Update Preview","description":"Make the next revision: change the variant, inputs, placement, destination or quantity. The link and the ID stay the same. `revision` is the revision you are changing. If someone else changed the preview first, the answer is `409 revision_conflict` and nothing changes. Sending the same change again, from the same revision, answers with the preview that change made.\n\nFields you leave out keep their value. `options`, `inputs` and `placement` merge key by key, and `null` clears a key. Values are read strictly here: one that cannot be used is `422 invalid_field`, and nothing changes.","parameters":[{"name":"preview","in":"path","required":true,"schema":{"$ref":"#/components/schemas/PreviewId"},"example":"prv_6h1n4v8b2c7z3w9k"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewUpdate"}}}},"responses":{"200":{"description":"The preview at its new revision.","headers":{"X-Robots-Tag":{"schema":{"type":"string","enum":["noindex"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Referrer-Policy":{"schema":{"type":"string","enum":["no-referrer"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Preview"}}}},"400":{"description":"`invalid_request`, `unknown_parameter`, `id_type_mismatch`, or `country_not_served` for a country that is closed.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"`product_not_found`, `upload_not_found`, `preview_not_found` or `picture_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"`revision_conflict`: the preview changed after the revision you sent. `preview_read_only`: this is the public example and cannot be changed.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"`preview_expired`, `preview_deleted`, `picture_expired` or `upload_expired`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"`payload_too_large`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"`unsupported_media_type`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`invalid_field`, with one entry per field in `errors`. Nothing was changed.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`capacity_reached`: no new previews for a while. `service_unavailable`: our store did not answer, and nothing was recorded.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error, such as `internal_error`, `service_unavailable` or `route_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/previews/{preview}/status":{"get":{"operationId":"getPreviewStatus","tags":["Previews"],"summary":"Get Preview Status","description":"`retrievePreview` for a client that cannot read an error body. `links.check_again` is this URL with a new `nocache`. Always answers `200`: the preview, or a problem such as `rate_limited`.\n\nBoth carry `retry_after`, the seconds to wait. It is null when there is nothing to wait for, which is when the picture is `ready` or `failed`.","parameters":[{"name":"preview","in":"path","required":true,"schema":{"$ref":"#/components/schemas/PreviewId"},"example":"prv_6h1n4v8b2c7z3w9k"},{"name":"nocache","in":"query","description":"Ignored. Gives a client that caches by URL a fresh URL. The `check_again` links fill it in.","schema":{"type":"string","maxLength":32}}],"responses":{"200":{"description":"The preview, or a problem. Read `object`.","headers":{"X-Robots-Tag":{"schema":{"type":"string","enum":["noindex"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Referrer-Policy":{"schema":{"type":"string","enum":["no-referrer"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Preview"},{"$ref":"#/components/schemas/Problem"}],"discriminator":{"propertyName":"object","mapping":{"preview":"#/components/schemas/Preview","problem":"#/components/schemas/Problem"}}}}}}}}},"/v1/pictures/{picture}":{"get":{"operationId":"getPicture","tags":["Previews"],"summary":"Get Picture","description":"Get a finished picture. Its URL names the picture and nothing else, so showing it to somebody does not let them open the design. A preview gives the URL only when the picture is ready, and what it shows never changes. Caches may keep it for one day.","parameters":[{"name":"picture","in":"path","required":true,"description":"As given in `images`.","schema":{"type":"string","pattern":"^pic_[0-9a-hjkmnp-tv-z]{16}\\.jpg$"},"example":"pic_8x2v6n0r4t9w3z7b.jpg"}],"responses":{"200":{"description":"The picture.","headers":{"X-Robots-Tag":{"schema":{"type":"string","enum":["noindex"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Referrer-Policy":{"schema":{"type":"string","enum":["no-referrer"],"description":"Sent with every preview and picture."},"required":true,"description":"Sent with every preview and picture."},"Cache-Control":{"schema":{"type":"string","description":"`public, max-age=86400`. Every other status is `no-store`."},"required":true,"description":"`public, max-age=86400`. Every other status is `no-store`."}},"content":{"image/jpeg":{"schema":{"type":"string","contentMediaType":"image/jpeg"}}}},"404":{"description":"`product_not_found`, `upload_not_found`, `preview_not_found` or `picture_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"`preview_expired`, `preview_deleted`, `picture_expired` or `upload_expired`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."},"Retry-After":{"schema":{"type":"string","description":"Seconds to wait. The body says the same."},"required":true,"description":"Seconds to wait. The body says the same."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error, such as `internal_error`, `service_unavailable` or `route_not_found`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orders":{"post":{"operationId":"createOrder","tags":["Ordering"],"summary":"Create Order","description":"Orders a preview's revision at the price your user saw. Order only when your user has seen the design and its price and asked for it.\n\nThe item names the `revision` and the `price_id` your user saw. If either has changed, the answer says what is current: `409 revision_conflict` or `409 price_changed`. A preview with a blocking issue is `409 preview_incomplete`. The public example is `409 preview_read_only`. Ordering the same revision again gives the same answer. The button \"Pay\" at the end of the site's checkout makes the same call, once for each design in the cart. What we record: https://deliva.ai/privacy.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"403":{"description":"What happened to the order. `detail` says it in words for your user, and `signup_url` is a page where they can leave an email.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/OrderAnswer"}}}},"default":{"description":"The request did not pass a check. Codes: `preview_incomplete`, `revision_conflict`, `price_changed` and `preview_read_only` (409), `preview_not_found` (404), `preview_expired` and `preview_deleted` (410), `invalid_request`, `unknown_parameter` and `id_type_mismatch` (400), `payload_too_large` (413), `unsupported_media_type` (415), `rate_limited` (429), `internal_error` (500), `capacity_reached` and `service_unavailable` (503).","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/signups":{"post":{"operationId":"createSignup","tags":["Ordering"],"summary":"Create Signup","description":"Leave an email so that Deliva can write to the person about an order. The person must have asked for it. Deliva sends one email that asks to confirm the address, with a link to confirm it and one to remove it. Nothing else is sent before a confirmation. An address that is not confirmed is deleted after 30 days, and a confirmed one after 24 months at most. The answer is the same when the address is already on the list, and `detail` says if the email could not be sent. Deliva is not meant for children under 16. What we keep: https://deliva.ai/privacy.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}}},"responses":{"201":{"description":"The address is kept, not confirmed. `detail` says whether the email that asks to confirm it was sent.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Signup"}}}},"400":{"description":"`invalid_request`, `unknown_parameter` or `id_type_mismatch`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"`payload_too_large`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"415":{"description":"`unsupported_media_type`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`rate_limited`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`capacity_reached` or `service_unavailable`. Nothing was recorded.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error, such as `internal_error`.","headers":{"Request-Id":{"schema":{"type":"string","description":"`req_` ID to quote to support."},"required":true,"description":"`req_` ID to quote to support."}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"webhooks":{}}