PUT · Checkout API
PUT
PUT
/api/v1/baskets/{basketId}Evaluates the basket and potentially enriches it with the following information:
| Type | Description |
|---|---|
| Prices | Prices are calculated and added to the basket. |
| Vats | Vats are calculated and added to the basket. |
| Reusable packaging | [Coming soon] |
| Allowance | [Coming soon] |
| Rewards/Loyalty | [Coming soon] |
consumptionMode Values:
| Type | Description |
|---|---|
| OnPremise | On-Premise consumption refers to customers consuming a product or service at the business's physical location. |
| Takeaway | Takeaway (also known as takeout or to-go) refer to customers ordering food or products to consume elsewhere. |
Parameter
basketIdguidErforderlichThe unique identifier of the basket generated by the client.
c926d56f-f071-4511-a959-513099a9ff78Request-Header
Content-Typeapplication/json; charset=utf-8AuthorizationToken <accessToken>Kontext: Baskets & Orders
A basket may be submitted without a profileReference, but an order requires one.
We recommend adding a profileReference to the request body as early as possible to ensure the API can provide a personalized evaluation response.
[Coming soon] Component configuration.
Originaler Blueprint-Ausschnitt
API Blueprint
### PUT [PUT]
Evaluates the basket and potentially enriches it with the following information:
| Type | Description |
| --- | --- |
|**Prices**| Prices are calculated and added to the basket. |
|**Vats**| Vats are calculated and added to the basket. |
|**Reusable packaging**| **[Coming soon]** |
|**Allowance**| **[Coming soon]** |
|**Rewards/Loyalty**| **[Coming soon]** |
`consumptionMode` Values:
| Type | Description |
| --- | --- |
|**OnPremise**| On-Premise consumption refers to customers consuming a product or service at the business's physical location. |
|**Takeaway**| Takeaway (also known as takeout or to-go) refer to customers ordering food or products to consume elsewhere. |
+ Parameters
+ basketId: `c926d56f-f071-4511-a959-513099a9ff78` (guid, required) - The unique identifier of the basket generated by the client.
+ Request (application/json; charset=utf-8)
+ Headers
Authorization: Token <accessToken>
+ Attributes (object)
+ profileReference: `BRBZU5RRXEVXGKHLBZR6` (string) - The unique token identifier or an OTP of the profile.
+ menuId: 514717 (number, required) - The unique identifier of the menu card.
+ positions (array, required) - The items to be processed.
+ (object)
+ positionId: 0 (number, required) - A number used to reference a specific position within the basket.
+ productPlu: `QNI-1757944121588` (string, required) - The PLU of the product, which has to be unique.
+ quantity: 2 (number, required) - The quantity of the product.
+ consumptionMode: `Takeaway` (string, required) - The type of consumption.
+ balance (object) - Contains balance charge information.
+ requestCharge: true (boolean) - Signals the intention to pay the order with balance.
+ Body
{
"profileReference": "BRBZU5RRXEVXGKHLBZR6",
"menuId": 514717,
"positions": [
{
"positionId": 0,
"productPlu": "QNI-1757944121588",
"quantity": 2
}
],
"consumptionMode": "Takeaway",
"balance": {
"requestCharge": true
}
}
+ Schema
{
"type": "object",
"properties": {
"profileReference": {
"type": "string"
},
"menuId": {
"type": "number"
},
"positions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"positionId": {
"type": "number"
},
"productPlu": {
"type": "string"
},
"quantity": {
"type": "number"
}
}
}
},
"consumptionMode": {
"oneOf": [
{
"type": "string",
"enum": ["OnPremise", "Takeaway"]
},
{
"type": "integer",
"minimum": 0,
"maximum": 1
}
]
},
"balance": {
"type": "object",
"properties": {
"requestCharge": {
"type": "boolean"
}
}
}
}
}
+ Response 200 (application/json; charset=utf-8)
+ Attributes (object)
+ profileReference: `BRBZU5RRXEVXGKHLBZR6` (string) - The unique token identifier or an OTP of the profile.
+ menuId: 514717 (number, required) - The unique identifier of the menu card.
+ positions (array, required) - The items to be processed.
+ (object)
+ positionId: 0 (number, required) - A number used to reference a specific position within the basket.
+ productPlu: `QNI-1757944121588` (string, required) - The PLU of the product, which has to be unique.
+ quantity: 2 (number, required) - The quantity of the product.
+ price: 495 (number, required) - The total basket value for this position in the currency's minor unit.
+ vat (object, required) - An object containing VAT information for this position.
+ rate: 7 (number) - The VAT rate (in percent) applied to this position.
+ gross: 990 (number) - The gross amount (including VAT) for this position in the currency's minor unit.
+ net: 925 (number) - The net amount (excluding VAT) for this position in the currency's minor unit.
+ taxAmount: 65 (number) - The VAT amount calculated for this position in the currency's minor unit.
+ consumptionMode: `Takeaway` (string, required) - The type of consumption.
+ receiptUrl: `https://sandbox.cateringportal.io/.../c926d56f-f071-4511-a959-513099a9ff78` (string) - The URL for retrieving a digital receipt.
+ totalGross: 990 (number, required) - The total gross amount (including VAT) for the basket in the currency's minor unit.
+ currency: EUR (string, required) - The currency of the basket.
+ vats (array, required)
+ (object)
+ rate: 7 (number) - The VAT rate (in percent) applied to the basket.
+ gross: 990 (number) - The gross amount (including VAT) for the basket in the currency's minor unit.
+ net: 925 (number) - The net amount (excluding VAT) for the basket in the currency's minor unit.
+ taxAmount: 65 (number) - The VAT amount calculated for the basket in the currency's minor unit.
+ balance (object) - Balance information of the profile.
+ availableAmount: 1550 (number) - The available balance of the profile in the currency's minor unit. Reserved balance is not included here until the reservation expires.
+ totalAmount: 2050 (number) - The total balance of the profile in the currency's minor unit including reserved balance that is temporarily inaccessible without the reservation's reference.
+ currency: EUR (string) - The currency of the balance.
+ config (object) - The balance configuration for the profile.
+ isChargeAllowed: true (boolean) - Indicateds whether the profile is allowed to create charges.
+ Body
{
"profileReference": "BRBZU5RRXEVXGKHLBZR6",
"menuId": 514717,
"positions": [
{
"positionId": 0,
"productPlu": "QNI-1757944121588",
"quantity": 2,
"price": 495,
"vat": {
"rate": 7,
"gross": 990,
"net": 925,
"taxAmount": 65
}
}
],
"consumptionMode": "Takeaway",
"receiptUrl": "https://sandbox.cateringportal.io/.../c926d56f-f071-4511-a959-513099a9ff78",
"totalGross": 990,
"currency": "EUR",
"vats": [
{
"rate": 7,
"gross": 990,
"net": 925,
"taxAmount": 65
}
],
"balance": {
"availableAmount": 1550,
"totalAmount": 2050,
"currency": "EUR",
"config": {
"isChargeAllowed": true
}
}
}
+ Schema
{
"type": "object",
"properties": {
"profileReference": {
"type": "string"
},
"menuId": {
"type": "number"
},
"positions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"positionId": {
"type": "number"
},
"productPlu": {
"type": "string"
},
"quantity": {
"type": "number"
},
"price": {
"type": "number"
},
"vat": {
"type": "object",
"properties": {
"rate": {
"type": "number"
},
"gross": {
"type": "number"
},
"net": {
"type": "number"
},
"taxAmount": {
"type": "number"
}
}
}
}
}
},
"consumptionMode": {
"oneOf": [
{
"type": "string",
"enum": ["OnPremise", "Takeaway"]
},
{
"type": "integer",
"minimum": 0,
"maximum": 1
}
]
},
"receiptUrl": {
"type": "string",
"format": "uri"
},
"totalGross": {
"type": "number"
},
"currency": {
"type": "string"
},
"vats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rate": {
"type": "number"
},
"gross": {
"type": "number"
},
"net": {
"type": "number"
},
"taxAmount": {
"type": "number"
}
}
}
},
"balance": {
"type": "object",
"properties": {
"availableAmount": {
"type": "number"
},
"totalAmount": {
"type": "number"
},
"currency": {
"type": "string"
},
"config": {
"type": "object",
"properties": {
"isChargeAllowed": {
"type": "boolean"
}
}
}
}
}
}
}