{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "FinancialData", "description": "Breakdown of order values. Represents total values, fees, discounts, and any possible adjustments that may happen in the order value.\n\nBreakdown lists can be used to represent aggregate values (e.g. order total value) or, when available, can accurately represent the values of each item/fee/tax/charges related to the order.\n\nAll objects in breakdown lists have a required property \"subType\". Allowed values are:\n\n**VALUE**: represent the net value of the order/item/fee. Should be used in the following cases:\n - when the amount does not contain taxes or VAT\n - when tax/VAT is a known value, in that case, the list must contain an object with subtype TAX or VAT representing this value.\n\n**TAX**: represent the tax value for the order/item/fee. Should be used when tax amount is available, in that case, this information should be part of the breakdown list with the \"VALUE\" as the net amount, example below:\n\n\n ```\n \"breakdown\": [\n {\n \"name\": \"Item 1\",\n \"value\": 10,\n \"subType\": \"VALUE\"\n },\n {\n \"name\": \"Item 1 - Tax\",\n \"value\": 2,\n \"subType\": \"TAX\"\n }\n ]\n ```\n\n\n**VAT**: represents the amount for value-added tax. Should be used when the order/item/fee contains VAT. In that case, this information should be part of the breakdown list with the \"VALUE\" as net amount, example below:\n\n\n ```\n \"breakdown\": [\n {\n \"name\": \"Item 1\",\n \"value\": 12,\n \"subType\": \"VALUE\"\n },\n {\n \"name\": \"Item 1 - Tax\",\n \"value\": 2,\n \"subType\": \"VAT\"\n }\n ]\n ```\n\n\n**VALUE_WITH_TAX**: represents the gross value of the order/item/fee. Should be used when the value includes tax/VAT and values related to taxation are not available.\n\n\n ```\n \"breakdown\": [\n {\n \"name\": \"Item 1\",\n \"value\": 12,\n \"subType\": \"VALUE_WITH_TAX\"\n }\n ]\n ```", "$id": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-financial-data-schema.json", "type": "object", "properties": { "foodSales": { "nullable": false, "description": "Breakdown of the total value of items within the order.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "feeForRestaurantProvidedDelivery": { "nullable": true, "description": "Extra charge to the customer when order is delivered by the store itself.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "restaurantFundedDiscount": { "nullable": true, "description": "Discount funded by the restaurant.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "voucherDiscount": { "nullable": true, "description": "Discount provided by voucher.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "promotionDiscount": { "nullable": true, "description": "Discount provided by item promotion.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "operatorDiscount": { "nullable": true, "description": "Discount provided by operator when the order was placed.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "loyaltyDiscount": { "nullable": true, "description": "Discount provided by loyalty programs.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "tipForRestaurant": { "nullable": true, "description": "Tip for the restaurant.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "adjustments": { "nullable": true, "description": "Any adjustments that may happen to the order total value.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "packingFee": { "nullable": true, "description": "Fee charged to the customer for the process of packing and fulfilling the order.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "bagFee": { "nullable": true, "description": "Fee charged to the customer for providing bags for the order.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "serviceProviderDiscount": { "nullable": true, "description": "Discount funded by the service provider (order source).", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "tipForServiceProviderCourier": { "nullable": true, "description": "Tip for the courier from the service provider.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "feeForServiceProviderDelivery": { "nullable": true, "description": "Fee charged to the customer for a delivery provided by the service provider.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "smallOrderFee": { "nullable": true, "description": "Fee charged to the customer when the order value is less than the minimum value.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "serviceFee": { "nullable": true, "description": "Any service fees charged by the service provider to the customer.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "otherFee": { "nullable": true, "description": "All the extra costs that the customer has to pay, are different from tips, delivery fees, bag fees, packing fees, and service fees.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "netPayout": { "nullable": true, "description": "The net payout received by the store.", "allOf": [ { "$ref": "https://raw.githubusercontent.com/api-evangelist/otter/refs/heads/main/json-schema/public-api-composite-finance-line-schema.json" } ] }, "couponCodes": { "nullable": true, "type": "array", "items": { "type": "string" }, "description": "Any codes entered by the customer at order checkout.", "example": [ "TACOWED5OFF" ] } }, "required": [ "foodSales" ] }