{
  "openapi": "3.0.3",
  "info": {
    "title": "Touchpoint integration kit",
    "version": "0.2.0",
    "description": "Local simulated API. The public demo store key is preloaded in Swagger UI. It is a Bearer API key, not a JWT. Use the preset selector for consistent alias headers and bodies. All examples come from the versioned fixtures; no real POS behavior is qualified."
  },
  "servers": [
    {
      "url": "/mock",
      "description": "Local mock through the kit web server (same origin)"
    }
  ],
  "tags": [
    {
      "name": "Integration",
      "description": "Calculate and finish aliases used by an integrator."
    },
    {
      "name": "Scenarios",
      "description": "One ready-to-run endpoint per scenario."
    }
  ],
  "security": [
    {
      "StoreKey": []
    }
  ],
  "paths": {
    "/comerzzia/touchpoint/basket/calculate": {
      "post": {
        "tags": [
          "Integration"
        ],
        "operationId": "calculate",
        "summary": "Calculate the complete basket — select a mock case",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. X-Mock-Case is mock-only. Match it to the request example. Select MOCK_ONLY_INVALID_SELECTOR to exercise HTTP 400. The preset selector above Swagger sets both for you. Omit the selector when moving to a real installation.",
        "parameters": [
          {
            "name": "X-Mock-Case",
            "in": "header",
            "required": true,
            "description": "Choose the matching request example; this header is only for the mock.",
            "schema": {
              "type": "string",
              "enum": [
                "02",
                "01",
                "03",
                "04",
                "06",
                "07",
                "08",
                "14",
                "14refused",
                "14unavailable",
                "15",
                "16",
                "16b",
                "17",
                "18",
                "19",
                "MOCK_ONLY_INVALID_SELECTOR"
              ],
              "default": "02"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_02": {
                  "summary": "First item",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [],
                    "add": {
                      "ref": "a1",
                      "barcode": "MOCK-ITEM-A",
                      "qty": 1
                    }
                  }
                },
                "case_01": {
                  "summary": "Empty basket; dedicated operator available",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": []
                  }
                },
                "case_03": {
                  "summary": "Second item, two units",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "a2",
                      "barcode": "MOCK-ITEM-B",
                      "qty": 2
                    }
                  }
                },
                "case_04": {
                  "summary": "Third item",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      }
                    ],
                    "add": {
                      "ref": "a3",
                      "barcode": "MOCK-ITEM-C",
                      "qty": 1
                    }
                  }
                },
                "case_06": {
                  "summary": "Remove item a2",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ]
                  }
                },
                "case_07": {
                  "summary": "Unknown item",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "x1",
                      "barcode": "MOCK-UNKNOWN",
                      "qty": 1
                    }
                  }
                },
                "case_08": {
                  "summary": "Duplicate reference",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "a1",
                      "barcode": "MOCK-ITEM-C",
                      "qty": 1
                    }
                  }
                },
                "case_14": {
                  "summary": "Loyalty accepted",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ]
                  }
                },
                "case_14refused": {
                  "summary": "Loyalty refused",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ]
                  }
                },
                "case_14unavailable": {
                  "summary": "Loyalty service unavailable",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ]
                  }
                },
                "case_15": {
                  "summary": "Card sent as an item",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "c1",
                      "barcode": "MOCK-LOYALTY-001",
                      "qty": 1
                    }
                  }
                },
                "case_16": {
                  "summary": "Price-embedded label",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "w1",
                      "barcode": "2000653002503",
                      "qty": 1
                    }
                  }
                },
                "case_16b": {
                  "summary": "Label quantity rejected",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "w1",
                      "barcode": "2000653002503",
                      "qty": 3
                    }
                  }
                },
                "case_17": {
                  "summary": "Age check enabled; item refused",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "v1",
                      "barcode": "MOCK-AGE-ITEM",
                      "qty": 1
                    }
                  }
                },
                "case_18": {
                  "summary": "Touchpoints disabled",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [],
                    "add": {
                      "ref": "a1",
                      "barcode": "MOCK-ITEM-A",
                      "qty": 1
                    }
                  }
                },
                "case_19": {
                  "summary": "Dedicated operator unavailable",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [],
                    "add": {
                      "ref": "a1",
                      "barcode": "MOCK-ITEM-A",
                      "qty": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_02": {
                    "summary": "First item",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 1,
                      "total": 2,
                      "totalSaving": 1,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "0673ac4c766a437914848495ce9dbb1ce543f124a6cfbee43b838fe0b2f26de4"
                    }
                  },
                  "case_01": {
                    "summary": "Empty basket; dedicated operator available",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [],
                      "rejected": [],
                      "totalItems": 0,
                      "total": 0,
                      "totalSaving": 0,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "3fe168aff74e347191cd9c464d17567bc7b336e8d9f181d917c41f7b4f1508d6"
                    }
                  },
                  "case_03": {
                    "summary": "Second item, two units",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 3,
                      "total": 6,
                      "totalSaving": 2,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "5c6234238bf5017893661f878940d39047e68bb062b7efd2157b205ab2908cfb"
                    }
                  },
                  "case_04": {
                    "summary": "Third item",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "c4f849a7d870d8beda64d5849e94abdb970cee52f239a6744fffbe99e4450a45"
                    }
                  },
                  "case_06": {
                    "summary": "Remove item a2",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 2,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 2,
                      "total": 5.5,
                      "totalSaving": 1.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "e668d99bf2fbc2c5ba39ee794e105ad3aa71cd0bbabf27087a533d96a0bc9857"
                    }
                  },
                  "case_07": {
                    "summary": "Unknown item",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [
                        {
                          "ref": "x1",
                          "barcode": "MOCK-UNKNOWN",
                          "code": "NOT_FOUND",
                          "reason": "Synthetic unknown item"
                        }
                      ],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "c4f849a7d870d8beda64d5849e94abdb970cee52f239a6744fffbe99e4450a45"
                    }
                  },
                  "case_08": {
                    "summary": "Duplicate reference",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-C",
                          "code": "DUPLICATE_REF",
                          "reason": "duplicate ref"
                        }
                      ],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "c4f849a7d870d8beda64d5849e94abdb970cee52f239a6744fffbe99e4450a45"
                    }
                  },
                  "case_14": {
                    "summary": "Loyalty accepted",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "ACCEPTED",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                    }
                  },
                  "case_14refused": {
                    "summary": "Loyalty refused",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "REFUSED",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "7347b68c8860e0738d45be01e9a4559f8107dcd1530ce7eeef61156b23e95de7"
                    }
                  },
                  "case_14unavailable": {
                    "summary": "Loyalty service unavailable",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "UNAVAILABLE",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "c2d6455fe91d0a7b5aadd7b771f6c86698662262d1922013d87b7a7e80156e1e"
                    }
                  },
                  "case_15": {
                    "summary": "Card sent as an item",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "ACCEPTED",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        }
                      ],
                      "rejected": [
                        {
                          "ref": "c1",
                          "barcode": "MOCK-LOYALTY-001",
                          "code": "NOT_SOLD_BY_TOUCHPOINT",
                          "reason": "send the loyalty card as loyaltyCard"
                        }
                      ],
                      "totalItems": 1,
                      "total": 2,
                      "totalSaving": 1,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "04da8579710416fe8b3a487d29bc5e061cdade382523dc0f159c153d4e25dafd"
                    }
                  },
                  "case_16": {
                    "summary": "Price-embedded label",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "w1",
                          "barcode": "2000653002503",
                          "qty": 1,
                          "lineId": 2,
                          "itemCode": "DEMO-W",
                          "description": "Demo weighed item",
                          "weight": 0.2,
                          "unitPrice": 12.5,
                          "amountWithoutDiscount": 2.5,
                          "amount": 2.5,
                          "discount": 0,
                          "promotions": []
                        }
                      ],
                      "rejected": [],
                      "totalItems": 1.2,
                      "total": 4.5,
                      "totalSaving": 1,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "523d60bd1671192b499b0ce7c9064b5a0e2f86a2880912a180daed122ebbd8b0"
                    }
                  },
                  "case_16b": {
                    "summary": "Label quantity rejected",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        }
                      ],
                      "rejected": [
                        {
                          "ref": "w1",
                          "barcode": "2000653002503",
                          "code": "INVALID_LINE",
                          "reason": "a label is sold once per scan: qty must be 1"
                        }
                      ],
                      "totalItems": 1,
                      "total": 2,
                      "totalSaving": 1,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "0673ac4c766a437914848495ce9dbb1ce543f124a6cfbee43b838fe0b2f26de4"
                    }
                  },
                  "case_17": {
                    "summary": "Age check enabled; item refused",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        }
                      ],
                      "rejected": [
                        {
                          "ref": "v1",
                          "barcode": "MOCK-AGE-ITEM",
                          "code": "AGE_CHECK",
                          "reason": "Synthetic age-restricted item; attendant required"
                        }
                      ],
                      "totalItems": 1,
                      "total": 2,
                      "totalSaving": 1,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "0673ac4c766a437914848495ce9dbb1ce543f124a6cfbee43b838fe0b2f26de4"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "MOCK_ONLY: missing, unknown or incompatible X-Mock-Case selector",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "MOCK_ONLY: missing, unknown or incompatible X-Mock-Case selector"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  },
                  "case_18": {
                    "summary": "Touchpoints disabled",
                    "value": {
                      "error": "touchpoints are disabled on this till"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Simulated operation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "case_19": {
                    "summary": "Dedicated operator unavailable",
                    "value": {
                      "error": "touchpoint operator not configured (ALKEMY_POS.TOUCHPOINT_OPERATOR)"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "02",
          "01",
          "03",
          "04",
          "06",
          "07",
          "08",
          "14",
          "14refused",
          "14unavailable",
          "15",
          "16",
          "16b",
          "17",
          "18",
          "19"
        ]
      }
    },
    "/comerzzia/touchpoint/basket/finish": {
      "post": {
        "tags": [
          "Integration"
        ],
        "operationId": "finish",
        "summary": "Finish or retry the basket — select a mock case",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. X-Mock-Case is mock-only. Match it to the request example. Select MOCK_ONLY_INVALID_SELECTOR to exercise HTTP 400. The preset selector above Swagger sets both for you. Omit the selector when moving to a real installation.",
        "parameters": [
          {
            "name": "X-Mock-Case",
            "in": "header",
            "required": true,
            "description": "Choose the matching request example; this header is only for the mock.",
            "schema": {
              "type": "string",
              "enum": [
                "10",
                "09",
                "10r",
                "10c",
                "10claimed",
                "MOCK_ONLY_INVALID_SELECTOR"
              ],
              "default": "10"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishRequest"
              },
              "examples": {
                "case_10": {
                  "summary": "Finish accepted",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                  }
                },
                "case_09": {
                  "summary": "Stale digest; ask for confirmation again",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "digest": "stale"
                  }
                },
                "case_10r": {
                  "summary": "Repeat finish",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                  }
                },
                "case_10c": {
                  "summary": "Finish after payment",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                  }
                },
                "case_10claimed": {
                  "summary": "Finish after manual retrieval",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_10": {
                    "summary": "Finish accepted",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "ACCEPTED",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": false,
                      "repeated": false,
                      "parkedBasketUid": "mock-parked-basket-001",
                      "parkedAlias": "SCO-01",
                      "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                    }
                  },
                  "case_09": {
                    "summary": "Stale digest; ask for confirmation again",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": true,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "c4f849a7d870d8beda64d5849e94abdb970cee52f239a6744fffbe99e4450a45"
                    }
                  },
                  "case_10r": {
                    "summary": "Repeat finish",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "ACCEPTED",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": false,
                      "repeated": true,
                      "parkedBasketUid": "mock-parked-basket-001",
                      "parkedAlias": "SCO-01",
                      "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "MOCK_ONLY: missing, unknown or incompatible X-Mock-Case selector",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "MOCK_ONLY: missing, unknown or incompatible X-Mock-Case selector"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Simulated operation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "case_10c": {
                    "summary": "Finish after payment",
                    "value": {
                      "error": "basket already closed"
                    }
                  },
                  "case_10claimed": {
                    "summary": "Finish after manual retrieval",
                    "value": {
                      "error": "basket already claimed by the till"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "10",
          "09",
          "10r",
          "10c",
          "10claimed"
        ]
      }
    },
    "/caso01": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_01",
        "summary": "01 — Empty basket; dedicated operator available",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 01. Previous steps: none.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_01": {
                  "summary": "Empty basket; dedicated operator available",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": []
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_01": {
                    "summary": "Empty basket; dedicated operator available",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [],
                      "rejected": [],
                      "totalItems": 0,
                      "total": 0,
                      "totalSaving": 0,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "3fe168aff74e347191cd9c464d17567bc7b336e8d9f181d917c41f7b4f1508d6"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "01"
        ]
      }
    },
    "/caso02": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_02",
        "summary": "02 — First item",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 02. Previous steps: 01.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_02": {
                  "summary": "First item",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [],
                    "add": {
                      "ref": "a1",
                      "barcode": "MOCK-ITEM-A",
                      "qty": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_02": {
                    "summary": "First item",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 1,
                      "total": 2,
                      "totalSaving": 1,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "0673ac4c766a437914848495ce9dbb1ce543f124a6cfbee43b838fe0b2f26de4"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "02"
        ]
      }
    },
    "/caso03": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_03",
        "summary": "03 — Second item, two units",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 03. Previous steps: 02.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_03": {
                  "summary": "Second item, two units",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "a2",
                      "barcode": "MOCK-ITEM-B",
                      "qty": 2
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_03": {
                    "summary": "Second item, two units",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 3,
                      "total": 6,
                      "totalSaving": 2,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "5c6234238bf5017893661f878940d39047e68bb062b7efd2157b205ab2908cfb"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "03"
        ]
      }
    },
    "/caso04": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_04",
        "summary": "04 — Third item",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 04. Previous steps: 03.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_04": {
                  "summary": "Third item",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      }
                    ],
                    "add": {
                      "ref": "a3",
                      "barcode": "MOCK-ITEM-C",
                      "qty": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_04": {
                    "summary": "Third item",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "c4f849a7d870d8beda64d5849e94abdb970cee52f239a6744fffbe99e4450a45"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "04"
        ]
      }
    },
    "/caso06": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_06",
        "summary": "06 — Remove item a2",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 06. Previous steps: 04.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_06": {
                  "summary": "Remove item a2",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_06": {
                    "summary": "Remove item a2",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 2,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 2,
                      "total": 5.5,
                      "totalSaving": 1.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "e668d99bf2fbc2c5ba39ee794e105ad3aa71cd0bbabf27087a533d96a0bc9857"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "06"
        ]
      }
    },
    "/caso07": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_07",
        "summary": "07 — Unknown item",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 07. Previous steps: 04.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_07": {
                  "summary": "Unknown item",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "x1",
                      "barcode": "MOCK-UNKNOWN",
                      "qty": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_07": {
                    "summary": "Unknown item",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [
                        {
                          "ref": "x1",
                          "barcode": "MOCK-UNKNOWN",
                          "code": "NOT_FOUND",
                          "reason": "Synthetic unknown item"
                        }
                      ],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "c4f849a7d870d8beda64d5849e94abdb970cee52f239a6744fffbe99e4450a45"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "07"
        ]
      }
    },
    "/caso08": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_08",
        "summary": "08 — Duplicate reference",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 08. Previous steps: 04.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_08": {
                  "summary": "Duplicate reference",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "a1",
                      "barcode": "MOCK-ITEM-C",
                      "qty": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_08": {
                    "summary": "Duplicate reference",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-C",
                          "code": "DUPLICATE_REF",
                          "reason": "duplicate ref"
                        }
                      ],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "c4f849a7d870d8beda64d5849e94abdb970cee52f239a6744fffbe99e4450a45"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "08"
        ]
      }
    },
    "/caso09": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_09",
        "summary": "09 — Stale digest; ask for confirmation again",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/finish, X-Mock-Case: 09. Previous steps: 04.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishRequest"
              },
              "examples": {
                "case_09": {
                  "summary": "Stale digest; ask for confirmation again",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "digest": "stale"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_09": {
                    "summary": "Stale digest; ask for confirmation again",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": true,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "c4f849a7d870d8beda64d5849e94abdb970cee52f239a6744fffbe99e4450a45"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "09"
        ]
      }
    },
    "/caso10": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_10",
        "summary": "10 — Finish accepted",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/finish, X-Mock-Case: 10. Previous steps: 14.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishRequest"
              },
              "examples": {
                "case_10": {
                  "summary": "Finish accepted",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_10": {
                    "summary": "Finish accepted",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "ACCEPTED",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": false,
                      "repeated": false,
                      "parkedBasketUid": "mock-parked-basket-001",
                      "parkedAlias": "SCO-01",
                      "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "10"
        ]
      }
    },
    "/caso10r": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_10r",
        "summary": "10r — Repeat finish",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/finish, X-Mock-Case: 10r. Previous steps: 10.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishRequest"
              },
              "examples": {
                "case_10r": {
                  "summary": "Repeat finish",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_10r": {
                    "summary": "Repeat finish",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "ACCEPTED",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": false,
                      "repeated": true,
                      "parkedBasketUid": "mock-parked-basket-001",
                      "parkedAlias": "SCO-01",
                      "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "10r"
        ]
      }
    },
    "/caso10c": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_10c",
        "summary": "10c — Finish after payment",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/finish, X-Mock-Case: 10c. Previous steps: 10.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishRequest"
              },
              "examples": {
                "case_10c": {
                  "summary": "Finish after payment",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Simulated operation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "case_10c": {
                    "summary": "Finish after payment",
                    "value": {
                      "error": "basket already closed"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "10c"
        ]
      }
    },
    "/caso10claimed": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_10claimed",
        "summary": "10claimed — Finish after manual retrieval",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/finish, X-Mock-Case: 10claimed. Previous steps: 10.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FinishRequest"
              },
              "examples": {
                "case_10claimed": {
                  "summary": "Finish after manual retrieval",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ],
                    "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Simulated operation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "case_10claimed": {
                    "summary": "Finish after manual retrieval",
                    "value": {
                      "error": "basket already claimed by the till"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "10claimed"
        ]
      }
    },
    "/caso14": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_14",
        "summary": "14 — Loyalty accepted",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 14. Previous steps: 04.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_14": {
                  "summary": "Loyalty accepted",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_14": {
                    "summary": "Loyalty accepted",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "ACCEPTED",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "1b89c43ff9b827d379aae6c44f52192d72bccad313b761871159e969861a5867"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "14"
        ]
      }
    },
    "/caso14refused": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_14refused",
        "summary": "14refused — Loyalty refused",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 14refused. Previous steps: 04.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_14refused": {
                  "summary": "Loyalty refused",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_14refused": {
                    "summary": "Loyalty refused",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "REFUSED",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "7347b68c8860e0738d45be01e9a4559f8107dcd1530ce7eeef61156b23e95de7"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "14refused"
        ]
      }
    },
    "/caso14unavailable": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_14unavailable",
        "summary": "14unavailable — Loyalty service unavailable",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 14unavailable. Previous steps: 04.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_14unavailable": {
                  "summary": "Loyalty service unavailable",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      },
                      {
                        "ref": "a2",
                        "barcode": "MOCK-ITEM-B",
                        "qty": 2
                      },
                      {
                        "ref": "a3",
                        "barcode": "MOCK-ITEM-C",
                        "qty": 1
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_14unavailable": {
                    "summary": "Loyalty service unavailable",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "UNAVAILABLE",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a2",
                          "barcode": "MOCK-ITEM-B",
                          "qty": 2,
                          "lineId": 2,
                          "itemCode": "DEMO-B",
                          "description": "Demo item B",
                          "weight": null,
                          "unitPrice": 2.5,
                          "amountWithoutDiscount": 5,
                          "amount": 4,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90002,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "a3",
                          "barcode": "MOCK-ITEM-C",
                          "qty": 1,
                          "lineId": 3,
                          "itemCode": "DEMO-C",
                          "description": "Demo item C",
                          "weight": null,
                          "unitPrice": 4,
                          "amountWithoutDiscount": 4,
                          "amount": 3.5,
                          "discount": 0.5,
                          "promotions": [
                            {
                              "promotionId": 90003,
                              "text": "Synthetic demonstration discount",
                              "saving": 0.5
                            }
                          ]
                        }
                      ],
                      "rejected": [],
                      "totalItems": 4,
                      "total": 9.5,
                      "totalSaving": 2.5,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "c2d6455fe91d0a7b5aadd7b771f6c86698662262d1922013d87b7a7e80156e1e"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "14unavailable"
        ]
      }
    },
    "/caso15": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_15",
        "summary": "15 — Card sent as an item",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 15. Previous steps: 02.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_15": {
                  "summary": "Card sent as an item",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "loyaltyCard": "MOCK-LOYALTY-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "c1",
                      "barcode": "MOCK-LOYALTY-001",
                      "qty": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_15": {
                    "summary": "Card sent as an item",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": "MOCK-LOYALTY-001",
                      "loyaltyCardStatus": "ACCEPTED",
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        }
                      ],
                      "rejected": [
                        {
                          "ref": "c1",
                          "barcode": "MOCK-LOYALTY-001",
                          "code": "NOT_SOLD_BY_TOUCHPOINT",
                          "reason": "send the loyalty card as loyaltyCard"
                        }
                      ],
                      "totalItems": 1,
                      "total": 2,
                      "totalSaving": 1,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "04da8579710416fe8b3a487d29bc5e061cdade382523dc0f159c153d4e25dafd"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "15"
        ]
      }
    },
    "/caso16": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_16",
        "summary": "16 — Price-embedded label",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 16. Previous steps: 02.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_16": {
                  "summary": "Price-embedded label",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "w1",
                      "barcode": "2000653002503",
                      "qty": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_16": {
                    "summary": "Price-embedded label",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        },
                        {
                          "ref": "w1",
                          "barcode": "2000653002503",
                          "qty": 1,
                          "lineId": 2,
                          "itemCode": "DEMO-W",
                          "description": "Demo weighed item",
                          "weight": 0.2,
                          "unitPrice": 12.5,
                          "amountWithoutDiscount": 2.5,
                          "amount": 2.5,
                          "discount": 0,
                          "promotions": []
                        }
                      ],
                      "rejected": [],
                      "totalItems": 1.2,
                      "total": 4.5,
                      "totalSaving": 1,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "523d60bd1671192b499b0ce7c9064b5a0e2f86a2880912a180daed122ebbd8b0"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "16"
        ]
      }
    },
    "/caso16b": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_16b",
        "summary": "16b — Label quantity rejected",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 16b. Previous steps: 02.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_16b": {
                  "summary": "Label quantity rejected",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "w1",
                      "barcode": "2000653002503",
                      "qty": 3
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_16b": {
                    "summary": "Label quantity rejected",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        }
                      ],
                      "rejected": [
                        {
                          "ref": "w1",
                          "barcode": "2000653002503",
                          "code": "INVALID_LINE",
                          "reason": "a label is sold once per scan: qty must be 1"
                        }
                      ],
                      "totalItems": 1,
                      "total": 2,
                      "totalSaving": 1,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "0673ac4c766a437914848495ce9dbb1ce543f124a6cfbee43b838fe0b2f26de4"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "16b"
        ]
      }
    },
    "/caso17": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_17",
        "summary": "17 — Age check enabled; item refused",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 17. Previous steps: 02.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_17": {
                  "summary": "Age check enabled; item refused",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [
                      {
                        "ref": "a1",
                        "barcode": "MOCK-ITEM-A",
                        "qty": 1
                      }
                    ],
                    "add": {
                      "ref": "v1",
                      "barcode": "MOCK-AGE-ITEM",
                      "qty": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Simulated basket result. Inspect rejected lines even on HTTP 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasketResponse"
                },
                "examples": {
                  "case_17": {
                    "summary": "Age check enabled; item refused",
                    "value": {
                      "touchpointId": "SCO-01",
                      "basketId": "mock-basket-001",
                      "engine": "MockFixture",
                      "loyaltyCard": null,
                      "loyaltyCardStatus": null,
                      "lines": [
                        {
                          "ref": "a1",
                          "barcode": "MOCK-ITEM-A",
                          "qty": 1,
                          "lineId": 1,
                          "itemCode": "DEMO-A",
                          "description": "Demo item A",
                          "weight": null,
                          "unitPrice": 3,
                          "amountWithoutDiscount": 3,
                          "amount": 2,
                          "discount": 1,
                          "promotions": [
                            {
                              "promotionId": 90001,
                              "text": "Synthetic demonstration discount",
                              "saving": 1
                            }
                          ]
                        }
                      ],
                      "rejected": [
                        {
                          "ref": "v1",
                          "barcode": "MOCK-AGE-ITEM",
                          "code": "AGE_CHECK",
                          "reason": "Synthetic age-restricted item; attendant required"
                        }
                      ],
                      "totalItems": 1,
                      "total": 2,
                      "totalSaving": 1,
                      "changed": null,
                      "repeated": null,
                      "parkedBasketUid": null,
                      "parkedAlias": null,
                      "digest": "0673ac4c766a437914848495ce9dbb1ce543f124a6cfbee43b838fe0b2f26de4"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "17"
        ]
      }
    },
    "/caso18": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_18",
        "summary": "18 — Touchpoints disabled",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 18. Previous steps: none.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_18": {
                  "summary": "Touchpoints disabled",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [],
                    "add": {
                      "ref": "a1",
                      "barcode": "MOCK-ITEM-A",
                      "qty": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  },
                  "case_18": {
                    "summary": "Touchpoints disabled",
                    "value": {
                      "error": "touchpoints are disabled on this till"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "18"
        ]
      }
    },
    "/caso19": {
      "post": {
        "tags": [
          "Scenarios"
        ],
        "operationId": "case_19",
        "summary": "19 — Dedicated operator unavailable",
        "description": "SIMULATED fixed responses, not a live POS or a stateful calculation. Use the prefilled request and click Execute. Integration alias: /comerzzia/touchpoint/basket/calculate, X-Mock-Case: 19. Previous steps: none.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalculateRequest"
              },
              "examples": {
                "case_19": {
                  "summary": "Dedicated operator unavailable",
                  "value": {
                    "touchpointId": "SCO-01",
                    "basketId": "mock-basket-001",
                    "lines": [],
                    "add": {
                      "ref": "a1",
                      "barcode": "MOCK-ITEM-A",
                      "qty": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Touchpoint authorization denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "error": {
                    "value": {
                      "error": "Touchpoint authorization denied"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Simulated operation failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "case_19": {
                    "summary": "Dedicated operator unavailable",
                    "value": {
                      "error": "touchpoint operator not configured (ALKEMY_POS.TOUCHPOINT_OPERATOR)"
                    }
                  }
                }
              }
            }
          }
        },
        "x-mock-cases": [
          "19"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "StoreKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Public mock key: MOCK_ONLY_STORE_A_KEY_NOT_A_REAL_CREDENTIAL. Enter the key without Bearer. Clear authorization to test HTTP 403. No OAuth/JWT login exists in this mock."
      }
    },
    "schemas": {
      "InputLine": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "barcode": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          }
        },
        "required": [
          "ref",
          "barcode",
          "qty"
        ],
        "additionalProperties": false
      },
      "CalculateRequest": {
        "type": "object",
        "properties": {
          "touchpointId": {
            "type": "string",
            "description": "Assigned lane. This mock accepts SCO-01."
          },
          "basketId": {
            "type": "string",
            "description": "Preserve this basket identity across the sequence."
          },
          "loyaltyCard": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InputLine"
            }
          },
          "add": {
            "$ref": "#/components/schemas/InputLine"
          },
          "digest": {
            "type": "string",
            "description": "Use the latest calculation digest for finish; retain it for a retry."
          }
        },
        "required": [
          "touchpointId",
          "basketId",
          "lines"
        ],
        "additionalProperties": false
      },
      "FinishRequest": {
        "type": "object",
        "properties": {
          "touchpointId": {
            "type": "string",
            "description": "Assigned lane. This mock accepts SCO-01."
          },
          "basketId": {
            "type": "string",
            "description": "Preserve this basket identity across the sequence."
          },
          "loyaltyCard": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InputLine"
            }
          },
          "add": {
            "$ref": "#/components/schemas/InputLine"
          },
          "digest": {
            "type": "string",
            "description": "Use the latest calculation digest for finish; retain it for a retry."
          }
        },
        "required": [
          "touchpointId",
          "basketId",
          "lines",
          "digest"
        ],
        "additionalProperties": false
      },
      "Promotion": {
        "type": "object",
        "properties": {
          "promotionId": {
            "type": "integer"
          },
          "text": {
            "type": "string"
          },
          "saving": {
            "type": "number"
          }
        },
        "required": [
          "promotionId",
          "text",
          "saving"
        ],
        "additionalProperties": false
      },
      "CalculatedLine": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "barcode": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          },
          "lineId": {
            "type": "integer"
          },
          "itemCode": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "weight": {
            "type": "number",
            "nullable": true
          },
          "unitPrice": {
            "type": "number"
          },
          "amountWithoutDiscount": {
            "type": "number"
          },
          "amount": {
            "type": "number"
          },
          "discount": {
            "type": "number"
          },
          "promotions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Promotion"
            }
          }
        },
        "required": [
          "ref",
          "barcode",
          "qty",
          "lineId",
          "itemCode",
          "description",
          "weight",
          "unitPrice",
          "amountWithoutDiscount",
          "amount",
          "discount",
          "promotions"
        ],
        "additionalProperties": false
      },
      "RejectedLine": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string"
          },
          "barcode": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "ref",
          "barcode",
          "code",
          "reason"
        ],
        "additionalProperties": false
      },
      "BasketResponse": {
        "type": "object",
        "properties": {
          "touchpointId": {
            "type": "string"
          },
          "basketId": {
            "type": "string"
          },
          "engine": {
            "type": "string"
          },
          "loyaltyCard": {
            "type": "string",
            "nullable": true
          },
          "loyaltyCardStatus": {
            "type": "string",
            "nullable": true,
            "enum": [
              "ACCEPTED",
              "REFUSED",
              "UNAVAILABLE",
              null
            ]
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalculatedLine"
            }
          },
          "rejected": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RejectedLine"
            }
          },
          "totalItems": {
            "type": "number"
          },
          "total": {
            "type": "number"
          },
          "totalSaving": {
            "type": "number"
          },
          "changed": {
            "type": "boolean",
            "nullable": true
          },
          "repeated": {
            "type": "boolean",
            "nullable": true
          },
          "parkedBasketUid": {
            "type": "string",
            "nullable": true
          },
          "parkedAlias": {
            "type": "string",
            "nullable": true
          },
          "digest": {
            "type": "string"
          }
        },
        "required": [
          "touchpointId",
          "basketId",
          "engine",
          "loyaltyCard",
          "loyaltyCardStatus",
          "lines",
          "rejected",
          "totalItems",
          "total",
          "totalSaving",
          "changed",
          "repeated",
          "parkedBasketUid",
          "parkedAlias",
          "digest"
        ],
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      }
    }
  }
}
