{
    "openapi": "3.1.0",
    "info": {
        "title": "PartsToOrder public catalog API",
        "version": "1.0.0",
        "summary": "Read-only: find 3D-printed replacement parts, read one, estimate shipping, and build links for a person to open.",
        "description": "No key and no sign-in. Every endpoint is rate-limited per address (429 with Retry-After). Prices are in CAD; the shop ships within Canada only. Nothing here places an order: the person opens a link and checks out themselves. The same data is offered to MCP clients at https://partstoorder.com/mcp. More: https://partstoorder.com/llms.txt",
        "contact": {
            "url": "https://partstoorder.com/contact/"
        }
    },
    "servers": [
        {
            "url": "https://partstoorder.com"
        }
    ],
    "externalDocs": {
        "description": "How AI agents should use this shop",
        "url": "https://partstoorder.com/llms.txt"
    },
    "paths": {
        "/search.json": {
            "get": {
                "operationId": "searchParts",
                "summary": "Search the catalog",
                "description": "Approved parts only. Words can be a part name, a part number, a brand, or what it fits. Walk a result set by passing next_offset as offset. An unknown category answers 200 with \"error\" and no results.",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Search words. Empty lists the most popular parts.",
                        "schema": {
                            "type": "string",
                            "maxLength": 120
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Results per page.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50,
                            "default": 10
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "First result, 0-based.",
                        "schema": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000,
                            "default": 0
                        }
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "required": false,
                        "description": "A category slug: the path of a category page, /parts/{slug}/.",
                        "schema": {
                            "type": "string",
                            "pattern": "^[a-z0-9-]+(/[a-z0-9-]+){0,2}$"
                        }
                    },
                    {
                        "name": "in_stock",
                        "in": "query",
                        "required": false,
                        "description": "1 = only parts already made, which ship the next business day.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "1"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "One page of results.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SearchResponse"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests from this address. Retry-After says when to try again.",
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/part/{slug}.json": {
            "get": {
                "operationId": "getPart",
                "summary": "One part in full",
                "description": "Everything a search result has, plus the description, every photo and every colour/material choice that can be bought. The same part as Markdown: /part/{slug}.md.",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "description": "The last part of the part page's address, /part/{slug}/.",
                        "schema": {
                            "type": "string",
                            "pattern": "^[a-z0-9][a-z0-9-]*$"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The part.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Part"
                                }
                            }
                        }
                    },
                    "301": {
                        "description": "The part's address changed; Location has the new .json address."
                    },
                    "404": {
                        "description": "No such part (it may have been taken off the site).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests from this address. Retry-After says when to try again.",
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/shipping.json": {
            "get": {
                "operationId": "estimateShipping",
                "summary": "Estimate shipping within Canada",
                "description": "An ESTIMATE in CAD, not a quote: checkout shows the exact price once the full address is entered. Canada only: another country or a US ZIP code answers 200 with ships_to_destination false. Give either sku (and qty), or items.",
                "parameters": [
                    {
                        "name": "sku",
                        "in": "query",
                        "required": false,
                        "description": "One SKU: an option's sku, or a part's sku for its default choice.",
                        "schema": {
                            "type": "string",
                            "maxLength": 191
                        }
                    },
                    {
                        "name": "qty",
                        "in": "query",
                        "required": false,
                        "description": "How many of sku (default 1).",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "items",
                        "in": "query",
                        "required": false,
                        "description": "{sku}:{qty},{sku}:{qty}. The quantity follows the LAST colon (a SKU has colons of its own); without one it is 1. At most 20 different SKUs.",
                        "schema": {
                            "type": "string",
                            "maxLength": 4000,
                            "examples": [
                                "control-knob-d-shaft:ASA:asa-gray:2,another-sku:1"
                            ]
                        }
                    },
                    {
                        "name": "postal",
                        "in": "query",
                        "required": true,
                        "description": "ONLY the first 3 characters of the Canadian postal code, e.g. T5J. A full code is refused.",
                        "schema": {
                            "type": "string",
                            "pattern": "^[A-Za-z][0-9][A-Za-z]$"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The estimate, or that the shop does not ship there.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ShippingEstimate"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "A parameter is missing or wrong; \"usage\" says what to send.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "A sku that cannot be bought now; \"sku\" names it.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Too many requests from this address. Retry-After says when to try again.",
                        "headers": {
                            "Retry-After": {
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        },
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/feeds/catalog.json": {
            "get": {
                "operationId": "catalogIndex",
                "summary": "The whole catalog as small files: the index",
                "description": "Lists the JSON Lines files of the catalog (all parts, and one file per top category) with their sizes, so a program can fetch only what it needs. One part per line: sku, title, url, price_cad, availability, category, fits, replaces_part_numbers, updated.",
                "responses": {
                    "200": {
                        "description": "The index.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/CatalogIndex"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/cart/prefill/": {
            "get": {
                "operationId": "cartPrefillLink",
                "summary": "Link format: a pre-filled cart, for a person to open",
                "description": "NOT an API call: build this address and give it to the person. The page lists what the link asks for; nothing is added to the cart until the person confirms on that page, and they check out themselves. Programs must not confirm it for them.",
                "parameters": [
                    {
                        "required": true,
                        "name": "items",
                        "in": "query",
                        "description": "{sku}:{qty},{sku}:{qty}. The quantity follows the LAST colon (a SKU has colons of its own); without one it is 1. At most 20 different SKUs.",
                        "schema": {
                            "type": "string",
                            "maxLength": 4000,
                            "examples": [
                                "control-knob-d-shaft:ASA:asa-gray:2,another-sku:1"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A web page for the person.",
                        "content": {
                            "text/html": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/custom/": {
            "get": {
                "operationId": "customPrintLink",
                "summary": "Link format: a pre-filled custom-print request, for a person to open",
                "description": "NOT an API call: build this address and give it to the person when nothing in the catalog fits. The form opens with the description filled in; the person adds their email and submits it themselves. Programs must not submit it.",
                "parameters": [
                    {
                        "name": "part",
                        "in": "query",
                        "required": false,
                        "description": "What is needed, up to 150 characters (URL-encoded): the part, what it fits, measurements in mm, any part number.",
                        "schema": {
                            "type": "string",
                            "maxLength": 150
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A web page for the person.",
                        "content": {
                            "text/html": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Error": {
                "type": "object",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "string"
                    }
                }
            },
            "SearchResponse": {
                "type": "object",
                "required": [
                    "query",
                    "total",
                    "offset",
                    "limit",
                    "next_offset",
                    "results",
                    "currency"
                ],
                "properties": {
                    "query": {
                        "type": "string"
                    },
                    "total": {
                        "type": "integer",
                        "description": "All matches, not only this page."
                    },
                    "offset": {
                        "type": "integer"
                    },
                    "limit": {
                        "type": "integer"
                    },
                    "next_offset": {
                        "description": "Pass as offset for the next page; null on the last page.",
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "category": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            },
                            "url": {
                                "type": "string"
                            }
                        }
                    },
                    "error": {
                        "type": "string",
                        "description": "Present when the request could not be answered as asked (for example an unknown category)."
                    },
                    "results": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "title",
                                "sku",
                                "url",
                                "price_cad",
                                "availability",
                                "options"
                            ],
                            "properties": {
                                "title": {
                                    "type": "string"
                                },
                                "sku": {
                                    "type": "string",
                                    "description": "The part's id. Each entry of options has the SKU of one colour/material."
                                },
                                "url": {
                                    "type": "string",
                                    "description": "The part page: give this to the person."
                                },
                                "json_url": {
                                    "type": "string"
                                },
                                "summary": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "price_cad": {
                                    "description": "Price in Canadian dollars; null when the part cannot be bought now.",
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "availability": {
                                    "type": "string",
                                    "description": "in_stock and made_to_order can be bought now; the others cannot and have no price."
                                },
                                "in_stock_options": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "ships": {
                                    "description": "When it ships, in words.",
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "material": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "size_mm": {
                                    "description": "Outer size, millimetres.",
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "fits": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    },
                                    "description": "Makes, models and products it fits."
                                },
                                "replaces_part_numbers": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "original_brand": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "original_discontinued": {
                                    "type": "boolean"
                                },
                                "image": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "category": {
                                    "description": "The part's own category.",
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "string"
                                                },
                                                "path": {
                                                    "type": "string",
                                                    "description": "Names from the top category down, joined by \" > \"."
                                                },
                                                "slug": {
                                                    "type": "string",
                                                    "description": "The value search_parts takes as category."
                                                },
                                                "url": {
                                                    "type": "string"
                                                }
                                            }
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "options": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "description": "One choice the buy box offers (a colour and/or material).",
                                        "required": [
                                            "sku",
                                            "price_cad",
                                            "availability",
                                            "url"
                                        ],
                                        "properties": {
                                            "sku": {
                                                "type": "string",
                                                "description": "The SKU of this choice: use it in cart links and shipping estimates."
                                            },
                                            "colour": {
                                                "anyOf": [
                                                    {
                                                        "type": "string"
                                                    },
                                                    {
                                                        "type": "null"
                                                    }
                                                ]
                                            },
                                            "material": {
                                                "anyOf": [
                                                    {
                                                        "type": "string"
                                                    },
                                                    {
                                                        "type": "null"
                                                    }
                                                ]
                                            },
                                            "price_cad": {
                                                "type": "string",
                                                "description": "Price of one, Canadian dollars, as a decimal string (\"6.45\")."
                                            },
                                            "availability": {
                                                "type": "string",
                                                "enum": [
                                                    "in_stock",
                                                    "made_to_order"
                                                ]
                                            },
                                            "ships_in_business_days": {
                                                "type": "integer",
                                                "description": "Business days until it ships (0 = next business day pickup by the carrier)."
                                            },
                                            "url": {
                                                "type": "string",
                                                "description": "The part page with this choice ticked."
                                            },
                                            "our_choice": {
                                                "type": "boolean",
                                                "description": "True on a \"Doesn't Matter\" choice: the shop picks the colour and/or material."
                                            },
                                            "comes_in": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "description": "Empty when the part cannot be bought now."
                                }
                            }
                        }
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "CAD"
                        ]
                    },
                    "ships_to": {
                        "type": "object",
                        "description": "Country code => name.",
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "custom_print": {
                        "type": "object",
                        "required": [
                            "url"
                        ],
                        "properties": {
                            "url": {
                                "type": "string"
                            },
                            "note": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "Part": {
                "type": "object",
                "required": [
                    "title",
                    "sku",
                    "url",
                    "json_url",
                    "description",
                    "price_cad",
                    "availability",
                    "options",
                    "images",
                    "handling_days",
                    "currency"
                ],
                "properties": {
                    "options": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "description": "One choice the buy box offers (a colour and/or material).",
                            "required": [
                                "sku",
                                "price_cad",
                                "availability",
                                "url"
                            ],
                            "properties": {
                                "sku": {
                                    "type": "string",
                                    "description": "The SKU of this choice: use it in cart links and shipping estimates."
                                },
                                "colour": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "material": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "price_cad": {
                                    "type": "string",
                                    "description": "Price of one, Canadian dollars, as a decimal string (\"6.45\")."
                                },
                                "availability": {
                                    "type": "string",
                                    "enum": [
                                        "in_stock",
                                        "made_to_order"
                                    ]
                                },
                                "ships_in_business_days": {
                                    "type": "integer",
                                    "description": "Business days until it ships (0 = next business day pickup by the carrier)."
                                },
                                "url": {
                                    "type": "string",
                                    "description": "The part page with this choice ticked."
                                },
                                "our_choice": {
                                    "type": "boolean",
                                    "description": "True on a \"Doesn't Matter\" choice: the shop picks the colour and/or material."
                                },
                                "comes_in": {
                                    "type": "string"
                                },
                                "default": {
                                    "type": "boolean",
                                    "description": "The choice the page opens with."
                                },
                                "colour_hex": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "label": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "in_stock_qty": {
                                    "description": "Made and on the shelf now.",
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "preorder_arrives": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "ships": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "note": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "max_qty": {
                                    "type": "integer",
                                    "description": "Most of this choice one order may hold."
                                },
                                "weight_g": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "image": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        },
                        "description": "Every choice that can be bought now; empty when none can."
                    },
                    "title": {
                        "type": "string"
                    },
                    "sku": {
                        "type": "string",
                        "description": "The part's id. Each entry of options has the SKU of one colour/material."
                    },
                    "url": {
                        "type": "string",
                        "description": "The part page: give this to the person."
                    },
                    "json_url": {
                        "type": "string"
                    },
                    "summary": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "price_cad": {
                        "description": "Price in Canadian dollars; null when the part cannot be bought now.",
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "availability": {
                        "type": "string",
                        "description": "in_stock and made_to_order can be bought now; the others cannot and have no price."
                    },
                    "in_stock_options": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "ships": {
                        "description": "When it ships, in words.",
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "material": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "size_mm": {
                        "description": "Outer size, millimetres.",
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "fits": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "Makes, models and products it fits."
                    },
                    "replaces_part_numbers": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "original_brand": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "original_discontinued": {
                        "type": "boolean"
                    },
                    "image": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "category": {
                        "description": "The part's own category.",
                        "anyOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string"
                                    },
                                    "path": {
                                        "type": "string",
                                        "description": "Names from the top category down, joined by \" > \"."
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "The value search_parts takes as category."
                                    },
                                    "url": {
                                        "type": "string"
                                    }
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "markdown_url": {
                        "type": "string"
                    },
                    "description": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "category_path": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "slug": {
                                    "type": "string"
                                },
                                "url": {
                                    "type": "string"
                                }
                            }
                        },
                        "description": "From the top category down."
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "CAD"
                        ]
                    },
                    "price_min_cad": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "price_max_cad": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "was_price_cad": {
                        "description": "The price before the current markdown.",
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "sale_ends_at": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "handling_days": {
                        "description": "Business days until it ships, least to most over the options.",
                        "anyOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "min": {
                                        "type": "integer"
                                    },
                                    "max": {
                                        "type": "integer"
                                    }
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "ships_to": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "weight_g": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "safety_note": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "made_in": {
                        "type": "string"
                    },
                    "images": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string"
                                },
                                "alt": {
                                    "type": "string"
                                },
                                "view": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "option_sku": {
                                    "description": "The option this photo shows, when it shows one colour.",
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "returns": {
                        "type": "object",
                        "properties": {
                            "days": {
                                "type": "integer"
                            },
                            "url": {
                                "type": "string"
                            }
                        }
                    },
                    "custom_print": {
                        "type": "object",
                        "required": [
                            "url"
                        ],
                        "properties": {
                            "url": {
                                "type": "string"
                            },
                            "note": {
                                "type": "string"
                            }
                        }
                    },
                    "how_to_buy": {
                        "type": "string"
                    },
                    "kit": {
                        "type": "object",
                        "description": "Present on kits and sets: the pieces that come in it.",
                        "properties": {
                            "pieces": {
                                "type": "integer"
                            },
                            "note": {
                                "type": "string"
                            },
                            "parts": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "qty": {
                                            "type": "integer"
                                        },
                                        "size": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        },
                                        "url": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        },
                                        "json_url": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "null"
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "availability_note": {
                        "type": "string"
                    },
                    "notify_url": {
                        "type": "string"
                    },
                    "listed": {
                        "type": "boolean",
                        "description": "Only ever present, as false, on the staging site and in the owner's preview."
                    }
                }
            },
            "ShippingEstimate": {
                "type": "object",
                "required": [
                    "ships_to_destination"
                ],
                "properties": {
                    "estimate": {
                        "type": "boolean",
                        "description": "True: this is an estimate, not the checkout price."
                    },
                    "ships_to_destination": {
                        "type": "boolean",
                        "description": "False when the destination is outside Canada; then only message and ships_to follow."
                    },
                    "message": {
                        "type": "string"
                    },
                    "ships_to": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "CAD"
                        ]
                    },
                    "destination": {
                        "type": "object",
                        "properties": {
                            "country": {
                                "type": "string"
                            },
                            "postal_prefix": {
                                "type": "string"
                            }
                        }
                    },
                    "items": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "sku",
                                "qty",
                                "unit_price_cad"
                            ],
                            "properties": {
                                "sku": {
                                    "type": "string"
                                },
                                "item_sku": {
                                    "type": "string"
                                },
                                "title": {
                                    "type": "string"
                                },
                                "option": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                },
                                "url": {
                                    "type": "string"
                                },
                                "qty": {
                                    "type": "integer"
                                },
                                "unit_price_cad": {
                                    "type": "string"
                                },
                                "availability": {
                                    "type": "string",
                                    "enum": [
                                        "in_stock",
                                        "made_to_order",
                                        "preorder"
                                    ]
                                },
                                "handling_business_days": {
                                    "type": "integer"
                                },
                                "ships": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "null"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "items_subtotal_cad": {
                        "type": "string"
                    },
                    "shipping": {
                        "type": "object",
                        "required": [
                            "price_cad"
                        ],
                        "properties": {
                            "carrier": {
                                "type": "string"
                            },
                            "service": {
                                "type": "string"
                            },
                            "price_cad": {
                                "description": "The shipping price for the cheapest service; null when it could not be estimated.",
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "price_max_cad": {
                                "description": "Higher than price_cad only in a few rural areas, where some remote communities pay up to this.",
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "source": {
                                "description": "canada_post: Canada Post's price as checkout quotes it. rate_table: an upper estimate from stored rates.",
                                "anyOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "services": {
                                "description": "Every service on offer, cheapest first (with a canada_post price only).",
                                "anyOf": [
                                    {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "service": {
                                                    "type": "string"
                                                },
                                                "price_cad": {
                                                    "type": "string"
                                                },
                                                "price_max_cad": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "price_is": {
                                "type": "string"
                            },
                            "parcels": {
                                "type": "integer"
                            },
                            "parcel_sizes": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "transit_business_days": {
                                "type": "object",
                                "properties": {
                                    "min": {
                                        "type": "integer"
                                    },
                                    "max": {
                                        "type": "integer"
                                    }
                                }
                            },
                            "transit_note": {
                                "type": "string"
                            }
                        }
                    },
                    "ships_by": {
                        "description": "Date (YYYY-MM-DD) the order would leave the shop if placed now.",
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "estimated_delivery": {
                        "anyOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "earliest": {
                                        "type": "string"
                                    },
                                    "latest": {
                                        "type": "string"
                                    }
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "local_delivery": {
                        "anyOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string"
                                    },
                                    "price_cad": {
                                        "type": "string"
                                    },
                                    "note": {
                                        "type": "string"
                                    }
                                }
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "tax": {
                        "type": "object",
                        "properties": {
                            "label": {
                                "type": "string"
                            },
                            "text": {
                                "type": "string"
                            }
                        }
                    },
                    "estimated_total_cad": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "note": {
                        "type": "string"
                    }
                }
            },
            "CatalogIndex": {
                "type": "object",
                "required": [
                    "built",
                    "parts",
                    "all",
                    "categories"
                ],
                "properties": {
                    "built": {
                        "type": "string"
                    },
                    "parts": {
                        "type": "integer"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "ships_to": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "string"
                        }
                    },
                    "format": {
                        "type": "string"
                    },
                    "all": {
                        "type": "object",
                        "required": [
                            "url",
                            "parts"
                        ],
                        "properties": {
                            "url": {
                                "type": "string"
                            },
                            "parts": {
                                "type": "integer"
                            },
                            "bytes": {
                                "type": "integer"
                            },
                            "gzip_bytes": {
                                "type": "integer"
                            },
                            "last_modified": {
                                "type": "string"
                            },
                            "etag": {
                                "type": "string"
                            }
                        }
                    },
                    "categories": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "required": [
                                "category",
                                "url",
                                "parts"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string"
                                },
                                "parts": {
                                    "type": "integer"
                                },
                                "bytes": {
                                    "type": "integer"
                                },
                                "gzip_bytes": {
                                    "type": "integer"
                                },
                                "last_modified": {
                                    "type": "string"
                                },
                                "etag": {
                                    "type": "string"
                                },
                                "category": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "page": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}