{
  "openapi": "3.1.0",
  "info": {
    "title": "Zoral Storefront API",
    "version": "1.0.0",
    "summary": "Read-only public catalog API for the Zoral tongue scraper store.",
    "description": "# Zoral Storefront API\n\nPublic, read-only, **no authentication required**. Use it to look up Zoral products,\nprices, stock and customer reviews.\n\n## What Zoral sells\nOne product line: a 316L medical-grade stainless steel tongue scraper. Two SKUs -\na 2-pack, and a 2-pack bundled with 2 ventilated travel cases.\n\n## Typical flow\n1. `GET /api/store/products?fields=*variants.calculated_price` - list the catalog with prices.\n2. Pick a product by `handle` (e.g. `tongue-scraper`); read `variants[].id` for the purchasable variant.\n3. `GET /api/store/reviews?product_id=...` - real customer reviews and the average rating.\n\n## Prices\nPrices are region-scoped. Pass `region_id` (from `GET /api/store/regions`) to price\nagainst a specific region; otherwise the store default (USD) is used. Amounts are in\nmajor units - `9.99` means $9.99, not 999 cents.\n\n## Checkout\n`POST /checkout-sessions` builds a real, priced Medusa cart from item ids or\nhandles and returns an ACP/UCP checkout session - no credentials required. Pass\n`promo_codes: [\"10OFF\"]` for 10% off; codes that do not apply come back in\n`messages` rather than silently vanishing. Payment itself is a human handoff:\nthe session carries `payment_provider.checkout_url` for the buyer to pay via\nStripe. Zoral never receives raw card details and cannot accept delegated agent\npayment tokens.\n\n## Versioning and deprecation\nRead endpoints under `/api/store/*` are unversioned and additive only: fields get\nadded, never removed or retyped. The agent surfaces that can change shape are\ndate-versioned instead - send `API-Version: 2026-07-16` on checkout endpoints to\npin behaviour. When something is retired it is announced with a `Deprecation` and\na `Sunset` header (RFC 8594/9745) on the affected endpoint at least 90 days\nbefore removal, and listed at `/changelog`. Nothing is removed without those\nheaders appearing first.\n\n## Retries, idempotency and rate limits\nSend an `Idempotency-Key` header on POST requests. Retrying with the same key\nreturns the original result rather than creating a second cart. `4xx` means the\nrequest is permanently wrong (fix it, do not retry); `5xx` and `429` are\ntransient. Every response carries `RateLimit-Limit`, `RateLimit-Remaining` and\n`RateLimit-Reset`; a `429` also carries `Retry-After`. There is no hard quota,\nbut responses are edge-cached for 60s so polling faster than once a minute gains\nnothing.\n\n## Bulk and long-running work\nThe catalog is small enough that no batch endpoint is needed: one\n`GET /api/store/products` returns every product with prices, so there is nothing\nto loop over. No operation here runs long enough to need an async job: every\nendpoint answers within one request, so there is no 202-plus-poll pattern to\nlearn. If that changes it will be announced under the deprecation policy above.\n\n## Errors\nEvery error is JSON with `error.code`, `error.message` and `error.resolution`.\nThere are no HTML error pages. `502`/`503` are transient - retry with backoff.\n\n## Rate limits and etiquette\nThere is no hard published quota. Responses are cached for 60s at the edge; please\ncache on your side and avoid polling faster than once a minute.\n\n## More\n- Agent guide: https://getzoral.com/llms.txt\n- Pricing: https://getzoral.com/pricing.md\n- API catalog: https://getzoral.com/.well-known/api-catalog",
    "contact": {
      "name": "Zoral",
      "email": "hello@getzoral.com",
      "url": "https://getzoral.com/contact"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://getzoral.com/terms-of-service"
    }
  },
  "servers": [
    {
      "url": "https://getzoral.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Agent guide",
    "url": "https://getzoral.com/llms.txt"
  },
  "x-service-info": {
    "llms_txt": "https://getzoral.com/llms.txt",
    "pricing": "https://getzoral.com/pricing.md",
    "api_catalog": "https://getzoral.com/.well-known/api-catalog",
    "agent_card": "https://getzoral.com/.well-known/agent-card.json"
  },
  "tags": [
    {
      "name": "Catalog",
      "description": "Products, collections and categories."
    },
    {
      "name": "Reviews",
      "description": "Customer reviews and ratings."
    },
    {
      "name": "Regions",
      "description": "Regions determine currency and pricing."
    },
    {
      "name": "Checkout",
      "description": "Agent-facing checkout sessions (ACP/UCP)."
    }
  ],
  "paths": {
    "/checkout-sessions": {
      "post": {
        "operationId": "createCheckoutSession",
        "summary": "Create a checkout session",
        "x-consequence": "low",
        "x-irreversible": false,
        "x-side-effects": [
          "creates-cart"
        ],
        "description": "Builds a real Medusa cart and returns it as an ACP/UCP checkout session.\nEvery total comes from Medusa's own pricing, tax and promotion engine, so\nthe numbers quoted here are the numbers charged.\n\nAlso served at /checkout_sessions (ACP spelling); the two are the same\nendpoint. No authentication. Send API-Version: 2026-07-16 to pin the shape.\n\nA malformed body returns 400 with the accepted shape - it is never a 503,\nso a permanent mistake is never worth retrying.",
        "tags": [
          "Checkout"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Client-generated key (a UUID is fine). Retrying with the same key returns the original session instead of building a second cart, so a network failure mid-request is safe to retry.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "API-Version",
            "in": "header",
            "required": false,
            "description": "Pin the response shape, e.g. 2026-07-16. Omit to get the current version.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "items"
                ],
                "properties": {
                  "items": {
                    "type": "array",
                    "minItems": 1,
                    "description": "Line items. id accepts a variant id (variant_...) or a product handle. variant_id, handle and sku are accepted aliases.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Variant id or product handle, e.g. \"tongue-scraper\"."
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 100,
                          "default": 1
                        }
                      }
                    }
                  },
                  "promo_codes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Discount codes, e.g. [\"10OFF\"]. promo_code, discount_code(s) and coupon_code(s) are accepted aliases. Codes that do not apply are reported in messages."
                  },
                  "buyer": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string",
                        "format": "email"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Session created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            }
          },
          "400": {
            "description": "Permanently malformed request (no usable item identifier, bad quantity, unknown item). Correct the body; do not retry unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcpError"
                }
              }
            }
          },
          "503": {
            "description": "Transient upstream failure. Retry with backoff.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcpError"
                }
              }
            }
          }
        }
      }
    },
    "/checkout_sessions/{id}": {
      "get": {
        "operationId": "getCheckoutSession",
        "x-consequence": "none",
        "x-irreversible": false,
        "x-side-effects": [],
        "summary": "Retrieve a checkout session",
        "description": "Re-reads the cart behind a session id. Totals are recomputed live.",
        "tags": [
          "Checkout"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Session id (the Medusa cart id).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            }
          },
          "404": {
            "description": "No such session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcpError"
                }
              }
            }
          }
        }
      }
    },
    "/checkout_sessions/{id}/complete": {
      "post": {
        "operationId": "completeCheckoutSession",
        "x-consequence": "none",
        "x-irreversible": false,
        "x-side-effects": [],
        "summary": "Attempt to complete a session (always declines)",
        "description": "Zoral does not accept delegated payment. This endpoint exists so the lifecycle is discoverable rather than something an agent has to probe for: it always returns 422 delegated_payment_not_supported with supported_payment_modes: [\"human_handoff\"]. Send the buyer to the checkout_url on the session. Card data belongs between the buyer and Stripe.",
        "tags": [
          "Checkout"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Session id (the Medusa cart id).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "404": {
            "description": "No such session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcpError"
                }
              }
            }
          },
          "422": {
            "description": "Delegated payment is not supported. Hand off to the buyer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcpError"
                }
              }
            }
          }
        }
      }
    },
    "/checkout_sessions/{id}/cancel": {
      "post": {
        "operationId": "cancelCheckoutSession",
        "x-consequence": "none",
        "x-irreversible": true,
        "x-side-effects": [
          "Abandons the cart behind this session."
        ],
        "summary": "Cancel a checkout session",
        "description": "Marks the session cancelled and abandons its cart. Safe to call; nothing was ever charged.",
        "tags": [
          "Checkout"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Session id (the Medusa cart id).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The cancelled session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutSession"
                }
              }
            }
          },
          "404": {
            "description": "No such session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcpError"
                }
              }
            }
          }
        }
      }
    },
    "/api/store/products": {
      "get": {
        "operationId": "listProducts",
        "x-consequence": "none",
        "x-irreversible": false,
        "x-side-effects": [],
        "summary": "List products",
        "description": "Returns the Zoral catalog. Pass fields=*variants.calculated_price to include prices, otherwise variants have no price attached.",
        "tags": [
          "Catalog"
        ],
        "parameters": [
          {
            "name": "handle",
            "in": "query",
            "required": false,
            "description": "Filter to a single product by URL slug, e.g. \"tongue-scraper\".",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max products to return (default 12).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Pagination offset.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "region_id",
            "in": "query",
            "required": false,
            "description": "Region to price against. Get one from GET /api/store/regions. Defaults to the store's default region (USD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated field selection. Use \"*variants.calculated_price\" to include prices and \"+variants.inventory_quantity\" to include stock.",
            "schema": {
              "type": "string"
            },
            "example": "*variants.calculated_price,+variants.inventory_quantity"
          }
        ],
        "responses": {
          "200": {
            "description": "The catalog page.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "products": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "A Zoral product.",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "handle": {
                            "type": "string",
                            "description": "URL slug, e.g. \"tongue-scraper\". Stable; prefer it over id for lookups."
                          },
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "HTML."
                          },
                          "material": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "thumbnail": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "variants": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "description": "A purchasable variant of a product.",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Variant id. This is what a cart line item references."
                                },
                                "title": {
                                  "type": "string"
                                },
                                "sku": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "manage_inventory": {
                                  "type": "boolean"
                                },
                                "allow_backorder": {
                                  "type": "boolean"
                                },
                                "inventory_quantity": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "description": "Only present when requested via the fields parameter."
                                },
                                "calculated_price": {
                                  "type": "object",
                                  "properties": {
                                    "calculated_amount": {
                                      "type": "number",
                                      "description": "Price in major units (e.g. 9.99), already tax/region adjusted."
                                    },
                                    "currency_code": {
                                      "type": "string",
                                      "description": "ISO 4217 lowercase, e.g. \"eur\"."
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "count": {
                      "type": "integer",
                      "description": "Total products matching the filter."
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Catalog unreachable (transient).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "All errors share this shape. Never HTML.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable code, e.g. \"unknown_endpoint\"."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable summary."
                        },
                        "resolution": {
                          "type": "string",
                          "description": "What to do next."
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/store/products/{id}": {
      "get": {
        "operationId": "getProduct",
        "x-consequence": "none",
        "x-irreversible": false,
        "x-side-effects": [],
        "summary": "Get a product by id",
        "description": "Returns a single product. Prefer listProducts with the handle filter if you only know the slug.",
        "tags": [
          "Catalog"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Product id, e.g. prod_01J...",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region_id",
            "in": "query",
            "required": false,
            "description": "Region to price against. Get one from GET /api/store/regions. Defaults to the store's default region (USD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated field selection. Use \"*variants.calculated_price\" to include prices and \"+variants.inventory_quantity\" to include stock.",
            "schema": {
              "type": "string"
            },
            "example": "*variants.calculated_price,+variants.inventory_quantity"
          }
        ],
        "responses": {
          "200": {
            "description": "The product.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "object",
                      "description": "A Zoral product.",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "handle": {
                          "type": "string",
                          "description": "URL slug, e.g. \"tongue-scraper\". Stable; prefer it over id for lookups."
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "HTML."
                        },
                        "material": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "thumbnail": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "variants": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "description": "A purchasable variant of a product.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Variant id. This is what a cart line item references."
                              },
                              "title": {
                                "type": "string"
                              },
                              "sku": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "manage_inventory": {
                                "type": "boolean"
                              },
                              "allow_backorder": {
                                "type": "boolean"
                              },
                              "inventory_quantity": {
                                "type": [
                                  "integer",
                                  "null"
                                ],
                                "description": "Only present when requested via the fields parameter."
                              },
                              "calculated_price": {
                                "type": "object",
                                "properties": {
                                  "calculated_amount": {
                                    "type": "number",
                                    "description": "Price in major units (e.g. 9.99), already tax/region adjusted."
                                  },
                                  "currency_code": {
                                    "type": "string",
                                    "description": "ISO 4217 lowercase, e.g. \"eur\"."
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No such product.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "All errors share this shape. Never HTML.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Stable machine-readable code, e.g. \"unknown_endpoint\"."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable summary."
                        },
                        "resolution": {
                          "type": "string",
                          "description": "What to do next."
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/store/reviews": {
      "get": {
        "operationId": "listReviews",
        "x-consequence": "none",
        "x-irreversible": false,
        "x-side-effects": [],
        "summary": "List customer reviews",
        "description": "Real, verified customer reviews plus the aggregate rating. Omit product_id for reviews across the whole store.",
        "tags": [
          "Reviews"
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "query",
            "required": false,
            "description": "Restrict to one product.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reviews and aggregate rating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reviews": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "author": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "quote": {
                            "type": "string"
                          },
                          "rating": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 5
                          },
                          "review_date": {
                            "type": "string",
                            "format": "date"
                          },
                          "verified": {
                            "type": "boolean",
                            "description": "True when tied to a real purchase."
                          }
                        }
                      }
                    },
                    "count": {
                      "type": "integer"
                    },
                    "avg_rating": {
                      "type": "number",
                      "description": "Mean rating, 1-5. 0 when there are no reviews."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/store/regions": {
      "get": {
        "operationId": "listRegions",
        "x-consequence": "none",
        "x-irreversible": false,
        "x-side-effects": [],
        "summary": "List regions",
        "description": "Regions determine currency and which countries are served. Use a region id with listProducts to get correct prices.",
        "tags": [
          "Regions"
        ],
        "responses": {
          "200": {
            "description": "Available regions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "regions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "currency_code": {
                            "type": "string"
                          },
                          "countries": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "iso_2": {
                                  "type": "string"
                                },
                                "display_name": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/store/collections": {
      "get": {
        "operationId": "listCollections",
        "x-consequence": "none",
        "x-irreversible": false,
        "x-side-effects": [],
        "summary": "List collections",
        "description": "Product collections, e.g. the Featured collection shown on the homepage.",
        "tags": [
          "Catalog"
        ],
        "parameters": [
          {
            "name": "handle",
            "in": "query",
            "required": false,
            "description": "Filter by slug, e.g. \"frontpage\".",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Collections.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "collections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "handle": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "description": "A Zoral product.",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "handle": {
            "type": "string",
            "description": "URL slug, e.g. \"tongue-scraper\". Stable; prefer it over id for lookups."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTML."
          },
          "material": {
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnail": {
            "type": [
              "string",
              "null"
            ]
          },
          "variants": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "A purchasable variant of a product.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Variant id. This is what a cart line item references."
                },
                "title": {
                  "type": "string"
                },
                "sku": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "manage_inventory": {
                  "type": "boolean"
                },
                "allow_backorder": {
                  "type": "boolean"
                },
                "inventory_quantity": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Only present when requested via the fields parameter."
                },
                "calculated_price": {
                  "type": "object",
                  "properties": {
                    "calculated_amount": {
                      "type": "number",
                      "description": "Price in major units (e.g. 9.99), already tax/region adjusted."
                    },
                    "currency_code": {
                      "type": "string",
                      "description": "ISO 4217 lowercase, e.g. \"eur\"."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ProductVariant": {
        "type": "object",
        "description": "A purchasable variant of a product.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Variant id. This is what a cart line item references."
          },
          "title": {
            "type": "string"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "manage_inventory": {
            "type": "boolean"
          },
          "allow_backorder": {
            "type": "boolean"
          },
          "inventory_quantity": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Only present when requested via the fields parameter."
          },
          "calculated_price": {
            "type": "object",
            "properties": {
              "calculated_amount": {
                "type": "number",
                "description": "Price in major units (e.g. 9.99), already tax/region adjusted."
              },
              "currency_code": {
                "type": "string",
                "description": "ISO 4217 lowercase, e.g. \"eur\"."
              }
            }
          }
        }
      },
      "Money": {
        "type": "object",
        "properties": {
          "calculated_amount": {
            "type": "number",
            "description": "Price in major units (e.g. 9.99), already tax/region adjusted."
          },
          "currency_code": {
            "type": "string",
            "description": "ISO 4217 lowercase, e.g. \"eur\"."
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "All errors share this shape. Never HTML.",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable code, e.g. \"unknown_endpoint\"."
              },
              "message": {
                "type": "string",
                "description": "Human-readable summary."
              },
              "resolution": {
                "type": "string",
                "description": "What to do next."
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        }
      },
      "AcpError": {
        "type": "object",
        "description": "Flat error shape used by the checkout endpoints (ACP style).",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "invalid_request",
              "rate_limit_exceeded",
              "processing_error",
              "service_unavailable"
            ]
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "param": {
            "type": "string"
          }
        }
      },
      "CheckoutSession": {
        "type": "object",
        "description": "An ACP/UCP checkout session. The id is the underlying Medusa cart id.",
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "const": "checkout_session"
          },
          "status": {
            "type": "string",
            "description": "e.g. \"ready_for_payment\"."
          },
          "currency": {
            "type": "string"
          },
          "line_items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "item": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Variant id."
                    },
                    "title": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "integer"
                    }
                  }
                },
                "base_amount": {
                  "type": "number"
                },
                "subtotal": {
                  "type": "number"
                },
                "total": {
                  "type": "number"
                }
              }
            }
          },
          "totals": {
            "type": "object",
            "properties": {
              "subtotal": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Major units, e.g. 9.99."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 lowercase."
                  }
                }
              },
              "discount": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Major units, e.g. 9.99."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 lowercase."
                  }
                }
              },
              "shipping": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Major units, e.g. 9.99."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 lowercase."
                  }
                }
              },
              "tax": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Major units, e.g. 9.99."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 lowercase."
                  }
                }
              },
              "total": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "number",
                    "description": "Major units, e.g. 9.99."
                  },
                  "currency": {
                    "type": "string",
                    "description": "ISO 4217 lowercase."
                  }
                }
              }
            }
          },
          "promo_codes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Codes that actually applied."
          },
          "messages": {
            "type": "array",
            "description": "Non-fatal notices, e.g. a promo code that could not be applied.",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "param": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "payment_provider": {
            "type": "object",
            "description": "Payment is a human handoff - send the buyer to checkout_url.",
            "properties": {
              "provider": {
                "type": "string",
                "const": "human_handoff"
              },
              "checkout_url": {
                "type": "string",
                "format": "uri"
              },
              "note": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}