Logo PopinaPopina API

Handle an OrderTask

Handle an order task based on whether it is DECLINED or ACCEPTED, and subsequently upsert an OrderLive accordingly.

PATCH/v1/order-tasks/{id}
authorization<token>

To get an API key, please contact us. We'll be happy to help you.

In: header

Path Parameters

idstring

OrderTask unique identifier

Formatuuid
statusstring
Value in"DECLINED"
orderLive

The OrderLive extracted from OrderTask

reason?string

Reason of decline

Response Body

curl -X PATCH "http://localhost:4003/v1/order-tasks/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "status": "ACCEPTED",    "orderLive": {      "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",      "tillId": "d290f1ee-6c54-4b01-90e6-d701748f0851",      "revisionHash": "d290f1ee-6c54-4b01-90e6-d701748f0851",      "establishmentName": "Example Establishment",      "address1": "Example Address 1",      "address2": "Example Address 2",      "customHeader": "Example Custom Header",      "siretCode": "1234567890",      "phoneNumber": "1234567890",      "zipCode": "12345",      "city": "Example City",      "country": "Example Country",      "website": "https://example.com",      "nafCode": "1234567890",      "tvaCode": "1234567890",      "customFooter": "Example Custom Footer",      "companyName": "Example Company Name",      "data": {        "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "openedAt": "2023-08-16T09:00:00.000Z",        "modifiedAt": "2023-08-16T10:00:00.000Z",        "paidAt": "2023-08-16T09:00:00.000Z",        "canceledAt": "2023-08-16T09:00:00.000Z",        "transferredAt": "2023-08-16T09:00:00.000Z",        "tillId": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "revisionHash": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "deviceIdentifier": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "deviceName": "Ipad",        "beeperNumber": 12,        "comment": "I want some burger",        "guestsCount": 2,        "preparationActivated": true,        "isMerged": false,        "manuallyClosed": false,        "isPaid": true,        "isCanceled": false,        "canceledReason": "",        "isTransferred": false,        "transferredTo": "none",        "fiscalNumber": 1234567890,        "signature": "NF565-i\'m a signature",        "billPrintCount": 1,        "postPaymentPrintCount": 1,        "proofsOfPaymentCount": 1,        "firstBillPrintDate": "2023-08-16T09:00:00.000Z",        "postPaymentPrintDate": "2023-08-16T09:00:00.000Z",        "roomId": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "roomName": "room name",        "roomType": "room",        "roomPricing": "normal",        "tableId": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "tableName": "10-1",        "tablePosX": 5,        "tablePosY": 3,        "tableShape": "square",        "operatorId": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "operatorName": "Batman",        "firebaseCustomerName": "Joker",        "firebaseCustomerRefKey": "super long path from firebase",        "firebaseReservationRefKey": "another super long path from firebase",        "bookingId": null,        "customerId": null,        "externalServiceId": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "isPrepaid": false,        "extOctorateReservationId": 22,        "extQoodosCheckInId": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "extQoodosUserId": "d290f1ee-6c54-4b01-90e6-d701748f0851",        "extQoodosUserName": "John Doe",        "pickupHour": "today at 12:00",        "closedAt": "2023-08-16T09:00:00.000Z",        "total": 5000,        "totalTax": 1000,        "totalDiscount": 500,        "totalWithoutTax": 4000,        "leftToPay": 200,        "customerInfo": "Joe Doe\n3 rue Albert\n33300 Bordeaux",        "deliveryCustomerInfo": "Joe Doe\n0650113476",        "deliveryAddress": "8 place des Grands Hommes\n33000 Bordeaux",        "deliveryComment": "At the back of the courtyard on the right",        "channel": "UBER_EATS",        "serviceType": "delivery",        "isTraining": false,        "source": "UBER_EATS",        "externalOrderId": null,        "externalLocationId": null,        "groupedTableInfo": [          {            "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "catalogTableId": "d290f1ee-6c54-4b01-90e6-d701748f0851"          }        ],        "productRowList": [          {            "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "recordedAt": "2023-08-16T09:00:00.000Z",            "modifiedAt": "2023-08-16T10:00:00.000Z",            "transferredTo": null,            "isTransferred": false,            "deviceIdentifier": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "deviceName": "Ipad",            "isMerged": false,            "isCustomPrice": true,            "validated": true,            "weight": 500,            "isCanceled": false,            "canceledReason": "",            "taxId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "taxName": "Example Tax",            "taxRate": 10,            "priceId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "unitPriceRow": 1000,            "unitPriceRowWithModifier": 1100,            "currencyCode": "EUR",            "pricingName": "Standard Pricing",            "pricingType": "normal",            "pricingId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "name": "Example Product",            "subCategoryId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "subCategoryName": "Example Subcategory",            "categoryName": "Example Category",            "productId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "categoryId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "menuStepIndex": 2,            "menuStepName": "main course",            "parentProductRowId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "comboParentId": null,            "indexInPrepSequence": 2,            "categoryCatalogColor": "colorBrown",            "comment": "some comment",            "operatorId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "operatorName": "John Doe",            "quantity": 1,            "transmittedAt": "2023-08-16T09:00:00.000Z",            "reclaimedAt": "2023-08-16T09:00:00.000Z",            "preparationSequence": 3,            "orderedAt": "2023-08-16T09:00:00.000Z",            "taxAmount": 500,            "taxableAmount": 500,            "totalRowWithModifier": 2000,            "totalDiscount": 200,            "totalRow": 1800,            "sku": "example-product-sku",            "isLoss": false,            "lossReason": null,            "discountRowList": [              {                "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "recordedAt": "2023-08-16T09:00:00.000Z",                "modifiedAt": "2023-08-16T10:00:00.000Z",                "amount": 50,                "discountId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "discountGroupId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "name": "Example Discount",                "splitAllowed": true,                "status": "validated",                "couponCode": null,                "rewardId": null              }            ],            "modifierRowList": [              {                "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "recordedAt": "2023-08-16T09:00:00.000Z",                "modifiedAt": "2023-08-16T10:00:00.000Z",                "name": "Example Modifier",                "modifierId": "d290f1ee-6c54-4b01-90e6-d701748f0666",                "modifierGroupIndex": 1,                "modifierGroupId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "modifierIndex": 2,                "amount": 10,                "modifierGroupName": "Example Modifier Group"              }            ]          }        ],        "menuRowList": [          {            "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "recordedAt": "2023-08-16T09:00:00.000Z",            "modifiedAt": "2023-08-16T10:00:00.000Z",            "unitPriceRow": 1000,            "currencyCode": "EUR",            "amountToAdd": 10,            "amountToSubtract": 5,            "menuId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "pricingName": "Standard Pricing",            "pricingType": "normal",            "pricingId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "name": "Example Menu",            "parentMenuRowId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "productRowList": [              {                "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "recordedAt": "2023-08-16T09:00:00.000Z",                "modifiedAt": "2023-08-16T10:00:00.000Z",                "transferredTo": null,                "isTransferred": false,                "deviceIdentifier": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "deviceName": "Ipad",                "isMerged": false,                "isCustomPrice": true,                "validated": true,                "weight": 500,                "isCanceled": false,                "canceledReason": "",                "taxId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "taxName": "Example Tax",                "taxRate": 10,                "priceId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "unitPriceRow": 1000,                "unitPriceRowWithModifier": 1100,                "currencyCode": "EUR",                "pricingName": "Standard Pricing",                "pricingType": "normal",                "pricingId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "name": "Example Product",                "subCategoryId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "subCategoryName": "Example Subcategory",                "categoryName": "Example Category",                "productId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "categoryId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "menuStepIndex": 2,                "menuStepName": "main course",                "parentProductRowId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "comboParentId": null,                "indexInPrepSequence": 2,                "categoryCatalogColor": "colorBrown",                "comment": "some comment",                "operatorId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                "operatorName": "John Doe",                "quantity": 1,                "transmittedAt": "2023-08-16T09:00:00.000Z",                "reclaimedAt": "2023-08-16T09:00:00.000Z",                "preparationSequence": 3,                "orderedAt": "2023-08-16T09:00:00.000Z",                "taxAmount": 500,                "taxableAmount": 500,                "totalRowWithModifier": 2000,                "totalDiscount": 200,                "totalRow": 1800,                "sku": "example-product-sku",                "isLoss": false,                "lossReason": null,                "discountRowList": [                  {                    "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",                    "recordedAt": "2023-08-16T09:00:00.000Z",                    "modifiedAt": "2023-08-16T10:00:00.000Z",                    "amount": 50,                    "discountId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                    "discountGroupId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                    "name": "Example Discount",                    "splitAllowed": true,                    "status": "validated",                    "couponCode": null,                    "rewardId": null                  }                ],                "modifierRowList": [                  {                    "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",                    "recordedAt": "2023-08-16T09:00:00.000Z",                    "modifiedAt": "2023-08-16T10:00:00.000Z",                    "name": "Example Modifier",                    "modifierId": "d290f1ee-6c54-4b01-90e6-d701748f0666",                    "modifierGroupIndex": 1,                    "modifierGroupId": "d290f1ee-6c54-4b01-90e6-d701748f0851",                    "modifierIndex": 2,                    "amount": 10,                    "modifierGroupName": "Example Modifier Group"                  }                ]              }            ],            "totalRow": 1005          }        ],        "paymentRowList": [          {            "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "recordedAt": "2023-08-16T09:00:00.000Z",            "modifiedAt": "2023-08-16T10:00:00.000Z",            "amount": 100,            "changeAmount": 20,            "changePaymentName": "Example Payment",            "changePaymentMode": "card",            "changePaymentId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "firebaseCustomerRefKey": "some firebase path",            "currencyCode": "USD",            "externalServiceId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "name": "Example Payment",            "paymentId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "paymentMode": "card",            "paymentType": "payment",            "operatorId": "d290f1ee-6c54-4b01-90e6-d701748f0851",            "operatorName": "John Doe",            "status": "validated",            "sellerCardReceipt": "some receipt",            "buyerCardReceipt": "some receipt",            "tipAmount": 10,            "lastProofOfPaymentAmount": 90,            "totalProofOfPaymentAmount": 110,            "paymentProtocol": "payxpert"          }        ]      }    }  }'
Empty