{
  "components": {
    "headers": {
      "API-Version": {
        "description": "Version of the API that served the response.",
        "schema": {
          "example": "2.1.0",
          "type": "string"
        }
      },
      "Deprecation": {
        "description": "RFC 9745 deprecation timestamp when an endpoint is scheduled for replacement.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Limit": {
        "description": "Maximum number of requests permitted in the current rate-limit window.",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "RateLimit-Policy": {
        "description": "IETF RateLimit policy declaration (for example `600;w=60`).",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit-Remaining": {
        "description": "Number of requests remaining in the current rate-limit window.",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until the rate-limit quota resets.",
        "schema": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying after a 429 Too Many Requests response.",
        "schema": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "Sunset": {
        "description": "RFC 8594 HTTP-date after which a deprecated endpoint will be removed (at least 90 days notice).",
        "schema": {
          "type": "string"
        }
      }
    },
    "parameters": {
      "ApiVersion": {
        "description": "Requested API version label (defaults to the current stable version).",
        "in": "header",
        "name": "API-Version",
        "required": false,
        "schema": {
          "default": "2.1.0",
          "type": "string"
        }
      }
    },
    "schemas": {
      "ProblemDetails": {
        "properties": {
          "code": {
            "description": "Machine-readable error code.",
            "type": "string"
          },
          "detail": {
            "description": "Explanation of this specific error.",
            "type": "string"
          },
          "hint": {
            "description": "Actionable recovery guidance for callers.",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code.",
            "type": "integer"
          },
          "title": {
            "description": "Short summary of the error.",
            "type": "string"
          },
          "type": {
            "description": "Stable URI identifying the error class.",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "oauth2": {
        "description": "Least-privilege OAuth 2.1 scopes for authenticated operations; public read operations also accept anonymous requests.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://shop.ferrite.run/oauth/authorize",
            "scopes": {
              "apps:discover": "Discover available operations, schemas, and public metadata.",
              "apps:read": "Read-only access to declared GET and read-only operations.",
              "apps:write": "Invoke mutating operations and asynchronous jobs."
            },
            "tokenUrl": "https://shop.ferrite.run/oauth/token"
          }
        },
        "type": "oauth2"
      }
    }
  },
  "info": {
    "description": "Ferrite Supply is a demonstration shop that people and AI agents use in the same way: six products with prices in pounds and live stock, and orders placed as a guest, without an account. The server works out every amount, then reserves the stock and records the order in one write, so two buyers never both get the last unit and a repeated request returns the order it already made. Each guest order comes with a manage token that reads or cancels that order and no other. The public demonstration takes no payment and ships nothing.\n\nVersioning and deprecation policy: endpoints are versioned via URL path and the optional `API-Version` header (current version: 2.1.0). Deprecated endpoints emit RFC 9745 `Deprecation` and RFC 8594 `Sunset` response headers at least 90 days before removal. Rate limits are communicated via IETF `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset`, `RateLimit-Policy`, and `Retry-After` headers.",
    "title": "Ferrite Supply",
    "version": "2.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/account/security": {
      "get": {
        "operationId": "account_security",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "admin_access": {
                      "description": "The admin gate's verdict for the caller.",
                      "properties": {
                        "allowed": {
                          "description": "Whether /admin and the admin actions admit this caller.",
                          "type": "boolean"
                        },
                        "code": {
                          "description": "The refusal code when not allowed.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "message": {
                          "description": "The refusal explanation when not allowed.",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "allowed"
                      ],
                      "type": "object"
                    },
                    "authority": {
                      "description": "Who holds credentials for this shop, in one sentence.",
                      "properties": {
                        "statement": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "recovery_boundary": {
                      "description": "What a session made through account recovery may do, and the paths that refuse it.",
                      "properties": {
                        "assurance_note": {
                          "type": "string"
                        },
                        "lifetime": {
                          "type": "string"
                        },
                        "permitted": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "refusal_code": {
                          "type": "string"
                        },
                        "refused_prefixes": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "session_kind": {
                          "type": "string"
                        },
                        "statement": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "session": {
                      "description": "The caller's session; authenticated is false for a guest.",
                      "properties": {
                        "assurance_level": {
                          "type": "integer"
                        },
                        "authenticated": {
                          "type": "boolean"
                        },
                        "subject_id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "authenticated"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "authority",
                    "recovery_boundary",
                    "session",
                    "admin_access"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Read how the shop decides who a caller is. Use it when an operation answers authentication_required or admin_required and you want to know why. Returns the caller's session, whether the admin console would admit it, and what a recovery session may not do.",
        "x-idempotent": true,
        "x-read-only": true
      }
    },
    "/api/catalog": {
      "get": {
        "operationId": "list_products",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "pricing": {
                      "description": "The pricing rules the cart applies for its live totals. The server recomputes every amount at placement; these are declared so the cart's running total is derived from the same rules rather than a copy in the bundle.",
                      "properties": {
                        "coupons": {
                          "description": "The coupons the shop honours.",
                          "items": {
                            "description": "One coupon the shop honours.",
                            "properties": {
                              "code": {
                                "description": "The code, upper-case.",
                                "type": "string"
                              },
                              "percent_off": {
                                "description": "The whole-percentage discount off the subtotal.",
                                "type": "integer"
                              }
                            },
                            "required": [
                              "code",
                              "percent_off"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "currency": {
                          "description": "The ISO currency code every amount is in (gbp).",
                          "type": "string"
                        },
                        "express_shipping_pence": {
                          "description": "Express delivery, in pence.",
                          "type": "integer"
                        },
                        "free_standard_shipping_from_pence": {
                          "description": "Standard delivery is free once the discounted subtotal reaches this.",
                          "type": "integer"
                        },
                        "max_quantity_per_line": {
                          "description": "The most units of one product an order may carry.",
                          "type": "integer"
                        },
                        "standard_shipping_pence": {
                          "description": "Standard delivery, in pence.",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "currency",
                        "standard_shipping_pence",
                        "express_shipping_pence",
                        "free_standard_shipping_from_pence",
                        "max_quantity_per_line",
                        "coupons"
                      ],
                      "type": "object"
                    },
                    "products": {
                      "items": {
                        "description": "One catalogue product with its live stock.",
                        "properties": {
                          "category": {
                            "description": "The catalogue category.",
                            "type": "string"
                          },
                          "code": {
                            "description": "The product code (FS-101). Orders name products by code.",
                            "type": "string"
                          },
                          "initial_stock": {
                            "description": "Units the shop opened with.",
                            "type": "integer"
                          },
                          "name": {
                            "description": "The display name.",
                            "type": "string"
                          },
                          "price_pence": {
                            "description": "The unit price in pence.",
                            "type": "integer"
                          },
                          "slug": {
                            "description": "The URL slug the product page lives under.",
                            "type": "string"
                          },
                          "specification": {
                            "description": "The specification line (A6 · 160 pages · lay-flat binding).",
                            "type": "string"
                          },
                          "stock": {
                            "description": "Units currently available to order.",
                            "type": "integer"
                          },
                          "summary": {
                            "description": "One line of what it is for.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "slug",
                          "name",
                          "category",
                          "price_pence",
                          "summary",
                          "specification",
                          "stock",
                          "initial_stock"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "products",
                    "pricing"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "List the six products with their live stock, and the rules an order is priced by. Use it first, to find product codes and prices. Returns each product's code, slug, price in pence, specification and stock, plus delivery charges, the free-delivery threshold and coupons.",
        "x-idempotent": true,
        "x-read-only": true
      }
    },
    "/api/guest/orders": {
      "post": {
        "operationId": "place_guest_order",
        "parameters": [
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "coupon": {
                    "description": "a coupon code from list_products, if you have one",
                    "type": "string"
                  },
                  "delivery": {
                    "description": "the UK delivery address",
                    "examples": [
                      {
                        "city": "London",
                        "country": "GB",
                        "line1": "1 Sample Street",
                        "postcode": "SW1A 2AA",
                        "recipient": "Sam Example"
                      }
                    ],
                    "properties": {
                      "city": {
                        "description": "the town or city",
                        "examples": [
                          "London"
                        ],
                        "type": "string"
                      },
                      "country": {
                        "description": "GB: the shop delivers within the United Kingdom",
                        "examples": [
                          "GB"
                        ],
                        "type": "string"
                      },
                      "line1": {
                        "description": "the first address line",
                        "examples": [
                          "1 Sample Street"
                        ],
                        "type": "string"
                      },
                      "line2": {
                        "description": "the second address line, if there is one",
                        "type": "string"
                      },
                      "postcode": {
                        "description": "a UK postcode with its space",
                        "examples": [
                          "SW1A 2AA"
                        ],
                        "type": "string"
                      },
                      "recipient": {
                        "description": "who receives the parcel",
                        "examples": [
                          "Sam Example"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "recipient",
                      "line1",
                      "city",
                      "postcode",
                      "country"
                    ],
                    "type": "object"
                  },
                  "email": {
                    "description": "the guest's contact email",
                    "examples": [
                      "sam@example.com"
                    ],
                    "type": "string"
                  },
                  "items": {
                    "description": "the products to order, one line each",
                    "examples": [
                      [
                        {
                          "code": "FS-101",
                          "quantity": 1
                        }
                      ]
                    ],
                    "items": {
                      "properties": {
                        "code": {
                          "description": "a product code from list_products",
                          "examples": [
                            "FS-101"
                          ],
                          "type": "string"
                        },
                        "quantity": {
                          "description": "how many units, 1 to 10",
                          "examples": [
                            1
                          ],
                          "maximum": 10,
                          "minimum": 1,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "code",
                        "quantity"
                      ],
                      "type": "object"
                    },
                    "maxItems": 6,
                    "minItems": 1,
                    "type": "array"
                  },
                  "shipping_choice": {
                    "description": "the delivery service, priced by list_products",
                    "enum": [
                      "standard",
                      "express"
                    ],
                    "examples": [
                      "standard"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "email",
                  "items",
                  "delivery",
                  "shipping_choice"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What placing an order answers with.",
                  "properties": {
                    "idempotent": {
                      "description": "Whether this was a replay of an earlier placement.",
                      "type": "boolean"
                    },
                    "manage_token": {
                      "description": "A guest's manage token; absent for a signed-in customer.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "order": {
                      "description": "One order.",
                      "properties": {
                        "checkout_url": {
                          "description": "The hosted checkout URL, once checkout opened.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "confirmation_email": {
                          "description": "The confirmation-email outbox entry, created at payment.",
                          "oneOf": [
                            {
                              "description": "The durable confirmation-email outbox entry of one order.",
                              "properties": {
                                "attempts": {
                                  "description": "Provider sends attempted.",
                                  "type": "integer"
                                },
                                "idempotency_key": {
                                  "description": "The provider idempotency key every attempt presents.",
                                  "type": "string"
                                },
                                "last_error": {
                                  "description": "The last failure, as a stable code.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "provider_id": {
                                  "description": "The provider's message id once accepted.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "state": {
                                  "description": "pending | sent | retryable | not_configured.",
                                  "type": "string"
                                },
                                "updated_ms": {
                                  "description": "When the ledger last changed (epoch ms).",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "state",
                                "attempts",
                                "idempotency_key",
                                "updated_ms"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "coupon": {
                          "description": "The coupon applied, if any.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_ms": {
                          "description": "When it was placed (epoch ms).",
                          "type": "string"
                        },
                        "delivery": {
                          "description": "A UK delivery address.",
                          "properties": {
                            "city": {
                              "description": "The town or city.",
                              "type": "string"
                            },
                            "country": {
                              "description": "GB.",
                              "type": "string"
                            },
                            "line1": {
                              "description": "The first address line.",
                              "type": "string"
                            },
                            "line2": {
                              "description": "The second address line, possibly empty.",
                              "type": "string"
                            },
                            "postcode": {
                              "description": "The postcode, with its space.",
                              "type": "string"
                            },
                            "recipient": {
                              "description": "Who receives the parcel.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "recipient",
                            "line1",
                            "line2",
                            "city",
                            "postcode",
                            "country"
                          ],
                          "type": "object"
                        },
                        "discount_pence": {
                          "description": "The discount in pence.",
                          "type": "integer"
                        },
                        "guest": {
                          "description": "Whether a guest placed it.",
                          "type": "boolean"
                        },
                        "id": {
                          "description": "The order id (FS-… for a customer, FG-… for a guest).",
                          "type": "string"
                        },
                        "items": {
                          "description": "The lines.",
                          "items": {
                            "description": "One line of an order.",
                            "properties": {
                              "code": {
                                "description": "The product code.",
                                "type": "string"
                              },
                              "line_total_pence": {
                                "description": "quantity × unit_price_pence.",
                                "type": "integer"
                              },
                              "name": {
                                "description": "The product name, denormalised for display.",
                                "type": "string"
                              },
                              "quantity": {
                                "description": "Units ordered.",
                                "type": "integer"
                              },
                              "unit_price_pence": {
                                "description": "The unit price at placement, in pence.",
                                "type": "integer"
                              }
                            },
                            "required": [
                              "code",
                              "name",
                              "quantity",
                              "unit_price_pence",
                              "line_total_pence"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "refund_state": {
                          "description": "The refund state Stripe reported, once refunded.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "shipping_choice": {
                          "description": "standard | express.",
                          "type": "string"
                        },
                        "shipping_pence": {
                          "description": "The delivery charge in pence.",
                          "type": "integer"
                        },
                        "status": {
                          "description": "placed | checkout_open | payment_pending | paid | fulfilled | shipped | delivered | cancelled | expired | refunded.",
                          "type": "string"
                        },
                        "stock_reserved": {
                          "description": "Whether stock is still reserved against this order.",
                          "type": "boolean"
                        },
                        "stripe_session_id": {
                          "description": "The Stripe Checkout Session id, once checkout opened.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "subtotal_pence": {
                          "description": "The subtotal in pence.",
                          "type": "integer"
                        },
                        "total_pence": {
                          "description": "The total the customer pays, in pence.",
                          "type": "integer"
                        },
                        "tracking_carrier": {
                          "description": "The carrier, once shipped.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "tracking_number": {
                          "description": "The tracking number, once shipped.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "updated_ms": {
                          "description": "When it last changed (epoch ms).",
                          "type": "string"
                        },
                        "user_email": {
                          "description": "The contact email.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "guest",
                        "user_email",
                        "status",
                        "items",
                        "delivery",
                        "shipping_choice",
                        "subtotal_pence",
                        "discount_pence",
                        "shipping_pence",
                        "total_pence",
                        "stock_reserved",
                        "created_ms",
                        "updated_ms"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "order",
                    "idempotent"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Place an order as a guest, without an account. Use it once you know the product codes and the delivery address; it reserves stock and charges nothing. Returns the priced order and its manage_token, the only way to read or cancel it later. Repeating the idempotency-key returns the same order.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/orders/{id}": {
      "get": {
        "operationId": "get_order",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the order id",
              "examples": [
                "FG-SAMPLE"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "manage_token",
            "required": true,
            "schema": {
              "description": "the manage token place_guest_order returned for this order; it can also be sent as the x-order-token header",
              "examples": [
                "sample"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "order": {
                      "description": "One order.",
                      "properties": {
                        "checkout_url": {
                          "description": "The hosted checkout URL, once checkout opened.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "confirmation_email": {
                          "description": "The confirmation-email outbox entry, created at payment.",
                          "oneOf": [
                            {
                              "description": "The durable confirmation-email outbox entry of one order.",
                              "properties": {
                                "attempts": {
                                  "description": "Provider sends attempted.",
                                  "type": "integer"
                                },
                                "idempotency_key": {
                                  "description": "The provider idempotency key every attempt presents.",
                                  "type": "string"
                                },
                                "last_error": {
                                  "description": "The last failure, as a stable code.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "provider_id": {
                                  "description": "The provider's message id once accepted.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "state": {
                                  "description": "pending | sent | retryable | not_configured.",
                                  "type": "string"
                                },
                                "updated_ms": {
                                  "description": "When the ledger last changed (epoch ms).",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "state",
                                "attempts",
                                "idempotency_key",
                                "updated_ms"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "coupon": {
                          "description": "The coupon applied, if any.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_ms": {
                          "description": "When it was placed (epoch ms).",
                          "type": "string"
                        },
                        "delivery": {
                          "description": "A UK delivery address.",
                          "properties": {
                            "city": {
                              "description": "The town or city.",
                              "type": "string"
                            },
                            "country": {
                              "description": "GB.",
                              "type": "string"
                            },
                            "line1": {
                              "description": "The first address line.",
                              "type": "string"
                            },
                            "line2": {
                              "description": "The second address line, possibly empty.",
                              "type": "string"
                            },
                            "postcode": {
                              "description": "The postcode, with its space.",
                              "type": "string"
                            },
                            "recipient": {
                              "description": "Who receives the parcel.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "recipient",
                            "line1",
                            "line2",
                            "city",
                            "postcode",
                            "country"
                          ],
                          "type": "object"
                        },
                        "discount_pence": {
                          "description": "The discount in pence.",
                          "type": "integer"
                        },
                        "guest": {
                          "description": "Whether a guest placed it.",
                          "type": "boolean"
                        },
                        "id": {
                          "description": "The order id (FS-… for a customer, FG-… for a guest).",
                          "type": "string"
                        },
                        "items": {
                          "description": "The lines.",
                          "items": {
                            "description": "One line of an order.",
                            "properties": {
                              "code": {
                                "description": "The product code.",
                                "type": "string"
                              },
                              "line_total_pence": {
                                "description": "quantity × unit_price_pence.",
                                "type": "integer"
                              },
                              "name": {
                                "description": "The product name, denormalised for display.",
                                "type": "string"
                              },
                              "quantity": {
                                "description": "Units ordered.",
                                "type": "integer"
                              },
                              "unit_price_pence": {
                                "description": "The unit price at placement, in pence.",
                                "type": "integer"
                              }
                            },
                            "required": [
                              "code",
                              "name",
                              "quantity",
                              "unit_price_pence",
                              "line_total_pence"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "refund_state": {
                          "description": "The refund state Stripe reported, once refunded.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "shipping_choice": {
                          "description": "standard | express.",
                          "type": "string"
                        },
                        "shipping_pence": {
                          "description": "The delivery charge in pence.",
                          "type": "integer"
                        },
                        "status": {
                          "description": "placed | checkout_open | payment_pending | paid | fulfilled | shipped | delivered | cancelled | expired | refunded.",
                          "type": "string"
                        },
                        "stock_reserved": {
                          "description": "Whether stock is still reserved against this order.",
                          "type": "boolean"
                        },
                        "stripe_session_id": {
                          "description": "The Stripe Checkout Session id, once checkout opened.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "subtotal_pence": {
                          "description": "The subtotal in pence.",
                          "type": "integer"
                        },
                        "total_pence": {
                          "description": "The total the customer pays, in pence.",
                          "type": "integer"
                        },
                        "tracking_carrier": {
                          "description": "The carrier, once shipped.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "tracking_number": {
                          "description": "The tracking number, once shipped.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "updated_ms": {
                          "description": "When it last changed (epoch ms).",
                          "type": "string"
                        },
                        "user_email": {
                          "description": "The contact email.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "guest",
                        "user_email",
                        "status",
                        "items",
                        "delivery",
                        "shipping_choice",
                        "subtotal_pence",
                        "discount_pence",
                        "shipping_pence",
                        "total_pence",
                        "stock_reserved",
                        "created_ms",
                        "updated_ms"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "order"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Read one order with its manage token. Use it to check the status, the lines, the totals and the delivery address after placing or cancelling. Returns the order. The sample order in the example can always be read.",
        "x-idempotent": true,
        "x-read-only": true
      }
    },
    "/api/orders/{id}/email": {
      "get": {
        "operationId": "get_order_email",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the order id",
              "examples": [
                "FG-SAMPLE"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "manage_token",
            "required": true,
            "schema": {
              "description": "the manage token place_guest_order returned for this order; it can also be sent as the x-order-token header",
              "examples": [
                "sample"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "email": {
                      "description": "The state of the confirmation email; null until the order is paid.",
                      "properties": {
                        "attempts": {
                          "description": "Provider sends attempted.",
                          "type": "integer"
                        },
                        "idempotency_key": {
                          "description": "The provider idempotency key every attempt presents.",
                          "type": "string"
                        },
                        "last_error": {
                          "description": "The last failure, as a stable code.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "provider_id": {
                          "description": "The provider's message id once accepted.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "state": {
                          "description": "pending | sent | retryable | not_configured.",
                          "type": "string"
                        },
                        "updated_ms": {
                          "description": "When the ledger last changed (epoch ms).",
                          "type": "string"
                        }
                      },
                      "required": [
                        "state",
                        "attempts",
                        "idempotency_key",
                        "updated_ms"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "order_id": {
                      "description": "The order id.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "order_id",
                    "email"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Read what happened to an order's confirmation email. Use it when a buyer with a paid order says that no email arrived. Returns its state, the number of attempts and the last error, or null for an order that has not been paid.",
        "x-idempotent": true,
        "x-read-only": true
      }
    },
    "/api/orders/{order_id}/cancel": {
      "post": {
        "operationId": "cancel_order",
        "parameters": [
          {
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "description": "the order id",
              "examples": [
                "FG-SAMPLE"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "manage_token": {
                    "description": "the manage token place_guest_order returned for this order; it can also be sent as the x-order-token header",
                    "examples": [
                      "sample"
                    ],
                    "type": "string"
                  },
                  "order_id": {
                    "description": "the order id",
                    "examples": [
                      "FG-SAMPLE"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "order_id",
                  "manage_token"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "One order.",
                  "properties": {
                    "checkout_url": {
                      "description": "The hosted checkout URL, once checkout opened.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "confirmation_email": {
                      "description": "The confirmation-email outbox entry, created at payment.",
                      "oneOf": [
                        {
                          "description": "The durable confirmation-email outbox entry of one order.",
                          "properties": {
                            "attempts": {
                              "description": "Provider sends attempted.",
                              "type": "integer"
                            },
                            "idempotency_key": {
                              "description": "The provider idempotency key every attempt presents.",
                              "type": "string"
                            },
                            "last_error": {
                              "description": "The last failure, as a stable code.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "provider_id": {
                              "description": "The provider's message id once accepted.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "state": {
                              "description": "pending | sent | retryable | not_configured.",
                              "type": "string"
                            },
                            "updated_ms": {
                              "description": "When the ledger last changed (epoch ms).",
                              "type": "string"
                            }
                          },
                          "required": [
                            "state",
                            "attempts",
                            "idempotency_key",
                            "updated_ms"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "coupon": {
                      "description": "The coupon applied, if any.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_ms": {
                      "description": "When it was placed (epoch ms).",
                      "type": "string"
                    },
                    "delivery": {
                      "description": "A UK delivery address.",
                      "properties": {
                        "city": {
                          "description": "The town or city.",
                          "type": "string"
                        },
                        "country": {
                          "description": "GB.",
                          "type": "string"
                        },
                        "line1": {
                          "description": "The first address line.",
                          "type": "string"
                        },
                        "line2": {
                          "description": "The second address line, possibly empty.",
                          "type": "string"
                        },
                        "postcode": {
                          "description": "The postcode, with its space.",
                          "type": "string"
                        },
                        "recipient": {
                          "description": "Who receives the parcel.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "recipient",
                        "line1",
                        "line2",
                        "city",
                        "postcode",
                        "country"
                      ],
                      "type": "object"
                    },
                    "discount_pence": {
                      "description": "The discount in pence.",
                      "type": "integer"
                    },
                    "guest": {
                      "description": "Whether a guest placed it.",
                      "type": "boolean"
                    },
                    "id": {
                      "description": "The order id (FS-… for a customer, FG-… for a guest).",
                      "type": "string"
                    },
                    "items": {
                      "description": "The lines.",
                      "items": {
                        "description": "One line of an order.",
                        "properties": {
                          "code": {
                            "description": "The product code.",
                            "type": "string"
                          },
                          "line_total_pence": {
                            "description": "quantity × unit_price_pence.",
                            "type": "integer"
                          },
                          "name": {
                            "description": "The product name, denormalised for display.",
                            "type": "string"
                          },
                          "quantity": {
                            "description": "Units ordered.",
                            "type": "integer"
                          },
                          "unit_price_pence": {
                            "description": "The unit price at placement, in pence.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "code",
                          "name",
                          "quantity",
                          "unit_price_pence",
                          "line_total_pence"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "refund_state": {
                      "description": "The refund state Stripe reported, once refunded.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "shipping_choice": {
                      "description": "standard | express.",
                      "type": "string"
                    },
                    "shipping_pence": {
                      "description": "The delivery charge in pence.",
                      "type": "integer"
                    },
                    "status": {
                      "description": "placed | checkout_open | payment_pending | paid | fulfilled | shipped | delivered | cancelled | expired | refunded.",
                      "type": "string"
                    },
                    "stock_reserved": {
                      "description": "Whether stock is still reserved against this order.",
                      "type": "boolean"
                    },
                    "stripe_session_id": {
                      "description": "The Stripe Checkout Session id, once checkout opened.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "subtotal_pence": {
                      "description": "The subtotal in pence.",
                      "type": "integer"
                    },
                    "total_pence": {
                      "description": "The total the customer pays, in pence.",
                      "type": "integer"
                    },
                    "tracking_carrier": {
                      "description": "The carrier, once shipped.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "tracking_number": {
                      "description": "The tracking number, once shipped.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "updated_ms": {
                      "description": "When it last changed (epoch ms).",
                      "type": "string"
                    },
                    "user_email": {
                      "description": "The contact email.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "guest",
                    "user_email",
                    "status",
                    "items",
                    "delivery",
                    "shipping_choice",
                    "subtotal_pence",
                    "discount_pence",
                    "shipping_pence",
                    "total_pence",
                    "stock_reserved",
                    "created_ms",
                    "updated_ms"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Cancel an order that has not been paid. Use it when the buyer changes their mind, and after trying out an order on the public demonstration, so that its stock goes back on sale. Returns the cancelled order; cancelling it again changes nothing.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/orders/{order_id}/checkout": {
      "post": {
        "operationId": "start_checkout",
        "parameters": [
          {
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "description": "the order id",
              "examples": [
                "FG-SAMPLE"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "manage_token": {
                    "description": "the manage token place_guest_order returned for this order; it can also be sent as the x-order-token header",
                    "examples": [
                      "sample"
                    ],
                    "type": "string"
                  },
                  "order_id": {
                    "description": "the order id",
                    "examples": [
                      "FG-SAMPLE"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "order_id",
                  "manage_token"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What opening checkout answers with.",
                  "properties": {
                    "checkout_url": {
                      "description": "The hosted Stripe Checkout URL to send the customer to.",
                      "type": "string"
                    },
                    "order": {
                      "description": "One order.",
                      "properties": {
                        "checkout_url": {
                          "description": "The hosted checkout URL, once checkout opened.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "confirmation_email": {
                          "description": "The confirmation-email outbox entry, created at payment.",
                          "oneOf": [
                            {
                              "description": "The durable confirmation-email outbox entry of one order.",
                              "properties": {
                                "attempts": {
                                  "description": "Provider sends attempted.",
                                  "type": "integer"
                                },
                                "idempotency_key": {
                                  "description": "The provider idempotency key every attempt presents.",
                                  "type": "string"
                                },
                                "last_error": {
                                  "description": "The last failure, as a stable code.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "provider_id": {
                                  "description": "The provider's message id once accepted.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "state": {
                                  "description": "pending | sent | retryable | not_configured.",
                                  "type": "string"
                                },
                                "updated_ms": {
                                  "description": "When the ledger last changed (epoch ms).",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "state",
                                "attempts",
                                "idempotency_key",
                                "updated_ms"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "coupon": {
                          "description": "The coupon applied, if any.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "created_ms": {
                          "description": "When it was placed (epoch ms).",
                          "type": "string"
                        },
                        "delivery": {
                          "description": "A UK delivery address.",
                          "properties": {
                            "city": {
                              "description": "The town or city.",
                              "type": "string"
                            },
                            "country": {
                              "description": "GB.",
                              "type": "string"
                            },
                            "line1": {
                              "description": "The first address line.",
                              "type": "string"
                            },
                            "line2": {
                              "description": "The second address line, possibly empty.",
                              "type": "string"
                            },
                            "postcode": {
                              "description": "The postcode, with its space.",
                              "type": "string"
                            },
                            "recipient": {
                              "description": "Who receives the parcel.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "recipient",
                            "line1",
                            "line2",
                            "city",
                            "postcode",
                            "country"
                          ],
                          "type": "object"
                        },
                        "discount_pence": {
                          "description": "The discount in pence.",
                          "type": "integer"
                        },
                        "guest": {
                          "description": "Whether a guest placed it.",
                          "type": "boolean"
                        },
                        "id": {
                          "description": "The order id (FS-… for a customer, FG-… for a guest).",
                          "type": "string"
                        },
                        "items": {
                          "description": "The lines.",
                          "items": {
                            "description": "One line of an order.",
                            "properties": {
                              "code": {
                                "description": "The product code.",
                                "type": "string"
                              },
                              "line_total_pence": {
                                "description": "quantity × unit_price_pence.",
                                "type": "integer"
                              },
                              "name": {
                                "description": "The product name, denormalised for display.",
                                "type": "string"
                              },
                              "quantity": {
                                "description": "Units ordered.",
                                "type": "integer"
                              },
                              "unit_price_pence": {
                                "description": "The unit price at placement, in pence.",
                                "type": "integer"
                              }
                            },
                            "required": [
                              "code",
                              "name",
                              "quantity",
                              "unit_price_pence",
                              "line_total_pence"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "refund_state": {
                          "description": "The refund state Stripe reported, once refunded.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "shipping_choice": {
                          "description": "standard | express.",
                          "type": "string"
                        },
                        "shipping_pence": {
                          "description": "The delivery charge in pence.",
                          "type": "integer"
                        },
                        "status": {
                          "description": "placed | checkout_open | payment_pending | paid | fulfilled | shipped | delivered | cancelled | expired | refunded.",
                          "type": "string"
                        },
                        "stock_reserved": {
                          "description": "Whether stock is still reserved against this order.",
                          "type": "boolean"
                        },
                        "stripe_session_id": {
                          "description": "The Stripe Checkout Session id, once checkout opened.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "subtotal_pence": {
                          "description": "The subtotal in pence.",
                          "type": "integer"
                        },
                        "total_pence": {
                          "description": "The total the customer pays, in pence.",
                          "type": "integer"
                        },
                        "tracking_carrier": {
                          "description": "The carrier, once shipped.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "tracking_number": {
                          "description": "The tracking number, once shipped.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "updated_ms": {
                          "description": "When it last changed (epoch ms).",
                          "type": "string"
                        },
                        "user_email": {
                          "description": "The contact email.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "guest",
                        "user_email",
                        "status",
                        "items",
                        "delivery",
                        "shipping_choice",
                        "subtotal_pence",
                        "discount_pence",
                        "shipping_pence",
                        "total_pence",
                        "stock_reserved",
                        "created_ms",
                        "updated_ms"
                      ],
                      "type": "object"
                    },
                    "stripe_session_id": {
                      "description": "The Checkout Session id that fences later completion.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "order",
                    "checkout_url",
                    "stripe_session_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Open Stripe's own payment page for a placed order. Use it only after the buyer has agreed to pay the order's total. Returns the address of that page. It is refused with stripe_not_configured where the operator has not set up Stripe, as on the public demonstration, and then nothing is charged.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/orders/{order_id}/email/retry": {
      "post": {
        "operationId": "retry_email",
        "parameters": [
          {
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "description": "the order id",
              "examples": [
                "FG-SAMPLE"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "manage_token": {
                    "description": "the manage token place_guest_order returned for this order; it can also be sent as the x-order-token header",
                    "examples": [
                      "sample"
                    ],
                    "type": "string"
                  },
                  "order_id": {
                    "description": "the order id",
                    "examples": [
                      "FG-SAMPLE"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "order_id",
                  "manage_token"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "What an email retry answers with.",
                  "properties": {
                    "email": {
                      "description": "The durable confirmation-email outbox entry of one order.",
                      "properties": {
                        "attempts": {
                          "description": "Provider sends attempted.",
                          "type": "integer"
                        },
                        "idempotency_key": {
                          "description": "The provider idempotency key every attempt presents.",
                          "type": "string"
                        },
                        "last_error": {
                          "description": "The last failure, as a stable code.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "provider_id": {
                          "description": "The provider's message id once accepted.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "state": {
                          "description": "pending | sent | retryable | not_configured.",
                          "type": "string"
                        },
                        "updated_ms": {
                          "description": "When the ledger last changed (epoch ms).",
                          "type": "string"
                        }
                      },
                      "required": [
                        "state",
                        "attempts",
                        "idempotency_key",
                        "updated_ms"
                      ],
                      "type": "object"
                    },
                    "order_id": {
                      "description": "The order id.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "order_id",
                    "email"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Send a paid order's confirmation email again. Use it when get_order_email shows that the last attempt failed. Returns the state after this attempt. The email provider sees one key for the order, so a buyer does not receive two, and an unpaid order is refused with email_not_ready.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/orders/{order_id}/reconcile": {
      "post": {
        "operationId": "reconcile_order",
        "parameters": [
          {
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "description": "the order id",
              "examples": [
                "FG-SAMPLE"
              ],
              "type": "string"
            }
          },
          {
            "description": "Retry-safe: a request repeating this key returns the first result instead of running again.",
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "manage_token": {
                    "description": "the manage token place_guest_order returned for this order; it can also be sent as the x-order-token header",
                    "examples": [
                      "sample"
                    ],
                    "type": "string"
                  },
                  "order_id": {
                    "description": "the order id",
                    "examples": [
                      "FG-SAMPLE"
                    ],
                    "type": "string"
                  },
                  "session_id": {
                    "description": "the Checkout Session id Stripe returned the buyer with",
                    "examples": [
                      "cs_test_example"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "order_id",
                  "session_id",
                  "manage_token"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "One order.",
                  "properties": {
                    "checkout_url": {
                      "description": "The hosted checkout URL, once checkout opened.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "confirmation_email": {
                      "description": "The confirmation-email outbox entry, created at payment.",
                      "oneOf": [
                        {
                          "description": "The durable confirmation-email outbox entry of one order.",
                          "properties": {
                            "attempts": {
                              "description": "Provider sends attempted.",
                              "type": "integer"
                            },
                            "idempotency_key": {
                              "description": "The provider idempotency key every attempt presents.",
                              "type": "string"
                            },
                            "last_error": {
                              "description": "The last failure, as a stable code.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "provider_id": {
                              "description": "The provider's message id once accepted.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "state": {
                              "description": "pending | sent | retryable | not_configured.",
                              "type": "string"
                            },
                            "updated_ms": {
                              "description": "When the ledger last changed (epoch ms).",
                              "type": "string"
                            }
                          },
                          "required": [
                            "state",
                            "attempts",
                            "idempotency_key",
                            "updated_ms"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "coupon": {
                      "description": "The coupon applied, if any.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "created_ms": {
                      "description": "When it was placed (epoch ms).",
                      "type": "string"
                    },
                    "delivery": {
                      "description": "A UK delivery address.",
                      "properties": {
                        "city": {
                          "description": "The town or city.",
                          "type": "string"
                        },
                        "country": {
                          "description": "GB.",
                          "type": "string"
                        },
                        "line1": {
                          "description": "The first address line.",
                          "type": "string"
                        },
                        "line2": {
                          "description": "The second address line, possibly empty.",
                          "type": "string"
                        },
                        "postcode": {
                          "description": "The postcode, with its space.",
                          "type": "string"
                        },
                        "recipient": {
                          "description": "Who receives the parcel.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "recipient",
                        "line1",
                        "line2",
                        "city",
                        "postcode",
                        "country"
                      ],
                      "type": "object"
                    },
                    "discount_pence": {
                      "description": "The discount in pence.",
                      "type": "integer"
                    },
                    "guest": {
                      "description": "Whether a guest placed it.",
                      "type": "boolean"
                    },
                    "id": {
                      "description": "The order id (FS-… for a customer, FG-… for a guest).",
                      "type": "string"
                    },
                    "items": {
                      "description": "The lines.",
                      "items": {
                        "description": "One line of an order.",
                        "properties": {
                          "code": {
                            "description": "The product code.",
                            "type": "string"
                          },
                          "line_total_pence": {
                            "description": "quantity × unit_price_pence.",
                            "type": "integer"
                          },
                          "name": {
                            "description": "The product name, denormalised for display.",
                            "type": "string"
                          },
                          "quantity": {
                            "description": "Units ordered.",
                            "type": "integer"
                          },
                          "unit_price_pence": {
                            "description": "The unit price at placement, in pence.",
                            "type": "integer"
                          }
                        },
                        "required": [
                          "code",
                          "name",
                          "quantity",
                          "unit_price_pence",
                          "line_total_pence"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "refund_state": {
                      "description": "The refund state Stripe reported, once refunded.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "shipping_choice": {
                      "description": "standard | express.",
                      "type": "string"
                    },
                    "shipping_pence": {
                      "description": "The delivery charge in pence.",
                      "type": "integer"
                    },
                    "status": {
                      "description": "placed | checkout_open | payment_pending | paid | fulfilled | shipped | delivered | cancelled | expired | refunded.",
                      "type": "string"
                    },
                    "stock_reserved": {
                      "description": "Whether stock is still reserved against this order.",
                      "type": "boolean"
                    },
                    "stripe_session_id": {
                      "description": "The Stripe Checkout Session id, once checkout opened.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "subtotal_pence": {
                      "description": "The subtotal in pence.",
                      "type": "integer"
                    },
                    "total_pence": {
                      "description": "The total the customer pays, in pence.",
                      "type": "integer"
                    },
                    "tracking_carrier": {
                      "description": "The carrier, once shipped.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "tracking_number": {
                      "description": "The tracking number, once shipped.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "updated_ms": {
                      "description": "When it last changed (epoch ms).",
                      "type": "string"
                    },
                    "user_email": {
                      "description": "The contact email.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "guest",
                    "user_email",
                    "status",
                    "items",
                    "delivery",
                    "shipping_choice",
                    "subtotal_pence",
                    "discount_pence",
                    "shipping_pence",
                    "total_pence",
                    "stock_reserved",
                    "created_ms",
                    "updated_ms"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Ask Stripe whether the payment for an order has completed. Use it when a buyer has come back from Stripe's payment page and the order is not marked paid yet. Returns the order as it now stands. It is refused with stripe_not_configured where the operator has not set up Stripe.",
        "x-idempotent": true,
        "x-read-only": false
      }
    },
    "/api/products/{id}": {
      "get": {
        "operationId": "get_product",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "description": "the product code or slug",
              "examples": [
                "field-notebook"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "product": {
                      "description": "One catalogue product with its live stock.",
                      "properties": {
                        "category": {
                          "description": "The catalogue category.",
                          "type": "string"
                        },
                        "code": {
                          "description": "The product code (FS-101). Orders name products by code.",
                          "type": "string"
                        },
                        "initial_stock": {
                          "description": "Units the shop opened with.",
                          "type": "integer"
                        },
                        "name": {
                          "description": "The display name.",
                          "type": "string"
                        },
                        "price_pence": {
                          "description": "The unit price in pence.",
                          "type": "integer"
                        },
                        "slug": {
                          "description": "The URL slug the product page lives under.",
                          "type": "string"
                        },
                        "specification": {
                          "description": "The specification line (A6 · 160 pages · lay-flat binding).",
                          "type": "string"
                        },
                        "stock": {
                          "description": "Units currently available to order.",
                          "type": "integer"
                        },
                        "summary": {
                          "description": "One line of what it is for.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "code",
                        "slug",
                        "name",
                        "category",
                        "price_pence",
                        "summary",
                        "specification",
                        "stock",
                        "initial_stock"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "product"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success",
            "headers": {
              "API-Version": {
                "$ref": "#/components/headers/API-Version"
              },
              "Deprecation": {
                "$ref": "#/components/headers/Deprecation"
              },
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Sunset": {
                "$ref": "#/components/headers/Sunset"
              }
            }
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid request parameters or body (RFC 9457 problem details)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found (RFC 9457 problem details)"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Rate limit exceeded; wait Retry-After seconds before retrying",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Error (RFC 9457 problem details)"
          }
        },
        "summary": "Read one product by its code or its slug. Use it to check the price and the stock just before ordering that product. Returns the product with its price in pence, specification and the units available now.",
        "x-idempotent": true,
        "x-read-only": true
      }
    }
  },
  "security": [
    {},
    {
      "oauth2": [
        "apps:discover",
        "apps:read",
        "apps:write"
      ]
    }
  ],
  "servers": [
    {
      "url": "https://shop.ferrite.run"
    }
  ],
  "x-agent-card": "https://shop.ferrite.run/.well-known/agent-card.json",
  "x-ard-catalog": "https://shop.ferrite.run/.well-known/ard.json",
  "x-llms-txt": "https://shop.ferrite.run/llms.txt",
  "x-mcp-endpoint": "https://shop.ferrite.run/mcp",
  "x-webmcp": "https://shop.ferrite.run/.well-known/webmcp.js"
}