{
  "components": {
    "schemas": {
      "AddressInput": {
        "additionalProperties": false,
        "description": "Nordic-compatible address input.",
        "properties": {
          "city": {
            "maxLength": 100,
            "minLength": 1,
            "title": "City",
            "type": "string"
          },
          "country": {
            "maxLength": 2,
            "minLength": 2,
            "title": "Country",
            "type": "string"
          },
          "postal_code": {
            "maxLength": 20,
            "minLength": 1,
            "title": "Postal Code",
            "type": "string"
          },
          "region": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "street1": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Street1",
            "type": "string"
          },
          "street2": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Street2"
          }
        },
        "required": [
          "street1",
          "postal_code",
          "city",
          "country"
        ],
        "title": "AddressInput",
        "type": "object"
      },
      "AddressResponse": {
        "description": "Address in response.",
        "properties": {
          "city": {
            "title": "City",
            "type": "string"
          },
          "country": {
            "title": "Country",
            "type": "string"
          },
          "postal_code": {
            "title": "Postal Code",
            "type": "string"
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region"
          },
          "street1": {
            "title": "Street1",
            "type": "string"
          },
          "street2": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Street2"
          }
        },
        "required": [
          "street1",
          "postal_code",
          "city",
          "country"
        ],
        "title": "AddressResponse",
        "type": "object"
      },
      "Body_issue_token_v1_auth_token_post": {
        "properties": {
          "grant_type": {
            "description": "OAuth2 grant type — must be `client_credentials`.",
            "title": "Grant Type",
            "type": "string"
          }
        },
        "required": [
          "grant_type"
        ],
        "title": "Body_issue_token_v1_auth_token_post",
        "type": "object"
      },
      "BulkItemError": {
        "description": "Why one bulk item was not written.",
        "properties": {
          "code": {
            "description": "Machine-readable error code, as on single-item calls.",
            "title": "Code",
            "type": "string"
          },
          "message": {
            "description": "Human-readable explanation; do not parse it.",
            "title": "Message",
            "type": "string"
          },
          "param": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The offending field, prefixed with the item's position (`products.<i>.`).",
            "title": "Param"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "title": "BulkItemError",
        "type": "object"
      },
      "CursorPaginationMeta": {
        "description": "Pagination metadata for cursor-based list responses.",
        "properties": {
          "has_more": {
            "description": "Whether more items exist",
            "title": "Has More",
            "type": "boolean"
          },
          "limit": {
            "description": "Maximum items per page",
            "title": "Limit",
            "type": "integer"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque cursor token for the next page",
            "title": "Next Cursor"
          }
        },
        "required": [
          "limit",
          "has_more"
        ],
        "title": "CursorPaginationMeta",
        "type": "object"
      },
      "DiscountInput": {
        "additionalProperties": false,
        "description": "Per-item discount in a create request.",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/app__partners__schemas__v1__transaction__PriceInput"
          },
          "description": {
            "default": "",
            "maxLength": 255,
            "title": "Description",
            "type": "string"
          },
          "personal_offer_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stored as the transaction's `offer_id`: the v2 Offer this discount came from, for sale attribution only. Not an entitlement id — entitlements are not redeemed on this surface.",
            "title": "Personal Offer Id"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "amount"
        ],
        "title": "DiscountInput",
        "type": "object"
      },
      "DiscountResponse": {
        "description": "Discount in response (line-level or basket-level).",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/PriceSchema"
          },
          "description": {
            "default": "",
            "title": "Description",
            "type": "string"
          },
          "personal_offer_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The transaction's `offer_id`: the v2 Offer the discount came from, echoed under this surface's field name.",
            "title": "Personal Offer Id"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "amount"
        ],
        "title": "DiscountResponse",
        "type": "object"
      },
      "ErrorDetail": {
        "description": "Error detail structure (Stripe-like format).",
        "properties": {
          "code": {
            "description": "Machine-readable error code",
            "title": "Code",
            "type": "string"
          },
          "details": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/FieldErrorDetail"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "On `invalid_fields` (422) only: one entry per failing field",
            "title": "Details"
          },
          "doc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Link to the errors guide",
            "title": "Doc Url"
          },
          "message": {
            "description": "Human-readable error message",
            "title": "Message",
            "type": "string"
          },
          "param": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parameter that caused the error",
            "title": "Param"
          },
          "type": {
            "description": "Error type category",
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "code",
          "message"
        ],
        "title": "ErrorDetail",
        "type": "object"
      },
      "ErrorResponse": {
        "description": "Standard error response format.",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Request ID for support",
            "title": "Request Id"
          }
        },
        "required": [
          "error"
        ],
        "title": "ErrorResponse",
        "type": "object"
      },
      "ExternalFieldsInput": {
        "additionalProperties": false,
        "description": "External POS fields — all optional, stored as-received.",
        "properties": {
          "cashier_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cashier Id"
          },
          "cashier_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cashier Name"
          },
          "control_unit_code": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Control Unit Code"
          },
          "external_store_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Store Id"
          },
          "external_transaction_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Transaction Id"
          },
          "pos_serial": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pos Serial"
          },
          "pos_system": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pos System"
          },
          "purchased_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Purchased At"
          },
          "receipt_number": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Receipt Number"
          }
        },
        "title": "ExternalFieldsInput",
        "type": "object"
      },
      "FieldErrorDetail": {
        "description": "One failing field of a validation error.",
        "properties": {
          "message": {
            "description": "Why the value was refused",
            "title": "Message",
            "type": "string"
          },
          "param": {
            "description": "Dotted path of the field, e.g. `items.0.unit_price.value`",
            "title": "Param",
            "type": "string"
          }
        },
        "required": [
          "param",
          "message"
        ],
        "title": "FieldErrorDetail",
        "type": "object"
      },
      "GeoLocationInput": {
        "additionalProperties": false,
        "description": "GPS coordinate input.",
        "properties": {
          "latitude": {
            "maximum": 90,
            "minimum": -90,
            "title": "Latitude",
            "type": "number"
          },
          "longitude": {
            "maximum": 180,
            "minimum": -180,
            "title": "Longitude",
            "type": "number"
          }
        },
        "required": [
          "latitude",
          "longitude"
        ],
        "title": "GeoLocationInput",
        "type": "object"
      },
      "GeoLocationResponse": {
        "description": "Geo location in response.",
        "properties": {
          "latitude": {
            "title": "Latitude",
            "type": "number"
          },
          "longitude": {
            "title": "Longitude",
            "type": "number"
          }
        },
        "required": [
          "latitude",
          "longitude"
        ],
        "title": "GeoLocationResponse",
        "type": "object"
      },
      "IdentifierInput-Output": {
        "additionalProperties": false,
        "description": "Product identifier (gtin, sku, etc.).",
        "properties": {
          "type": {
            "title": "Type",
            "type": "string"
          },
          "value": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "title": "IdentifierInput",
        "type": "object"
      },
      "IdentifierResponse": {
        "description": "Typed product identifier in API responses.",
        "properties": {
          "type": {
            "title": "Type",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "title": "IdentifierResponse",
        "type": "object"
      },
      "ItemInput": {
        "additionalProperties": false,
        "description": "Line item in a transaction create request.\n\ntotal_discount and total_amount are computed by the domain model\nfrom unit_price, quantity, and discounts — not accepted in input.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "discounts": {
            "items": {
              "$ref": "#/components/schemas/DiscountInput"
            },
            "maxItems": 50,
            "title": "Discounts",
            "type": "array"
          },
          "external_product_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Product Id"
          },
          "identifiers": {
            "items": {
              "$ref": "#/components/schemas/app__partners__schemas__v1__transaction__IdentifierInput"
            },
            "maxItems": 50,
            "title": "Identifiers",
            "type": "array"
          },
          "loyalty_eligible": {
            "default": true,
            "title": "Loyalty Eligible",
            "type": "boolean"
          },
          "product_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id"
          },
          "product_name": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Name"
          },
          "quantity": {
            "$ref": "#/components/schemas/QuantityInput"
          },
          "sequence_number": {
            "default": 0,
            "minimum": 0,
            "title": "Sequence Number",
            "type": "integer"
          },
          "tax_rate": {
            "default": 0,
            "maximum": 10000,
            "minimum": 0,
            "title": "Tax Rate",
            "type": "integer"
          },
          "unit_price": {
            "$ref": "#/components/schemas/app__partners__schemas__v1__transaction__PriceInput"
          }
        },
        "required": [
          "quantity",
          "unit_price"
        ],
        "title": "ItemInput",
        "type": "object"
      },
      "ItemResponse": {
        "description": "Line item in a transaction response — includes computed fields.",
        "properties": {
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "discounts": {
            "items": {
              "$ref": "#/components/schemas/DiscountResponse"
            },
            "title": "Discounts",
            "type": "array"
          },
          "external_product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Product Id"
          },
          "identifiers": {
            "items": {
              "$ref": "#/components/schemas/IdentifierInput-Output"
            },
            "title": "Identifiers",
            "type": "array"
          },
          "loyalty_eligible": {
            "title": "Loyalty Eligible",
            "type": "boolean"
          },
          "product_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id"
          },
          "product_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Name"
          },
          "quantity": {
            "$ref": "#/components/schemas/QuantityInput"
          },
          "sequence_number": {
            "title": "Sequence Number",
            "type": "integer"
          },
          "tax_rate": {
            "title": "Tax Rate",
            "type": "integer"
          },
          "total_amount": {
            "$ref": "#/components/schemas/PriceSchema"
          },
          "total_discount": {
            "$ref": "#/components/schemas/PriceSchema"
          },
          "unit_price": {
            "$ref": "#/components/schemas/PriceSchema"
          }
        },
        "required": [
          "sequence_number",
          "quantity",
          "unit_price",
          "tax_rate",
          "loyalty_eligible",
          "total_discount",
          "total_amount"
        ],
        "title": "ItemResponse",
        "type": "object"
      },
      "LoyaltyCycleResponse": {
        "description": "The membership's current loyalty cycle.",
        "properties": {
          "length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cycle length in the program's unit, or null when unbounded.",
            "title": "Length"
          },
          "progress_pct": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How full the current cycle is, 0-100, or null when the cycle is unbounded.",
            "title": "Progress Pct"
          },
          "seq": {
            "description": "Current cycle sequence number.",
            "title": "Seq",
            "type": "integer"
          },
          "started_at": {
            "description": "When the current cycle started (UTC).",
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          }
        },
        "required": [
          "seq",
          "started_at",
          "length",
          "progress_pct"
        ],
        "title": "LoyaltyCycleResponse",
        "type": "object"
      },
      "LoyaltyProgramResponse": {
        "description": "The loyalty program backing this membership.",
        "properties": {
          "id": {
            "description": "Loyalty program id.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "description": "Loyalty program name.",
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "LoyaltyProgramResponse",
        "type": "object"
      },
      "LoyaltyResponse": {
        "description": "Loyalty block in responses. Pre-populated with empty keys,\nfilled by the loyalty engine after processing.",
        "properties": {
          "cycle": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cycle"
          },
          "exchange_rate_used": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exchange Rate Used"
          },
          "points_deducted": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Points Deducted"
          },
          "points_earned": {
            "default": 0,
            "title": "Points Earned",
            "type": "integer"
          },
          "post_balance": {
            "default": 0,
            "title": "Post Balance",
            "type": "integer"
          },
          "pre_balance": {
            "default": 0,
            "title": "Pre Balance",
            "type": "integer"
          },
          "processed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Processed At"
          },
          "refund_processed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refund Processed At"
          },
          "refund_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Refund Type"
          },
          "stamps_earned": {
            "default": 0,
            "title": "Stamps Earned",
            "type": "integer"
          }
        },
        "title": "LoyaltyResponse",
        "type": "object"
      },
      "LoyaltyUnitResponse": {
        "description": "The program's unit — what the balance number counts and how it renders.\n\nFor a `currency` unit (cashback) the balance is money in minor units, so\nthe unit also says which currency and how to format it, the same\n`minor_units` + `locale` pair every price on this API carries. All three\nare null for `counter` and `card`, whose balance is a plain count.",
        "properties": {
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO 4217 code of a `currency` unit; null for `counter` and `card`.",
            "title": "Currency"
          },
          "label": {
            "description": "Human label for the unit (e.g. `points`, `stamps`).",
            "title": "Label",
            "type": "string"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "RFC 5646 locale to format a `currency` balance (e.g. `sv-SE`); null otherwise.",
            "title": "Locale"
          },
          "minor_units": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Divisor from the balance to major units (e.g. 100 for SEK) for a `currency` unit; null otherwise.",
            "title": "Minor Units"
          },
          "presentation": {
            "description": "How the unit is presented: `counter`, `card`, or `currency`.",
            "title": "Presentation",
            "type": "string"
          }
        },
        "required": [
          "label",
          "presentation"
        ],
        "title": "LoyaltyUnitResponse",
        "type": "object"
      },
      "MemberIdentifierInput": {
        "additionalProperties": false,
        "description": "Member identifier (user_id, membership_id, mobile_number, email, social_security_number).",
        "properties": {
          "identifier": {
            "title": "Identifier",
            "type": "string"
          },
          "value": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "identifier",
          "value"
        ],
        "title": "MemberIdentifierInput",
        "type": "object"
      },
      "MembershipDetailResponse": {
        "description": "Detail response for a membership — flat across loyalty program types.\n\n``balance`` is the ledger's projection, unconditional: points balance for\na points program, stamp count in the current cycle for a stamps program.\n``stamps_dates`` is populated only for a stamp card.",
        "properties": {
          "balance": {
            "description": "Program-agnostic primary value: points balance for `points`, stamp count in the current cycle for `stamps`.",
            "title": "Balance",
            "type": "integer"
          },
          "celebration": {
            "description": "Whether a reward-earned UI should be shown",
            "title": "Celebration",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "cycle": {
            "description": "Current cycle number (starts at 1)",
            "title": "Cycle",
            "type": "integer"
          },
          "cycle_length": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Size of the current cycle in the program's unit (e.g. 10 for a 10-stamp card), so a till can show `balance` of `cycle_length`. Null when the cycle is unbounded or there is no program.",
            "title": "Cycle Length"
          },
          "full_name": {
            "description": "Member's full name",
            "title": "Full Name",
            "type": "string"
          },
          "loyalty_program_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "`points` or `stamps`, derived from the loyalty program's unit presentation — a card is `stamps`, a counter is `points`. Null when the member is on no resolvable program (not enrolled, or the program is gone), or when the unit's presentation has no value in this contract yet; never an error.",
            "title": "Loyalty Program Type"
          },
          "membership_id": {
            "description": "Membership id",
            "format": "uuid",
            "title": "Membership Id",
            "type": "string"
          },
          "stamps_dates": {
            "anyOf": [
              {
                "items": {
                  "format": "date-time",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Timestamps of stamps in the current cycle; null for points programs.",
            "title": "Stamps Dates"
          },
          "status": {
            "$ref": "#/components/schemas/MembershipStatus",
            "description": "Membership status"
          },
          "unit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LoyaltyUnitResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "What `balance` counts and how to show it (label, presentation, and for a `currency` unit the currency, `minor_units` and `locale`). Null when the member is on no resolvable program."
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "description": "Owning user id",
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "membership_id",
          "user_id",
          "full_name",
          "status",
          "cycle",
          "celebration",
          "loyalty_program_type",
          "balance",
          "created_at",
          "updated_at"
        ],
        "title": "MembershipDetailResponse",
        "type": "object"
      },
      "MembershipLookupRequest": {
        "additionalProperties": false,
        "description": "Body for ``POST /memberships/lookup`` — discriminator + value.\n\n``membership_id`` and ``user_id`` match top-level Membership fields.\n``qr_code`` is the raw string scanned off a member's QR code, in either\ngeneration: a ``lx1_`` rotating token (v2) or a bare ``user_id`` UUID\n(legacy v1). ``mobile_number``, ``email``, and ``national_id`` match\nentries in ``required_member_fields``.",
        "properties": {
          "identifier": {
            "description": "Which field to look up by. One of ``membership_id``, ``user_id``, ``qr_code``, ``mobile_number``, ``email``, ``national_id``.",
            "enum": [
              "membership_id",
              "user_id",
              "qr_code",
              "mobile_number",
              "email",
              "national_id"
            ],
            "title": "Identifier",
            "type": "string"
          },
          "value": {
            "description": "Identifier value. Format depends on ``identifier``. For ``qr_code``, pass the scanned string unchanged — the API tells the two QR generations apart on its own.",
            "maxLength": 255,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "identifier",
          "value"
        ],
        "title": "MembershipLookupRequest",
        "type": "object"
      },
      "MembershipLoyaltyResponse": {
        "description": "Unit-agnostic loyalty state for one membership.\n\n``punches`` is populated only when ``unit.presentation`` is `card` — for a\n`counter` or `currency` program it is `null`, never an empty list, since an\nempty list would mean \"a card with no punches yet\" rather than \"not a card\".",
        "properties": {
          "balance": {
            "description": "Current balance in the program's unit.",
            "title": "Balance",
            "type": "integer"
          },
          "cycle": {
            "$ref": "#/components/schemas/LoyaltyCycleResponse",
            "description": "The membership's current cycle."
          },
          "program": {
            "$ref": "#/components/schemas/LoyaltyProgramResponse"
          },
          "punches": {
            "anyOf": [
              {
                "items": {
                  "format": "date-time",
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Punch moments for a `card` presentation; `null` for `counter`/`currency`.",
            "title": "Punches"
          },
          "unit": {
            "$ref": "#/components/schemas/LoyaltyUnitResponse",
            "description": "The program's unit label and presentation."
          }
        },
        "required": [
          "balance",
          "unit",
          "program",
          "cycle",
          "punches"
        ],
        "title": "MembershipLoyaltyResponse",
        "type": "object"
      },
      "MembershipStatus": {
        "enum": [
          "active",
          "inactive",
          "archived"
        ],
        "title": "MembershipStatus",
        "type": "string"
      },
      "PaginationMeta": {
        "description": "Pagination metadata for list responses.",
        "properties": {
          "has_more": {
            "description": "Whether more items exist",
            "title": "Has More",
            "type": "boolean"
          },
          "limit": {
            "description": "Maximum items per page",
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "description": "Number of items skipped",
            "title": "Offset",
            "type": "integer"
          },
          "total": {
            "description": "Total number of items",
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "total",
          "limit",
          "offset",
          "has_more"
        ],
        "title": "PaginationMeta",
        "type": "object"
      },
      "PriceSchema": {
        "description": "Monetary amount in minor units + currency code + formatting metadata (response).\n\nIncludes minor_units (divisor to convert to major units) and locale\n(RFC 5646) so the client can display prices without hardcoding rules.",
        "properties": {
          "currency": {
            "default": "SEK",
            "description": "ISO 4217 currency code",
            "title": "Currency",
            "type": "string"
          },
          "locale": {
            "description": "RFC 5646 locale for formatting (e.g. sv-SE)",
            "title": "Locale",
            "type": "string"
          },
          "minor_units": {
            "description": "Divisor to convert to major units (e.g. 100 for SEK)",
            "title": "Minor Units",
            "type": "integer"
          },
          "value": {
            "description": "Amount in minor units (e.g. öre, cents)",
            "title": "Value",
            "type": "integer"
          }
        },
        "required": [
          "value",
          "minor_units",
          "locale"
        ],
        "title": "PriceSchema",
        "type": "object"
      },
      "ProductBulkUpsertItem": {
        "additionalProperties": false,
        "description": "One product in a bulk upsert. Same body as create, but the key is required.\n\nWithout `external_product_id` a retried bulk call would create duplicates,\nso the bulk endpoint only accepts keyed items.",
        "properties": {
          "brand": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Manufacturer or brand name.",
            "title": "Brand"
          },
          "categories": {
            "description": "Category labels defined on the company. Must match existing categories.",
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Long-form product description.",
            "title": "Description"
          },
          "external_product_id": {
            "description": "Your product key — the upsert match key. Required in a bulk call.",
            "maxLength": 255,
            "minLength": 1,
            "title": "External Product Id",
            "type": "string"
          },
          "identifiers": {
            "description": "Typed identifiers (gtin/ean13/ean8/sku/pos). Each (type, value) pair must be unique per company across non-deleted products.",
            "items": {
              "$ref": "#/components/schemas/app__partners__schemas__v1__product__IdentifierInput"
            },
            "maxItems": 20,
            "title": "Identifiers",
            "type": "array"
          },
          "image_link": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Public URL of the product's primary image.",
            "title": "Image Link"
          },
          "is_loyalty_program_eligible": {
            "default": true,
            "description": "When true, purchases of this product accrue loyalty points or stamps.",
            "title": "Is Loyalty Program Eligible",
            "type": "boolean"
          },
          "loyx_app_active": {
            "default": true,
            "description": "When true, the product is visible in the consumer LoyX app.",
            "title": "Loyx App Active",
            "type": "boolean"
          },
          "loyx_business_app_active": {
            "default": true,
            "description": "When true, the product is visible in the LoyX Business (staff) app.",
            "title": "Loyx Business App Active",
            "type": "boolean"
          },
          "name": {
            "description": "Display name shown in the mobile app and digital receipts.",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "page_url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Public URL of the product's web page.",
            "title": "Page Url"
          },
          "price": {
            "$ref": "#/components/schemas/app__partners__schemas__v1__product__PriceInput",
            "description": "Base price in minor units paired with a currency code."
          },
          "stores": {
            "description": "Stores that carry this product — at least one. Each entry may set a per-store price override.",
            "items": {
              "$ref": "#/components/schemas/ProductStoreInput"
            },
            "minItems": 1,
            "title": "Stores",
            "type": "array"
          },
          "unit": {
            "default": "ea",
            "description": "Unit the product is sold in (ea, kg, g, l, ml, m, pack). Defaults to `ea` (each).",
            "title": "Unit",
            "type": "string"
          }
        },
        "required": [
          "name",
          "external_product_id",
          "price",
          "stores"
        ],
        "title": "ProductBulkUpsertItem",
        "type": "object"
      },
      "ProductBulkUpsertRequest": {
        "additionalProperties": false,
        "description": "Up to 100 products, each created or updated by its `external_product_id`.",
        "properties": {
          "products": {
            "description": "1–100 products. Each is upserted independently; one failing item does not roll back the others. A key may appear only once per request.",
            "items": {
              "$ref": "#/components/schemas/ProductBulkUpsertItem"
            },
            "maxItems": 100,
            "minItems": 1,
            "title": "Products",
            "type": "array"
          }
        },
        "required": [
          "products"
        ],
        "title": "ProductBulkUpsertRequest",
        "type": "object"
      },
      "ProductBulkUpsertResponse": {
        "description": "Per-item results plus counts. Always 207 Multi-Status, even when some items failed.",
        "properties": {
          "created": {
            "description": "How many items created a new product.",
            "title": "Created",
            "type": "integer"
          },
          "failed": {
            "description": "How many items were not written; see their `error`.",
            "title": "Failed",
            "type": "integer"
          },
          "results": {
            "description": "One result per request item, in request order.",
            "items": {
              "$ref": "#/components/schemas/ProductBulkUpsertResult"
            },
            "title": "Results",
            "type": "array"
          },
          "updated": {
            "description": "How many items updated an existing product.",
            "title": "Updated",
            "type": "integer"
          }
        },
        "required": [
          "results",
          "created",
          "updated",
          "failed"
        ],
        "title": "ProductBulkUpsertResponse",
        "type": "object"
      },
      "ProductBulkUpsertResult": {
        "description": "Outcome of one bulk item, in request order.",
        "properties": {
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BulkItemError"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set only when `status` is `failed`."
          },
          "external_product_id": {
            "description": "The item's match key, as stored.",
            "title": "External Product Id",
            "type": "string"
          },
          "index": {
            "description": "Position of the item in the request `products` array.",
            "title": "Index",
            "type": "integer"
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProductResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "The stored product; null when `status` is `failed`."
          },
          "status": {
            "description": "`created` (new product), `updated` (key matched) or `failed`.",
            "enum": [
              "created",
              "updated",
              "failed"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "index",
          "external_product_id",
          "status"
        ],
        "title": "ProductBulkUpsertResult",
        "type": "object"
      },
      "ProductCreateRequest": {
        "additionalProperties": false,
        "description": "Create a new product in the company's catalog.",
        "properties": {
          "brand": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Manufacturer or brand name.",
            "title": "Brand"
          },
          "categories": {
            "description": "Category labels defined on the company. Must match existing categories.",
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Long-form product description.",
            "title": "Description"
          },
          "external_product_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Your own product key (till/POS/ERP article id). Unique per company. When set, `POST /products` upserts on it: an existing product with this key is updated instead of a duplicate being created. Sale lines that carry an unknown key create a minimal product with it.",
            "title": "External Product Id"
          },
          "identifiers": {
            "description": "Typed identifiers (gtin/ean13/ean8/sku/pos). Each (type, value) pair must be unique per company across non-deleted products.",
            "items": {
              "$ref": "#/components/schemas/app__partners__schemas__v1__product__IdentifierInput"
            },
            "maxItems": 20,
            "title": "Identifiers",
            "type": "array"
          },
          "image_link": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Public URL of the product's primary image.",
            "title": "Image Link"
          },
          "is_loyalty_program_eligible": {
            "default": true,
            "description": "When true, purchases of this product accrue loyalty points or stamps.",
            "title": "Is Loyalty Program Eligible",
            "type": "boolean"
          },
          "loyx_app_active": {
            "default": true,
            "description": "When true, the product is visible in the consumer LoyX app.",
            "title": "Loyx App Active",
            "type": "boolean"
          },
          "loyx_business_app_active": {
            "default": true,
            "description": "When true, the product is visible in the LoyX Business (staff) app.",
            "title": "Loyx Business App Active",
            "type": "boolean"
          },
          "name": {
            "description": "Display name shown in the mobile app and digital receipts.",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "page_url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Public URL of the product's web page.",
            "title": "Page Url"
          },
          "price": {
            "$ref": "#/components/schemas/app__partners__schemas__v1__product__PriceInput",
            "description": "Base price in minor units paired with a currency code."
          },
          "stores": {
            "description": "Stores that carry this product — at least one. Each entry may set a per-store price override.",
            "items": {
              "$ref": "#/components/schemas/ProductStoreInput"
            },
            "minItems": 1,
            "title": "Stores",
            "type": "array"
          },
          "unit": {
            "default": "ea",
            "description": "Unit the product is sold in (ea, kg, g, l, ml, m, pack). Defaults to `ea` (each).",
            "title": "Unit",
            "type": "string"
          }
        },
        "required": [
          "name",
          "price",
          "stores"
        ],
        "title": "ProductCreateRequest",
        "type": "object"
      },
      "ProductListResponse": {
        "description": "Paginated list of products.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ProductResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "title": "ProductListResponse",
        "type": "object"
      },
      "ProductResponse": {
        "description": "Catalog-only product response.\n\nPer-store pricing lives in the stores_products schemas\n(`GET /stores/{store_id}/products`).",
        "properties": {
          "_id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand"
          },
          "categories": {
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "company_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Category"
          },
          "company_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Display Name"
          },
          "company_logo_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Logo Url"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "external_product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Your product key, when one is set.",
            "title": "External Product Id"
          },
          "identifiers": {
            "items": {
              "$ref": "#/components/schemas/IdentifierResponse"
            },
            "title": "Identifiers",
            "type": "array"
          },
          "image_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Link"
          },
          "is_loyalty_program_eligible": {
            "title": "Is Loyalty Program Eligible",
            "type": "boolean"
          },
          "loyx_app_active": {
            "title": "Loyx App Active",
            "type": "boolean"
          },
          "loyx_business_app_active": {
            "title": "Loyx Business App Active",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "page_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page Url"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceSchema"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit": {
            "title": "Unit",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          }
        },
        "required": [
          "_id",
          "name",
          "price",
          "unit",
          "loyx_app_active",
          "loyx_business_app_active",
          "is_loyalty_program_eligible",
          "created_at",
          "updated_at"
        ],
        "title": "ProductResponse",
        "type": "object"
      },
      "ProductStoreEntryResponse": {
        "description": "One store that carries the product, with per-store pricing.",
        "properties": {
          "created_at": {
            "description": "When the product was added to this store's assortment.",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "effective_price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceSchema"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit price at this store: the override when set, else the base price. Null when neither is set."
          },
          "price_override": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceSchema"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-store price override; null when the base price applies."
          },
          "store_id": {
            "description": "Internal UUID of the store.",
            "format": "uuid",
            "title": "Store Id",
            "type": "string"
          },
          "store_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Display name of the store.",
            "title": "Store Name"
          }
        },
        "required": [
          "store_id",
          "effective_price",
          "created_at"
        ],
        "title": "ProductStoreEntryResponse",
        "type": "object"
      },
      "ProductStoreInput": {
        "additionalProperties": false,
        "description": "Store assortment entry: a store that carries the product.",
        "properties": {
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/app__partners__schemas__v1__product__PriceInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional per-store price override. When omitted, the store uses the product's base price. Currency must match the base price."
          },
          "store_id": {
            "description": "Internal UUID of a store that carries this product.",
            "format": "uuid",
            "title": "Store Id",
            "type": "string"
          }
        },
        "required": [
          "store_id"
        ],
        "title": "ProductStoreInput",
        "type": "object"
      },
      "ProductStoresListResponse": {
        "description": "Stores carrying a product — bounded by store count, no pagination.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ProductStoreEntryResponse"
            },
            "title": "Data",
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "title": "ProductStoresListResponse",
        "type": "object"
      },
      "ProductUpdateRequest": {
        "additionalProperties": false,
        "description": "Partial update for an existing product.\n\nOnly fields explicitly sent in the request body are applied. Fields sent\nas `null` clear their value, except `price`, `name`, `loyx_app_active`,\n`loyx_business_app_active` and `is_loyalty_program_eligible`, which cannot\nbe cleared; omitted fields are left unchanged. Immutable\nfields (company_id, company_logo_url, etc.) are rejected at the service\nlayer.",
        "properties": {
          "brand": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated manufacturer or brand name.",
            "title": "Brand"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Full replacement of the category list.",
            "title": "Categories"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated long-form description.",
            "title": "Description"
          },
          "external_product_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set or change your product key. Cannot be cleared. 409 `external_product_id_conflict` when another product of the company (including a deleted one) already has it.",
            "title": "External Product Id"
          },
          "identifiers": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/app__partners__schemas__v1__product__IdentifierInput"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Full replacement of the typed identifier list (gtin/ean13/ean8/sku/pos). Send `[]` to clear all identifiers.",
            "title": "Identifiers"
          },
          "is_loyalty_program_eligible": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether purchases of this product accrue loyalty points or stamps.",
            "title": "Is Loyalty Program Eligible"
          },
          "loyx_app_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Visibility toggle for the consumer LoyX app.",
            "title": "Loyx App Active"
          },
          "loyx_business_app_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Visibility toggle for the LoyX Business (staff) app.",
            "title": "Loyx Business App Active"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated display name.",
            "title": "Name"
          },
          "page_url": {
            "anyOf": [
              {
                "maxLength": 2048,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated public URL of the product page.",
            "title": "Page Url"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/app__partners__schemas__v1__product__PriceInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated base price."
          },
          "stores": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ProductStoreInput"
                },
                "minItems": 1,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "description": "Full replacement of the store assortment. When sent, stores not listed are delisted and new stores are added. Omit to leave the assortment unchanged.",
            "title": "Stores"
          },
          "unit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated unit (ea, kg, g, l, ml, m, pack).",
            "title": "Unit"
          }
        },
        "title": "ProductUpdateRequest",
        "type": "object"
      },
      "QuantityInput": {
        "additionalProperties": false,
        "description": "Quantity with unit.",
        "properties": {
          "unit": {
            "default": "ea",
            "title": "Unit",
            "type": "string"
          },
          "value": {
            "exclusiveMinimum": 0,
            "title": "Value",
            "type": "integer"
          }
        },
        "required": [
          "value"
        ],
        "title": "QuantityInput",
        "type": "object"
      },
      "RewardBenefitResponse": {
        "description": "What the member gets. Which fields are set depends on `kind`.",
        "properties": {
          "amount": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RewardPriceResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fixed amount off, for `amount`."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fine print; for `text` it is the whole benefit.",
            "title": "Description"
          },
          "kind": {
            "description": "Benefit kind: `percent`, `amount`, `fixed_price`, `free_item`, `text`, `bundle_price`, `bundle_percent` or `multibuy`. Open enum: handle unknown values by showing `description`.",
            "title": "Kind",
            "type": "string"
          },
          "pay_quantity": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Items paid for in a `multibuy` (buy `quantity`, pay this).",
            "title": "Pay Quantity"
          },
          "per": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit a `fixed_price` applies per.",
            "title": "Per"
          },
          "percent": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Percent off (1-100) for percent kinds.",
            "title": "Percent"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RewardPriceResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "New price per unit (`fixed_price`) or bundle total (`bundle_price`)."
          },
          "quantity": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Items in a bundle or multibuy.",
            "title": "Quantity"
          }
        },
        "required": [
          "kind"
        ],
        "title": "RewardBenefitResponse",
        "type": "object"
      },
      "RewardListResponse": {
        "description": "Cursor-paginated list of a member's redeemable rewards, newest first.",
        "properties": {
          "data": {
            "description": "Rewards, newest first.",
            "items": {
              "$ref": "#/components/schemas/RewardResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/CursorPaginationMeta",
            "description": "Cursor pagination metadata."
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "title": "RewardListResponse",
        "type": "object"
      },
      "RewardPriceResponse": {
        "description": "Money in minor units with the currency and how to format it.",
        "properties": {
          "currency": {
            "description": "ISO 4217 currency code.",
            "title": "Currency",
            "type": "string"
          },
          "locale": {
            "description": "RFC 5646 locale for formatting (e.g. `sv-SE`).",
            "title": "Locale",
            "type": "string"
          },
          "minor_units": {
            "description": "Divisor to convert to major units (e.g. 100 for SEK).",
            "title": "Minor Units",
            "type": "integer"
          },
          "value": {
            "description": "Amount in minor units (e.g. öre, cents).",
            "title": "Value",
            "type": "integer"
          }
        },
        "required": [
          "value",
          "currency",
          "minor_units",
          "locale"
        ],
        "title": "RewardPriceResponse",
        "type": "object"
      },
      "RewardResponse": {
        "description": "One reward the member can redeem now, at the store asked about.",
        "properties": {
          "_id": {
            "description": "The reward's id (the member's entitlement); redemption will take this id.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "benefit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RewardBenefitResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the member gets; null when the offer has no deal cell."
          },
          "created_at": {
            "description": "When the member received it (UTC).",
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "max_redemptions": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "How many times the reward may be used in total; null for unlimited.",
            "title": "Max Redemptions"
          },
          "membership_id": {
            "description": "The member holding the reward.",
            "format": "uuid",
            "title": "Membership Id",
            "type": "string"
          },
          "offer_id": {
            "description": "The offer the reward was granted from.",
            "format": "uuid",
            "title": "Offer Id",
            "type": "string"
          },
          "terms_and_conditions": {
            "description": "Terms lines to show the cashier.",
            "items": {
              "type": "string"
            },
            "title": "Terms And Conditions",
            "type": "array"
          },
          "times_redeemed": {
            "description": "How many times it has been used so far.",
            "title": "Times Redeemed",
            "type": "integer"
          },
          "title": {
            "description": "Display title.",
            "title": "Title",
            "type": "string"
          },
          "valid_from": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Start of the validity window (UTC).",
            "title": "Valid From"
          },
          "valid_to": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "End of the validity window (UTC), if any.",
            "title": "Valid To"
          }
        },
        "required": [
          "_id",
          "membership_id",
          "offer_id",
          "title",
          "benefit",
          "terms_and_conditions",
          "valid_from",
          "valid_to",
          "max_redemptions",
          "times_redeemed",
          "created_at"
        ],
        "title": "RewardResponse",
        "type": "object"
      },
      "StoreContactInput": {
        "additionalProperties": false,
        "description": "Store contact details.",
        "properties": {
          "email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "pattern": "^\\+[1-9]\\d{1,14}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "website": {
            "anyOf": [
              {
                "format": "uri",
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "title": "StoreContactInput",
        "type": "object"
      },
      "StoreContactResponse": {
        "description": "Contact info in response.",
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          }
        },
        "title": "StoreContactResponse",
        "type": "object"
      },
      "StoreCreateRequest": {
        "additionalProperties": false,
        "description": "Request schema for creating a store.\n\naddress and geo are required for physical/pop_up stores,\noptional for online/warehouse stores.",
        "properties": {
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StoreContactInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_ids": {
            "additionalProperties": true,
            "title": "External Ids",
            "type": "object"
          },
          "external_store_id": {
            "maxLength": 255,
            "minLength": 1,
            "title": "External Store Id",
            "type": "string"
          },
          "geo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GeoLocationInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StoreMediaInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "logo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StoreMediaInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "org_number": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Number"
          },
          "status": {
            "default": "active",
            "title": "Status",
            "type": "string"
          },
          "tags": {
            "items": {
              "maxLength": 50,
              "type": "string"
            },
            "maxItems": 20,
            "title": "Tags",
            "type": "array"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          },
          "type": {
            "default": "physical",
            "title": "Type",
            "type": "string"
          },
          "vat_number": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Number"
          }
        },
        "required": [
          "name",
          "external_store_id",
          "timezone"
        ],
        "title": "StoreCreateRequest",
        "type": "object"
      },
      "StoreListResponse": {
        "description": "Paginated list of stores.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/StoreResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "title": "StoreListResponse",
        "type": "object"
      },
      "StoreMediaInput": {
        "additionalProperties": false,
        "description": "Logo/icon URL reference.",
        "properties": {
          "content_type": {
            "default": "image/png",
            "title": "Content Type",
            "type": "string"
          },
          "url": {
            "format": "uri",
            "minLength": 1,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "StoreMediaInput",
        "type": "object"
      },
      "StoreMediaResponse": {
        "description": "Media reference in response.",
        "properties": {
          "content_type": {
            "title": "Content Type",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url",
          "content_type"
        ],
        "title": "StoreMediaResponse",
        "type": "object"
      },
      "StoreProductListResponse": {
        "description": "Cursor-paginated list of a store's products.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/StoreProductResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/CursorPaginationMeta"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "title": "StoreProductListResponse",
        "type": "object"
      },
      "StoreProductResponse": {
        "description": "A product as carried at one store.",
        "properties": {
          "_id": {
            "description": "Product UUID.",
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand"
          },
          "categories": {
            "items": {
              "type": "string"
            },
            "title": "Categories",
            "type": "array"
          },
          "effective_price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceSchema"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit price at this store: the override when set, else the base price. Null when neither is set."
          },
          "image_link": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Image Link"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceSchema"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company-wide base price."
          },
          "price_override": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PriceSchema"
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-store price override; null when the base price applies."
          }
        },
        "required": [
          "_id"
        ],
        "title": "StoreProductResponse",
        "type": "object"
      },
      "StoreResponse": {
        "description": "Full store response — excludes company_id.",
        "properties": {
          "_id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StoreContactResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "external_ids": {
            "additionalProperties": {
              "type": "string"
            },
            "title": "External Ids",
            "type": "object"
          },
          "external_store_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Store Id"
          },
          "geo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GeoLocationResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StoreMediaResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "logo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StoreMediaResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "org_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Number"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "timezone": {
            "title": "Timezone",
            "type": "string"
          },
          "type": {
            "title": "Type",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "vat_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Number"
          }
        },
        "required": [
          "_id",
          "name",
          "type",
          "status",
          "timezone",
          "created_at",
          "updated_at"
        ],
        "title": "StoreResponse",
        "type": "object"
      },
      "StoreUpdateRequest": {
        "additionalProperties": false,
        "description": "Request schema for partially updating a store.\n\nAll fields are optional. Only provided fields are applied.",
        "properties": {
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "contact": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StoreContactInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_ids": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Ids"
          },
          "external_store_id": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Store Id"
          },
          "geo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GeoLocationInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "icon": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StoreMediaInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "logo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StoreMediaInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "org_number": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Org Number"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "tags": {
            "anyOf": [
              {
                "items": {
                  "maxLength": 50,
                  "type": "string"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timezone"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "vat_number": {
            "anyOf": [
              {
                "maxLength": 50,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vat Number"
          }
        },
        "title": "StoreUpdateRequest",
        "type": "object"
      },
      "TokenResponse": {
        "description": "OAuth2 Client Credentials token response.",
        "properties": {
          "access_token": {
            "description": "Opaque bearer token",
            "title": "Access Token",
            "type": "string"
          },
          "expires_in": {
            "description": "Token lifetime in seconds from issuance",
            "title": "Expires In",
            "type": "integer"
          },
          "scope": {
            "default": "",
            "description": "The scopes this token carries, space-separated (RFC 6749 §5.1), for example `members:read sales:write`. They are the API key's scopes at issuance; a scope change in the Portal ends the token at once.",
            "title": "Scope",
            "type": "string"
          },
          "token_type": {
            "default": "bearer",
            "description": "Always 'bearer'",
            "title": "Token Type",
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "expires_in"
        ],
        "title": "TokenResponse",
        "type": "object"
      },
      "TotalResponse": {
        "description": "Single totals entry. Value is integer minor units.\nCurrency is on the transaction root — not duplicated here.",
        "properties": {
          "type": {
            "title": "Type",
            "type": "string"
          },
          "value": {
            "title": "Value",
            "type": "integer"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "title": "TotalResponse",
        "type": "object"
      },
      "TransactionCreateRequest": {
        "additionalProperties": false,
        "description": "Request schema for creating a transaction.\n\ntotals and loyalty are excluded:\n- totals are derived server-side from items\n- loyalty is populated by the loyalty engine\n- status is computed from resolution results",
        "properties": {
          "country_code": {
            "default": "SE",
            "title": "Country Code",
            "type": "string"
          },
          "currency": {
            "default": "SEK",
            "title": "Currency",
            "type": "string"
          },
          "discounts": {
            "items": {
              "$ref": "#/components/schemas/TransactionDiscountInput"
            },
            "maxItems": 50,
            "title": "Discounts",
            "type": "array"
          },
          "external": {
            "$ref": "#/components/schemas/ExternalFieldsInput"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemInput"
            },
            "maxItems": 1000,
            "title": "Items",
            "type": "array"
          },
          "locale": {
            "default": "sv-SE",
            "title": "Locale",
            "type": "string"
          },
          "member": {
            "items": {
              "$ref": "#/components/schemas/MemberIdentifierInput"
            },
            "maxItems": 20,
            "title": "Member",
            "type": "array"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "origin": {
            "default": "pos",
            "title": "Origin",
            "type": "string"
          },
          "store_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Store Id"
          },
          "totals": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TransactionTotalsInput"
              },
              {
                "type": "null"
              }
            ],
            "description": "The `sale` shape — send instead of `items` when the POS knows only what the member paid. Mutually exclusive with `items`."
          },
          "transaction_type": {
            "default": "purchase",
            "title": "Transaction Type",
            "type": "string"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "external"
        ],
        "title": "TransactionCreateRequest",
        "type": "object"
      },
      "TransactionDiscountInput": {
        "additionalProperties": false,
        "description": "Basket-level discount in a create request.",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/app__partners__schemas__v1__transaction__PriceInput"
          },
          "description": {
            "default": "",
            "maxLength": 255,
            "title": "Description",
            "type": "string"
          },
          "personal_offer_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stored as the transaction's `offer_id`: the v2 Offer this discount came from, for sale attribution only. Not an entitlement id — entitlements are not redeemed on this surface.",
            "title": "Personal Offer Id"
          },
          "type": {
            "title": "Type",
            "type": "string"
          }
        },
        "required": [
          "type",
          "amount"
        ],
        "title": "TransactionDiscountInput",
        "type": "object"
      },
      "TransactionListResponse": {
        "description": "Paginated list of transaction summaries.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/TransactionSummaryResponse"
            },
            "title": "Data",
            "type": "array"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationMeta"
          }
        },
        "required": [
          "data",
          "pagination"
        ],
        "title": "TransactionListResponse",
        "type": "object"
      },
      "TransactionResponse": {
        "description": "Full transaction response for detail endpoints.",
        "properties": {
          "_id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "company_id": {
            "format": "uuid",
            "title": "Company Id",
            "type": "string"
          },
          "country_code": {
            "title": "Country Code",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "discounts": {
            "items": {
              "$ref": "#/components/schemas/DiscountResponse"
            },
            "title": "Discounts",
            "type": "array"
          },
          "external": {
            "$ref": "#/components/schemas/ExternalFieldsInput"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/ItemResponse"
            },
            "title": "Items",
            "type": "array"
          },
          "locale": {
            "title": "Locale",
            "type": "string"
          },
          "loyalty": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LoyaltyResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "member": {
            "items": {
              "$ref": "#/components/schemas/MemberIdentifierInput"
            },
            "title": "Member",
            "type": "array"
          },
          "membership_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Membership Id"
          },
          "metadata": {
            "additionalProperties": true,
            "title": "Metadata",
            "type": "object"
          },
          "origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin"
          },
          "status": {
            "default": "unresolved",
            "title": "Status",
            "type": "string"
          },
          "store_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Store Id"
          },
          "totals": {
            "items": {
              "$ref": "#/components/schemas/TotalResponse"
            },
            "title": "Totals",
            "type": "array"
          },
          "transaction_type": {
            "title": "Transaction Type",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "title": "Updated At",
            "type": "string"
          },
          "user_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          },
          "voided_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voided At"
          }
        },
        "required": [
          "_id",
          "company_id",
          "transaction_type",
          "country_code",
          "locale",
          "created_at",
          "updated_at",
          "currency",
          "external",
          "totals",
          "items",
          "member"
        ],
        "title": "TransactionResponse",
        "type": "object"
      },
      "TransactionSummaryResponse": {
        "description": "Lighter transaction response for list endpoints.",
        "properties": {
          "_id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "company_id": {
            "format": "uuid",
            "title": "Company Id",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "origin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Origin"
          },
          "status": {
            "default": "unresolved",
            "title": "Status",
            "type": "string"
          },
          "totals": {
            "items": {
              "$ref": "#/components/schemas/TotalResponse"
            },
            "title": "Totals",
            "type": "array"
          },
          "transaction_type": {
            "title": "Transaction Type",
            "type": "string"
          },
          "voided_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voided At"
          }
        },
        "required": [
          "_id",
          "company_id",
          "transaction_type",
          "currency",
          "created_at",
          "totals"
        ],
        "title": "TransactionSummaryResponse",
        "type": "object"
      },
      "TransactionTotalsInput": {
        "additionalProperties": false,
        "description": "What the member paid, when the POS cannot send the basket.\n\nThe `sale` shape: a register that knows the receipt total but not its\nline items. `to_model` turns this into exactly one synthetic,\nnon-eligible line so everything downstream — `calculate_and_store_totals`,\nthe ledger engine, the reversal path — sees the ordinary document shape\nit already handles. Nothing measured on selected lines can earn from it,\nwhich is why the line is deliberately not loyalty-eligible.\n\nThe transaction records **VAT 0, and NET equal to PAID**: a register\nthat cannot send line items cannot send their tax rates either, and the\nreceipt total alone does not say what the split was. Splitting it would\nmean guessing a rate, which is a worse answer than none for\nSkatteverket. A transaction that must carry VAT has to send `items`.",
        "properties": {
          "currency": {
            "anyOf": [
              {
                "maxLength": 3,
                "minLength": 3,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO 4217 code. Defaults to the transaction currency.",
            "title": "Currency"
          },
          "paid_minor": {
            "description": "What the member paid, in minor units (öre). Use when the POS has no line items; the API records one synthetic, non-eligible line so amount-based programs can earn.",
            "minimum": 0,
            "title": "Paid Minor",
            "type": "integer"
          }
        },
        "required": [
          "paid_minor"
        ],
        "title": "TransactionTotalsInput",
        "type": "object"
      },
      "app__partners__schemas__v1__product__IdentifierInput": {
        "additionalProperties": false,
        "description": "Typed product identifier (gtin / ean13 / ean8 / sku / pos).",
        "properties": {
          "type": {
            "description": "Identifier type: gtin, ean13, ean8, sku, or pos.",
            "title": "Type",
            "type": "string"
          },
          "value": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "title": "IdentifierInput",
        "type": "object"
      },
      "app__partners__schemas__v1__product__PriceInput": {
        "additionalProperties": false,
        "description": "Monetary amount in minor units + currency code (request input).",
        "properties": {
          "currency": {
            "default": "SEK",
            "description": "ISO 4217 currency code",
            "title": "Currency",
            "type": "string"
          },
          "value": {
            "description": "Amount in minor units (e.g. öre, cents)",
            "title": "Value",
            "type": "integer"
          }
        },
        "required": [
          "value"
        ],
        "title": "PriceInput",
        "type": "object"
      },
      "app__partners__schemas__v1__transaction__IdentifierInput": {
        "additionalProperties": false,
        "description": "Product identifier (gtin, sku, etc.).",
        "properties": {
          "type": {
            "title": "Type",
            "type": "string"
          },
          "value": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Value",
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ],
        "title": "IdentifierInput",
        "type": "object"
      },
      "app__partners__schemas__v1__transaction__PriceInput": {
        "additionalProperties": false,
        "description": "Monetary amount in minor units + ISO 4217 currency (request input).",
        "properties": {
          "currency": {
            "default": "SEK",
            "title": "Currency",
            "type": "string"
          },
          "value": {
            "minimum": 0,
            "title": "Value",
            "type": "integer"
          }
        },
        "required": [
          "value"
        ],
        "title": "PriceInput",
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "description": "OAuth2 Client Credentials access token. Obtain one from POST /v1/auth/token and pass it as `Bearer <token>`.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "B2B API for partner integrations (POS systems, backend services)",
    "title": "LoyX Partners API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/": {
      "get": {
        "description": "Get API version information.\n\n``documentation`` points at the live Swagger UI where it is served (local\nand development, ``docs_urls_for``) and at the public developer docs site\n(``PARTNERS_DOCS_URL``) everywhere else, never at a link that 404s.",
        "operationId": "api_info_v1__get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "title": "Response Api Info V1  Get",
                  "type": "object"
                }
              }
            },
            "description": "Successful Response"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "summary": "API Information",
        "tags": [
          "Info"
        ]
      }
    },
    "/v1/auth/token": {
      "post": {
        "description": "Exchange `client_id` and `client_secret` (via HTTP Basic) for an opaque access token valid for one hour (`expires_in`). Use it as `Authorization: Bearer <token>` against every other Partners endpoint, and fetch a new one on a 401. The token carries the API key's scopes (`scope`). Limited to 30 calls a minute per API key and 60 per caller IP.",
        "operationId": "issue_token_v1_auth_token_post",
        "parameters": [
          {
            "description": "HTTP Basic header: `Basic base64(client_id:client_secret)`.",
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "HTTP Basic header: `Basic base64(client_id:client_secret)`.",
              "title": "Authorization"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_issue_token_v1_auth_token_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            },
            "description": "The issued access token, its lifetime and its scopes."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Unsupported `grant_type`."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Missing or invalid client credentials, or a revoked key."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Token requests over the limit; see `Retry-After`."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "The rate limiter is unreachable, so issuance is refused."
          }
        },
        "summary": "Issue an access token (OAuth2 Client Credentials)",
        "tags": [
          "Auth"
        ]
      }
    },
    "/v1/memberships/lookup": {
      "post": {
        "description": "Find a single membership in the authenticated company by one of six identifiers. The request body is `{identifier, value}`. `identifier` must be one of `membership_id`, `user_id`, `qr_code`, `mobile_number`, `email`, or `national_id`. `membership_id` and `user_id` match top-level UUID fields; `mobile_number`, `email` and `national_id` match entries in `required_member_fields`. The value format is validated per identifier type (UUID / E.164 / email / string).\n\n**Scanning a member's QR code:** use `qr_code` and send the scanned string exactly as read, with no client-side parsing. Both code generations are accepted — a rotating `lx1_` token (current) and a bare member UUID (legacy) — and the API tells them apart itself, so no client change is needed when the legacy form is retired. A rotating token is short-lived: if it has expired or been superseded the response is `404 qr_code_not_resolvable`, which means *ask the member to refresh their code*, as distinct from `404 membership_not_found`, which means the person is not an active member of your company.\n\n`loyalty_program_type` is `points`, `stamps`, or `null` — for a member on no resolvable program, or on a unit whose presentation has no value in this contract yet.",
        "operationId": "lookup_membership_v1_memberships_lookup_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MembershipLookupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MembershipDetailResponse"
                }
              }
            },
            "description": "The matching membership, in its polymorphic detail shape."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No membership matches the provided identifier (`membership_not_found`), or the scanned QR token is expired or invalid (`qr_code_not_resolvable`)."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`qr_code` only — the QR token store is temporarily unreachable. Retry; never treat this as an expired code."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Look up a membership by identifier",
        "tags": [
          "Memberships"
        ]
      }
    },
    "/v1/memberships/{membership_id}/loyalty": {
      "get": {
        "description": "Unit-agnostic loyalty read model for one membership: `balance`, `unit` (label + presentation), `program`, the current `cycle`, and `punches` (populated only when `unit.presentation` is `card`; `null` otherwise).",
        "operationId": "get_membership_loyalty_v1_memberships__membership_id__loyalty_get",
        "parameters": [
          {
            "in": "path",
            "name": "membership_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Membership Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MembershipLoyaltyResponse"
                }
              }
            },
            "description": "The membership's current loyalty state."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "No membership with the given id in the authenticated company."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get a membership's loyalty state",
        "tags": [
          "Memberships"
        ]
      }
    },
    "/v1/memberships/{membership_id}/rewards": {
      "get": {
        "description": "The rewards the member can redeem now, for the member card at the till: active rewards only, none from a paused campaign, and, when the store is given (`store_id` or `external_store_id`, not both), none that do not run at that store. Cursor-paginated, newest first. Read-only.",
        "operationId": "list_member_rewards_v1_memberships__membership_id__rewards_get",
        "parameters": [
          {
            "description": "The membership's internal UUID.",
            "in": "path",
            "name": "membership_id",
            "required": true,
            "schema": {
              "description": "The membership's internal UUID.",
              "format": "uuid",
              "title": "Membership Id",
              "type": "string"
            }
          },
          {
            "description": "LoyX id of the store the till is in.",
            "in": "query",
            "name": "store_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "LoyX id of the store the till is in.",
              "title": "Store Id"
            }
          },
          {
            "description": "The till's own code for the store, as registered on the LoyX store.",
            "in": "query",
            "name": "external_store_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The till's own code for the store, as registered on the LoyX store.",
              "title": "External Store Id"
            }
          },
          {
            "description": "Maximum rewards to return (1-200).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Maximum rewards to return (1-200).",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque cursor from the previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque cursor from the previous page's `next_cursor`.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardListResponse"
                }
              }
            },
            "description": "Cursor-paginated list of redeemable rewards."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`store_reference_ambiguous` (both store parameters sent) or `invalid_cursor`."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Membership or store not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List a member's redeemable rewards",
        "tags": [
          "Rewards"
        ]
      }
    },
    "/v1/products": {
      "get": {
        "description": "List products with offset pagination. Returns an empty array if no products are defined for the company.",
        "operationId": "list_products_v1_products_get",
        "parameters": [
          {
            "description": "Maximum number of products to return (1–200).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Maximum number of products to return (1–200).",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Number of products to skip.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Number of products to skip.",
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductListResponse"
                }
              }
            },
            "description": "Paginated list of products."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List products",
        "tags": [
          "Products"
        ]
      },
      "post": {
        "description": "Create a new product in the authenticated company's catalog. Fields such as company logo, display name, and category are resolved server-side from the authenticated company — clients never supply them.\n\n**Upsert on `external_product_id`.** When the body carries an `external_product_id` that a product of this company already has, that product is updated instead and the response is `200` (a new product is `201`). On update only the fields you send are changed (omitted optional fields keep their stored value), `stores` replaces the assortment, and `image_link` is ignored (it is set at create only). A soft-deleted product with the key is restored. Concurrent upserts of one key converge on one product. Without `external_product_id` every call creates a new product.",
        "operationId": "create_product_v1_products_post",
        "parameters": [
          {
            "description": "Optional. When provided, retrying with the same key returns the original result.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional. When provided, retrying with the same key returns the original result.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "A product with this external_product_id existed and was updated."
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponse"
                }
              }
            },
            "description": "A new product was created."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create or upsert a product",
        "tags": [
          "Products"
        ]
      }
    },
    "/v1/products/bulk": {
      "post": {
        "description": "Create or update up to 100 products in one call, each matched on its required `external_product_id` with the same rules as `POST /products`. Items are processed independently and in order: a failing item does not roll back the others, and the response carries one result per item (`created`, `updated` or `failed` with the error). The call is safe to retry — resend the whole request or only the failed items. A key repeated within one request fails from its second occurrence (`duplicate_in_request`).\n\nAlways `207 Multi-Status`, even when every item succeeded: read each item's `status`. With an `Idempotency-Key`, a resend of the same body within 24 h returns the first result without running again; the same key with a different body is `409 idempotency_key_reused`, and a resend while the first call is still running is `409 idempotency_request_in_progress`.",
        "operationId": "bulk_upsert_products_v1_products_bulk_post",
        "parameters": [
          {
            "description": "Optional. A resend with the same key and body within 24 h returns the original result instead of running again.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 255,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional. A resend with the same key and body within 24 h returns the original result instead of running again.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductBulkUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "207": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductBulkUpsertResponse"
                }
              }
            },
            "description": "One result per item, in request order, plus counts."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Idempotency-Key reused with another body, or still in progress."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Bulk upsert products",
        "tags": [
          "Products"
        ]
      }
    },
    "/v1/products/{product_id}": {
      "delete": {
        "description": "Soft-delete a product. The product is marked as deleted but not permanently removed.",
        "operationId": "delete_product_v1_products__product_id__delete",
        "parameters": [
          {
            "description": "The product's internal UUID.",
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "description": "The product's internal UUID.",
              "format": "uuid",
              "title": "Product Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Product deleted successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Product not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete product by ID",
        "tags": [
          "Products"
        ]
      },
      "get": {
        "description": "Retrieve a single product by its internal UUID.",
        "operationId": "get_product_v1_products__product_id__get",
        "parameters": [
          {
            "description": "The product's internal UUID.",
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "description": "The product's internal UUID.",
              "format": "uuid",
              "title": "Product Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponse"
                }
              }
            },
            "description": "The requested product."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Product not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get product by ID",
        "tags": [
          "Products"
        ]
      },
      "patch": {
        "description": "Partially update a product. Only include the fields you want to change. Omitted fields are left unchanged. Set a field to `null` to clear it.",
        "operationId": "update_product_v1_products__product_id__patch",
        "parameters": [
          {
            "description": "The product's internal UUID.",
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "description": "The product's internal UUID.",
              "format": "uuid",
              "title": "Product Id",
              "type": "string"
            }
          },
          {
            "description": "Optional. When provided, retrying with the same key returns the original result.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional. When provided, retrying with the same key returns the original result.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponse"
                }
              }
            },
            "description": "The updated product."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Product not found."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Another product already has this external_product_id."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update product by ID",
        "tags": [
          "Products"
        ]
      }
    },
    "/v1/products/{product_id}/stores": {
      "get": {
        "description": "List the stores whose assortment includes this product, with the per-store price override (when set) and the effective price.",
        "operationId": "list_product_stores_v1_products__product_id__stores_get",
        "parameters": [
          {
            "description": "The product's internal UUID.",
            "in": "path",
            "name": "product_id",
            "required": true,
            "schema": {
              "description": "The product's internal UUID.",
              "format": "uuid",
              "title": "Product Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductStoresListResponse"
                }
              }
            },
            "description": "Stores carrying the product."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Product not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List stores carrying a product",
        "tags": [
          "Products"
        ]
      }
    },
    "/v1/stores": {
      "get": {
        "description": "List stores with offset pagination. Filter by status and/or type to narrow results.",
        "operationId": "list_stores_v1_stores_get",
        "parameters": [
          {
            "description": "Maximum number of stores to return (1–200).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Maximum number of stores to return (1–200).",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Number of stores to skip.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Number of stores to skip.",
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "description": "Filter by store status (e.g. `active`, `inactive`).",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by store status (e.g. `active`, `inactive`).",
              "title": "Status"
            }
          },
          {
            "description": "Filter by store type (e.g. `physical`, `online`, `warehouse`).",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by store type (e.g. `physical`, `online`, `warehouse`).",
              "title": "Type"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreListResponse"
                }
              }
            },
            "description": "Paginated list of stores."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List stores",
        "tags": [
          "Stores"
        ]
      },
      "post": {
        "description": "Create a new store for the authenticated company.",
        "operationId": "create_store_v1_stores_post",
        "parameters": [
          {
            "description": "Optional. When provided, retrying with the same key returns the original result.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional. When provided, retrying with the same key returns the original result.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreResponse"
                }
              }
            },
            "description": "The created store."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "A store with this external ID already exists."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create a store",
        "tags": [
          "Stores"
        ]
      }
    },
    "/v1/stores/external/{external_store_id}": {
      "delete": {
        "description": "Soft-delete a store addressed by the company's own external identifier.",
        "operationId": "delete_store_by_external_id_v1_stores_external__external_store_id__delete",
        "parameters": [
          {
            "description": "The company's external identifier for the store.",
            "in": "path",
            "name": "external_store_id",
            "required": true,
            "schema": {
              "description": "The company's external identifier for the store.",
              "title": "External Store Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Store deleted successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Store not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete store by external ID",
        "tags": [
          "Stores"
        ]
      },
      "get": {
        "description": "Retrieve a single store by the company's own external identifier (e.g. POS code).",
        "operationId": "get_store_by_external_id_v1_stores_external__external_store_id__get",
        "parameters": [
          {
            "description": "The company's external identifier for the store.",
            "in": "path",
            "name": "external_store_id",
            "required": true,
            "schema": {
              "description": "The company's external identifier for the store.",
              "title": "External Store Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreResponse"
                }
              }
            },
            "description": "The requested store."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Store not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get store by external ID",
        "tags": [
          "Stores"
        ]
      },
      "patch": {
        "description": "Partially update a store addressed by the company's own external identifier. Same semantics as `PATCH /stores/{store_id}`.",
        "operationId": "update_store_by_external_id_v1_stores_external__external_store_id__patch",
        "parameters": [
          {
            "description": "The company's external identifier for the store.",
            "in": "path",
            "name": "external_store_id",
            "required": true,
            "schema": {
              "description": "The company's external identifier for the store.",
              "title": "External Store Id",
              "type": "string"
            }
          },
          {
            "description": "Optional. When provided, retrying with the same key returns the original result.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional. When provided, retrying with the same key returns the original result.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreResponse"
                }
              }
            },
            "description": "The updated store."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Store not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update store by external ID",
        "tags": [
          "Stores"
        ]
      }
    },
    "/v1/stores/{store_id}": {
      "delete": {
        "description": "Soft-delete a store. The store is marked as deleted but not permanently removed.",
        "operationId": "delete_store_v1_stores__store_id__delete",
        "parameters": [
          {
            "description": "The store's internal UUID.",
            "in": "path",
            "name": "store_id",
            "required": true,
            "schema": {
              "description": "The store's internal UUID.",
              "format": "uuid",
              "title": "Store Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Store deleted successfully."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Store not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete store by ID",
        "tags": [
          "Stores"
        ]
      },
      "get": {
        "description": "Retrieve a single store by its internal UUID.",
        "operationId": "get_store_v1_stores__store_id__get",
        "parameters": [
          {
            "description": "The store's internal UUID.",
            "in": "path",
            "name": "store_id",
            "required": true,
            "schema": {
              "description": "The store's internal UUID.",
              "format": "uuid",
              "title": "Store Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreResponse"
                }
              }
            },
            "description": "The requested store."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Store not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get store by ID",
        "tags": [
          "Stores"
        ]
      },
      "patch": {
        "description": "Partially update a store. Only include the fields you want to change. Omitted fields are left unchanged. Set a field to `null` to clear it.",
        "operationId": "update_store_v1_stores__store_id__patch",
        "parameters": [
          {
            "description": "The store's internal UUID.",
            "in": "path",
            "name": "store_id",
            "required": true,
            "schema": {
              "description": "The store's internal UUID.",
              "format": "uuid",
              "title": "Store Id",
              "type": "string"
            }
          },
          {
            "description": "Optional. When provided, retrying with the same key returns the original result.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional. When provided, retrying with the same key returns the original result.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreResponse"
                }
              }
            },
            "description": "The updated store."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Store not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Update store by ID",
        "tags": [
          "Stores"
        ]
      }
    },
    "/v1/stores/{store_id}/products": {
      "get": {
        "description": "List the products carried at a store with cursor pagination. Each item includes the per-store effective price. Pass `next_cursor` from the previous response as `cursor` for the next page.",
        "operationId": "list_store_products_v1_stores__store_id__products_get",
        "parameters": [
          {
            "description": "The store's internal UUID.",
            "in": "path",
            "name": "store_id",
            "required": true,
            "schema": {
              "description": "The store's internal UUID.",
              "format": "uuid",
              "title": "Store Id",
              "type": "string"
            }
          },
          {
            "description": "Maximum number of products to return.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "description": "Maximum number of products to return.",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Opaque pagination token from a previous response.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Opaque pagination token from a previous response.",
              "title": "Cursor"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreProductListResponse"
                }
              }
            },
            "description": "Paginated list of the store's products."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Store not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List a store's products",
        "tags": [
          "Store Products"
        ]
      }
    },
    "/v1/transactions": {
      "get": {
        "description": "List transactions for the authenticated company with offset pagination. Filter by status to narrow results. Returns an empty array if no transactions match.",
        "operationId": "list_transactions_v1_transactions_get",
        "parameters": [
          {
            "description": "Maximum number of transactions to return (1–200).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 20,
              "description": "Maximum number of transactions to return (1–200).",
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "description": "Number of transactions to skip.",
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "description": "Number of transactions to skip.",
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "description": "Filter by transaction status (e.g. `pending`, `resolved`).",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by transaction status (e.g. `pending`, `resolved`).",
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionListResponse"
                }
              }
            },
            "description": "Paginated list of transactions."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List transactions",
        "tags": [
          "Transactions"
        ]
      },
      "post": {
        "description": "Create a new transaction for the authenticated company. Line totals and basket totals are derived server-side from the submitted items; client-sent totals are ignored.\n\n**Duplicates.** Send the till's own id as `external.external_transaction_id` on every sale; an `Idempotency-Key` header is optional and honoured as well. Posting again under the same id or key with the same content (a network retry) books nothing new and answers `200` with the original transaction and the header `Idempotent-Replayed: true`. The same id with different content answers `409` `external_transaction_id_conflict`; a key reused for a different sale answers `409` `idempotency_key_reused`. Content means the type, currency, `external` fields and the lines' and discounts' values; `member` and `metadata` are not compared.",
        "operationId": "create_transaction_v1_transactions_post",
        "parameters": [
          {
            "description": "Optional. Retrying with the same key returns the original transaction (`200`, `Idempotent-Replayed: true`); the same key with a different body is `409`.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional. Retrying with the same key returns the original transaction (`200`, `Idempotent-Replayed: true`); the same key with a different body is `409`.",
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Replay: this `external_transaction_id` was already booked with the same content. The body is the original transaction; the response carries `Idempotent-Replayed: true`.",
            "headers": {
              "Idempotent-Replayed": {
                "description": "`true` when the body is an earlier booking of this sale.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionResponse"
                }
              }
            },
            "description": "The created transaction, including computed totals and loyalty outcome."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`external_transaction_id_conflict`: this `external_transaction_id` is already booked with different content; `idempotency_key_reused`: this `Idempotency-Key` was used for a different sale."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create a transaction",
        "tags": [
          "Transactions"
        ]
      }
    },
    "/v1/transactions/{transaction_id}": {
      "get": {
        "description": "Retrieve a single transaction by its internal UUID.",
        "operationId": "get_transaction_v1_transactions__transaction_id__get",
        "parameters": [
          {
            "description": "The transaction's internal UUID.",
            "in": "path",
            "name": "transaction_id",
            "required": true,
            "schema": {
              "description": "The transaction's internal UUID.",
              "format": "uuid",
              "title": "Transaction Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionResponse"
                }
              }
            },
            "description": "The requested transaction."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`missing_token`, `invalid_authorization_header` or `invalid_token`: get a new access token and retry once."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`insufficient_scope`: the API key lacks the scope this route needs."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Transaction not found."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`rate_limit_exceeded`: wait `Retry-After` seconds."
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "`internal_server_error` or `database_error` (type `internal_error`): our fault. Retry with backoff; quote `request_id`."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get transaction detail",
        "tags": [
          "Transactions"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.loyx.se/partners",
      "description": "Production"
    }
  ]
}
