Skip to main content
POST
/
tabs.tab.created
Creada
curl --request POST \
  --url https://api.example.com/tabs.tab.created \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "tabs.tab.created",
  "data": {
    "tab": {
      "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
      "code": "CJXEQZK",
      "description": "Justo C#16699-02",
      "comments": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
      "websiteId": "ErCkmcyCEovseJq5E",
      "storeId": "Li4eEa3W2hiuGGCFa",
      "shiftId": "tsft-b6fda21f-b638-428b-a785-849fdbe3fe0b",
      "tabCounter": 1,
      "createdById": "a3W2hiuGGLi4eECFa",
      "operatorUserId": "a3W2hiuGGLi4eECFa",
      "driverUserId": "a3W2hiuGGLi4eECFa",
      "createdAtDeviceId": "W2hiuGGLa3W2hW2hiuGGLiuGGLWW2hiuGGL2hiuGGLW2hiuGGLi4eECFa",
      "countryCode": "CL",
      "createdAt": "2020-01-01T00:00:00.000Z",
      "closedAt": "2020-01-01T00:00:00.000Z",
      "deletedAt": "2020-01-01T00:00:00.000Z",
      "cancelledAt": "2020-01-01T00:00:00.000Z",
      "cancellationPrompt": "El pedido fue cancelado por el cliente.",
      "tableIds": [
        "<string>"
      ],
      "tableNames": [
        "<string>"
      ],
      "sectorIds": [
        "<string>"
      ],
      "reservationId": "<string>",
      "statusLabel": "<string>",
      "statusLabelForClient": "<string>",
      "totalPrice": 123,
      "totalNetPrice": 123,
      "totalTaxPrice": 123,
      "totalPriceBeforeDiscounts": 123,
      "discountsAmount": 123,
      "amountPaid": 123,
      "amountDue": 123,
      "tipAmountPaid": 123,
      "netTipAmountPaid": 123,
      "taxTipAmountPaid": 123,
      "mustBeReadyAt": "2020-01-01T00:00:00.000Z",
      "mustBeDeliveredAt": "2020-01-01T00:00:00.000Z",
      "readyToPickupAt": "2020-01-01T00:00:00.000Z",
      "activatesAt": "2020-01-01T00:00:00.000Z",
      "salesChannelConfigId": "<string>",
      "channelName": "<string>",
      "clientData": {
        "name": "<string>",
        "email": "<string>",
        "phone": "<string>",
        "addressLine1": "<string>",
        "addressLine2": "<string>",
        "addressExtra": "<string>"
      },
      "integrationClientId": "<string>",
      "hasExternalDeliveryProvider": true,
      "generateInvoiceAtClose": true,
      "integrationOrderId": "<string>",
      "integrationIsPending": true,
      "integrationComments": [
        "<string>"
      ],
      "eaterLabels": [
        "<string>"
      ],
      "externalInvoiceId": "<string>",
      "payments": [
        {
          "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
          "code": "CJXEQZK",
          "shiftId": "Li4eEa3W2hiuGGCFa",
          "paymentMethodId": "a3W2hiuGGLi4eECFa",
          "paymentMethodName": "Efectivo",
          "amount": 100,
          "tipAmount": 10,
          "createdAt": "2020-01-01T00:00:00.000Z",
          "voidedAt": "2020-01-01T00:00:00.000Z",
          "shiftEndedAt": "2020-01-01T00:00:00.000Z",
          "createdById": "a3W2hiuGGLi4eECFa",
          "shouldMakeInvoice": true,
          "payerName": "John Doe",
          "payerUserId": "a3W2hiuGGLi4eECFa"
        }
      ],
      "invoices": [
        {
          "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
          "providerId": "openFactura",
          "storeId": "sto-4c48bf33-1411-4c3f-adac-db39b4631cb8",
          "tabId": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
          "inventorySaleId": "isale-4c48bf33-1411-4c3f-adac-db39b4631cb8",
          "createdAt": "2020-01-01T00:00:00.000Z",
          "generatedAt": "2020-01-01T00:00:00.000Z",
          "externalInvoiceId": "123456",
          "externalVoidInvoiceId": "654321",
          "errorMessage": "Error al generar la factura.",
          "voidedAt": "2020-01-01T00:00:00.000Z",
          "statusLabel": "Pendiente",
          "invoiceURL": "https://getjusto.com/invoice/123456",
          "totalAmount": 100,
          "taxAmount": 10,
          "netAmount": 90
        }
      ],
      "discounts": [
        {
          "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
          "shiftId": "Li4eEa3W2hiuGGCFa",
          "createdAt": "2020-01-01T00:00:00.000Z",
          "voidedAt": "2020-01-01T00:00:00.000Z",
          "discountedAmount": 100,
          "discountMethodId": "a3W2hiuGGLi4eECFa",
          "discountMethodName": "Cupón",
          "fixedAmount": 100,
          "percentage": 10
        }
      ],
      "items": [
        {
          "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
          "createdAt": "2020-01-01T00:00:00.000Z",
          "amount": 2,
          "price": 100,
          "priceWithModifiers": 120,
          "unitPrice": 50,
          "productId": "a3W2hiuGGLi4eECFa",
          "productName": "Café",
          "productInternalName": "Café",
          "productUnitItemsCount": 1,
          "comment": "Sin azúcar",
          "sentToKDSAt": "2020-01-01T00:00:00.000Z",
          "addedByClientUserId": "a3W2hiuGGLi4eECFa",
          "addedByClientName": "Juan",
          "addedByUserId": "a3W2hiuGGLi4eECFa",
          "addedByUserName": "Juan",
          "eaterLabels": [
            "<string>"
          ],
          "modifiers": [
            {
              "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
              "modifierGroupId": "Li4eEa3W2hiuGGCFa",
              "modifierId": "a3W2hiuGGLi4eECFa",
              "amount": 2,
              "modifierQuantity": 1,
              "price": 100,
              "unitPrice": 50,
              "modifierName": "Azúcar",
              "modifierInternalName": "Azúcar",
              "modifierGroupName": "Azúcar",
              "modifierUnitItemsCount": 1,
              "modifierUnitWeight": 100
            }
          ],
          "unitProductWeight": 100,
          "totalWeight": 100
        }
      ]
    }
  },
  "websiteId": "<string>",
  "storeId": "<string>",
  "date": "2020-01-01T00:00:00.000Z",
  "eventId": "<string>"
}
'
import requests

url = "https://api.example.com/tabs.tab.created"

payload = {
    "type": "tabs.tab.created",
    "data": { "tab": {
            "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
            "code": "CJXEQZK",
            "description": "Justo C#16699-02",
            "comments": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
            "websiteId": "ErCkmcyCEovseJq5E",
            "storeId": "Li4eEa3W2hiuGGCFa",
            "shiftId": "tsft-b6fda21f-b638-428b-a785-849fdbe3fe0b",
            "tabCounter": 1,
            "createdById": "a3W2hiuGGLi4eECFa",
            "operatorUserId": "a3W2hiuGGLi4eECFa",
            "driverUserId": "a3W2hiuGGLi4eECFa",
            "createdAtDeviceId": "W2hiuGGLa3W2hW2hiuGGLiuGGLWW2hiuGGL2hiuGGLW2hiuGGLi4eECFa",
            "countryCode": "CL",
            "createdAt": "2020-01-01T00:00:00.000Z",
            "closedAt": "2020-01-01T00:00:00.000Z",
            "deletedAt": "2020-01-01T00:00:00.000Z",
            "cancelledAt": "2020-01-01T00:00:00.000Z",
            "cancellationPrompt": "El pedido fue cancelado por el cliente.",
            "tableIds": ["<string>"],
            "tableNames": ["<string>"],
            "sectorIds": ["<string>"],
            "reservationId": "<string>",
            "statusLabel": "<string>",
            "statusLabelForClient": "<string>",
            "totalPrice": 123,
            "totalNetPrice": 123,
            "totalTaxPrice": 123,
            "totalPriceBeforeDiscounts": 123,
            "discountsAmount": 123,
            "amountPaid": 123,
            "amountDue": 123,
            "tipAmountPaid": 123,
            "netTipAmountPaid": 123,
            "taxTipAmountPaid": 123,
            "mustBeReadyAt": "2020-01-01T00:00:00.000Z",
            "mustBeDeliveredAt": "2020-01-01T00:00:00.000Z",
            "readyToPickupAt": "2020-01-01T00:00:00.000Z",
            "activatesAt": "2020-01-01T00:00:00.000Z",
            "salesChannelConfigId": "<string>",
            "channelName": "<string>",
            "clientData": {
                "name": "<string>",
                "email": "<string>",
                "phone": "<string>",
                "addressLine1": "<string>",
                "addressLine2": "<string>",
                "addressExtra": "<string>"
            },
            "integrationClientId": "<string>",
            "hasExternalDeliveryProvider": True,
            "generateInvoiceAtClose": True,
            "integrationOrderId": "<string>",
            "integrationIsPending": True,
            "integrationComments": ["<string>"],
            "eaterLabels": ["<string>"],
            "externalInvoiceId": "<string>",
            "payments": [
                {
                    "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
                    "code": "CJXEQZK",
                    "shiftId": "Li4eEa3W2hiuGGCFa",
                    "paymentMethodId": "a3W2hiuGGLi4eECFa",
                    "paymentMethodName": "Efectivo",
                    "amount": 100,
                    "tipAmount": 10,
                    "createdAt": "2020-01-01T00:00:00.000Z",
                    "voidedAt": "2020-01-01T00:00:00.000Z",
                    "shiftEndedAt": "2020-01-01T00:00:00.000Z",
                    "createdById": "a3W2hiuGGLi4eECFa",
                    "shouldMakeInvoice": True,
                    "payerName": "John Doe",
                    "payerUserId": "a3W2hiuGGLi4eECFa"
                }
            ],
            "invoices": [
                {
                    "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
                    "providerId": "openFactura",
                    "storeId": "sto-4c48bf33-1411-4c3f-adac-db39b4631cb8",
                    "tabId": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
                    "inventorySaleId": "isale-4c48bf33-1411-4c3f-adac-db39b4631cb8",
                    "createdAt": "2020-01-01T00:00:00.000Z",
                    "generatedAt": "2020-01-01T00:00:00.000Z",
                    "externalInvoiceId": "123456",
                    "externalVoidInvoiceId": "654321",
                    "errorMessage": "Error al generar la factura.",
                    "voidedAt": "2020-01-01T00:00:00.000Z",
                    "statusLabel": "Pendiente",
                    "invoiceURL": "https://getjusto.com/invoice/123456",
                    "totalAmount": 100,
                    "taxAmount": 10,
                    "netAmount": 90
                }
            ],
            "discounts": [
                {
                    "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
                    "shiftId": "Li4eEa3W2hiuGGCFa",
                    "createdAt": "2020-01-01T00:00:00.000Z",
                    "voidedAt": "2020-01-01T00:00:00.000Z",
                    "discountedAmount": 100,
                    "discountMethodId": "a3W2hiuGGLi4eECFa",
                    "discountMethodName": "Cupón",
                    "fixedAmount": 100,
                    "percentage": 10
                }
            ],
            "items": [
                {
                    "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
                    "createdAt": "2020-01-01T00:00:00.000Z",
                    "amount": 2,
                    "price": 100,
                    "priceWithModifiers": 120,
                    "unitPrice": 50,
                    "productId": "a3W2hiuGGLi4eECFa",
                    "productName": "Café",
                    "productInternalName": "Café",
                    "productUnitItemsCount": 1,
                    "comment": "Sin azúcar",
                    "sentToKDSAt": "2020-01-01T00:00:00.000Z",
                    "addedByClientUserId": "a3W2hiuGGLi4eECFa",
                    "addedByClientName": "Juan",
                    "addedByUserId": "a3W2hiuGGLi4eECFa",
                    "addedByUserName": "Juan",
                    "eaterLabels": ["<string>"],
                    "modifiers": [
                        {
                            "_id": "tab-4c48bf33-1411-4c3f-adac-db39b4631cb8",
                            "modifierGroupId": "Li4eEa3W2hiuGGCFa",
                            "modifierId": "a3W2hiuGGLi4eECFa",
                            "amount": 2,
                            "modifierQuantity": 1,
                            "price": 100,
                            "unitPrice": 50,
                            "modifierName": "Azúcar",
                            "modifierInternalName": "Azúcar",
                            "modifierGroupName": "Azúcar",
                            "modifierUnitItemsCount": 1,
                            "modifierUnitWeight": 100
                        }
                    ],
                    "unitProductWeight": 100,
                    "totalWeight": 100
                }
            ]
        } },
    "websiteId": "<string>",
    "storeId": "<string>",
    "date": "2020-01-01T00:00:00.000Z",
    "eventId": "<string>"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    type: 'tabs.tab.created',
    data: {
      tab: {
        _id: 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
        code: 'CJXEQZK',
        description: 'Justo C#16699-02',
        comments: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
        websiteId: 'ErCkmcyCEovseJq5E',
        storeId: 'Li4eEa3W2hiuGGCFa',
        shiftId: 'tsft-b6fda21f-b638-428b-a785-849fdbe3fe0b',
        tabCounter: 1,
        createdById: 'a3W2hiuGGLi4eECFa',
        operatorUserId: 'a3W2hiuGGLi4eECFa',
        driverUserId: 'a3W2hiuGGLi4eECFa',
        createdAtDeviceId: 'W2hiuGGLa3W2hW2hiuGGLiuGGLWW2hiuGGL2hiuGGLW2hiuGGLi4eECFa',
        countryCode: 'CL',
        createdAt: '2020-01-01T00:00:00.000Z',
        closedAt: '2020-01-01T00:00:00.000Z',
        deletedAt: '2020-01-01T00:00:00.000Z',
        cancelledAt: '2020-01-01T00:00:00.000Z',
        cancellationPrompt: 'El pedido fue cancelado por el cliente.',
        tableIds: ['<string>'],
        tableNames: ['<string>'],
        sectorIds: ['<string>'],
        reservationId: '<string>',
        statusLabel: '<string>',
        statusLabelForClient: '<string>',
        totalPrice: 123,
        totalNetPrice: 123,
        totalTaxPrice: 123,
        totalPriceBeforeDiscounts: 123,
        discountsAmount: 123,
        amountPaid: 123,
        amountDue: 123,
        tipAmountPaid: 123,
        netTipAmountPaid: 123,
        taxTipAmountPaid: 123,
        mustBeReadyAt: '2020-01-01T00:00:00.000Z',
        mustBeDeliveredAt: '2020-01-01T00:00:00.000Z',
        readyToPickupAt: '2020-01-01T00:00:00.000Z',
        activatesAt: '2020-01-01T00:00:00.000Z',
        salesChannelConfigId: '<string>',
        channelName: '<string>',
        clientData: {
          name: '<string>',
          email: '<string>',
          phone: '<string>',
          addressLine1: '<string>',
          addressLine2: '<string>',
          addressExtra: '<string>'
        },
        integrationClientId: '<string>',
        hasExternalDeliveryProvider: true,
        generateInvoiceAtClose: true,
        integrationOrderId: '<string>',
        integrationIsPending: true,
        integrationComments: ['<string>'],
        eaterLabels: ['<string>'],
        externalInvoiceId: '<string>',
        payments: [
          {
            _id: 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
            code: 'CJXEQZK',
            shiftId: 'Li4eEa3W2hiuGGCFa',
            paymentMethodId: 'a3W2hiuGGLi4eECFa',
            paymentMethodName: 'Efectivo',
            amount: 100,
            tipAmount: 10,
            createdAt: '2020-01-01T00:00:00.000Z',
            voidedAt: '2020-01-01T00:00:00.000Z',
            shiftEndedAt: '2020-01-01T00:00:00.000Z',
            createdById: 'a3W2hiuGGLi4eECFa',
            shouldMakeInvoice: true,
            payerName: 'John Doe',
            payerUserId: 'a3W2hiuGGLi4eECFa'
          }
        ],
        invoices: [
          {
            _id: 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
            providerId: 'openFactura',
            storeId: 'sto-4c48bf33-1411-4c3f-adac-db39b4631cb8',
            tabId: 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
            inventorySaleId: 'isale-4c48bf33-1411-4c3f-adac-db39b4631cb8',
            createdAt: '2020-01-01T00:00:00.000Z',
            generatedAt: '2020-01-01T00:00:00.000Z',
            externalInvoiceId: '123456',
            externalVoidInvoiceId: '654321',
            errorMessage: 'Error al generar la factura.',
            voidedAt: '2020-01-01T00:00:00.000Z',
            statusLabel: 'Pendiente',
            invoiceURL: 'https://getjusto.com/invoice/123456',
            totalAmount: 100,
            taxAmount: 10,
            netAmount: 90
          }
        ],
        discounts: [
          {
            _id: 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
            shiftId: 'Li4eEa3W2hiuGGCFa',
            createdAt: '2020-01-01T00:00:00.000Z',
            voidedAt: '2020-01-01T00:00:00.000Z',
            discountedAmount: 100,
            discountMethodId: 'a3W2hiuGGLi4eECFa',
            discountMethodName: 'Cupón',
            fixedAmount: 100,
            percentage: 10
          }
        ],
        items: [
          {
            _id: 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
            createdAt: '2020-01-01T00:00:00.000Z',
            amount: 2,
            price: 100,
            priceWithModifiers: 120,
            unitPrice: 50,
            productId: 'a3W2hiuGGLi4eECFa',
            productName: 'Café',
            productInternalName: 'Café',
            productUnitItemsCount: 1,
            comment: 'Sin azúcar',
            sentToKDSAt: '2020-01-01T00:00:00.000Z',
            addedByClientUserId: 'a3W2hiuGGLi4eECFa',
            addedByClientName: 'Juan',
            addedByUserId: 'a3W2hiuGGLi4eECFa',
            addedByUserName: 'Juan',
            eaterLabels: ['<string>'],
            modifiers: [
              {
                _id: 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
                modifierGroupId: 'Li4eEa3W2hiuGGCFa',
                modifierId: 'a3W2hiuGGLi4eECFa',
                amount: 2,
                modifierQuantity: 1,
                price: 100,
                unitPrice: 50,
                modifierName: 'Azúcar',
                modifierInternalName: 'Azúcar',
                modifierGroupName: 'Azúcar',
                modifierUnitItemsCount: 1,
                modifierUnitWeight: 100
              }
            ],
            unitProductWeight: 100,
            totalWeight: 100
          }
        ]
      }
    },
    websiteId: '<string>',
    storeId: '<string>',
    date: '2020-01-01T00:00:00.000Z',
    eventId: '<string>'
  })
};

fetch('https://api.example.com/tabs.tab.created', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.example.com/tabs.tab.created",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'type' => 'tabs.tab.created',
    'data' => [
        'tab' => [
                '_id' => 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
                'code' => 'CJXEQZK',
                'description' => 'Justo C#16699-02',
                'comments' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
                'websiteId' => 'ErCkmcyCEovseJq5E',
                'storeId' => 'Li4eEa3W2hiuGGCFa',
                'shiftId' => 'tsft-b6fda21f-b638-428b-a785-849fdbe3fe0b',
                'tabCounter' => 1,
                'createdById' => 'a3W2hiuGGLi4eECFa',
                'operatorUserId' => 'a3W2hiuGGLi4eECFa',
                'driverUserId' => 'a3W2hiuGGLi4eECFa',
                'createdAtDeviceId' => 'W2hiuGGLa3W2hW2hiuGGLiuGGLWW2hiuGGL2hiuGGLW2hiuGGLi4eECFa',
                'countryCode' => 'CL',
                'createdAt' => '2020-01-01T00:00:00.000Z',
                'closedAt' => '2020-01-01T00:00:00.000Z',
                'deletedAt' => '2020-01-01T00:00:00.000Z',
                'cancelledAt' => '2020-01-01T00:00:00.000Z',
                'cancellationPrompt' => 'El pedido fue cancelado por el cliente.',
                'tableIds' => [
                                '<string>'
                ],
                'tableNames' => [
                                '<string>'
                ],
                'sectorIds' => [
                                '<string>'
                ],
                'reservationId' => '<string>',
                'statusLabel' => '<string>',
                'statusLabelForClient' => '<string>',
                'totalPrice' => 123,
                'totalNetPrice' => 123,
                'totalTaxPrice' => 123,
                'totalPriceBeforeDiscounts' => 123,
                'discountsAmount' => 123,
                'amountPaid' => 123,
                'amountDue' => 123,
                'tipAmountPaid' => 123,
                'netTipAmountPaid' => 123,
                'taxTipAmountPaid' => 123,
                'mustBeReadyAt' => '2020-01-01T00:00:00.000Z',
                'mustBeDeliveredAt' => '2020-01-01T00:00:00.000Z',
                'readyToPickupAt' => '2020-01-01T00:00:00.000Z',
                'activatesAt' => '2020-01-01T00:00:00.000Z',
                'salesChannelConfigId' => '<string>',
                'channelName' => '<string>',
                'clientData' => [
                                'name' => '<string>',
                                'email' => '<string>',
                                'phone' => '<string>',
                                'addressLine1' => '<string>',
                                'addressLine2' => '<string>',
                                'addressExtra' => '<string>'
                ],
                'integrationClientId' => '<string>',
                'hasExternalDeliveryProvider' => true,
                'generateInvoiceAtClose' => true,
                'integrationOrderId' => '<string>',
                'integrationIsPending' => true,
                'integrationComments' => [
                                '<string>'
                ],
                'eaterLabels' => [
                                '<string>'
                ],
                'externalInvoiceId' => '<string>',
                'payments' => [
                                [
                                                                '_id' => 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
                                                                'code' => 'CJXEQZK',
                                                                'shiftId' => 'Li4eEa3W2hiuGGCFa',
                                                                'paymentMethodId' => 'a3W2hiuGGLi4eECFa',
                                                                'paymentMethodName' => 'Efectivo',
                                                                'amount' => 100,
                                                                'tipAmount' => 10,
                                                                'createdAt' => '2020-01-01T00:00:00.000Z',
                                                                'voidedAt' => '2020-01-01T00:00:00.000Z',
                                                                'shiftEndedAt' => '2020-01-01T00:00:00.000Z',
                                                                'createdById' => 'a3W2hiuGGLi4eECFa',
                                                                'shouldMakeInvoice' => true,
                                                                'payerName' => 'John Doe',
                                                                'payerUserId' => 'a3W2hiuGGLi4eECFa'
                                ]
                ],
                'invoices' => [
                                [
                                                                '_id' => 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
                                                                'providerId' => 'openFactura',
                                                                'storeId' => 'sto-4c48bf33-1411-4c3f-adac-db39b4631cb8',
                                                                'tabId' => 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
                                                                'inventorySaleId' => 'isale-4c48bf33-1411-4c3f-adac-db39b4631cb8',
                                                                'createdAt' => '2020-01-01T00:00:00.000Z',
                                                                'generatedAt' => '2020-01-01T00:00:00.000Z',
                                                                'externalInvoiceId' => '123456',
                                                                'externalVoidInvoiceId' => '654321',
                                                                'errorMessage' => 'Error al generar la factura.',
                                                                'voidedAt' => '2020-01-01T00:00:00.000Z',
                                                                'statusLabel' => 'Pendiente',
                                                                'invoiceURL' => 'https://getjusto.com/invoice/123456',
                                                                'totalAmount' => 100,
                                                                'taxAmount' => 10,
                                                                'netAmount' => 90
                                ]
                ],
                'discounts' => [
                                [
                                                                '_id' => 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
                                                                'shiftId' => 'Li4eEa3W2hiuGGCFa',
                                                                'createdAt' => '2020-01-01T00:00:00.000Z',
                                                                'voidedAt' => '2020-01-01T00:00:00.000Z',
                                                                'discountedAmount' => 100,
                                                                'discountMethodId' => 'a3W2hiuGGLi4eECFa',
                                                                'discountMethodName' => 'Cupón',
                                                                'fixedAmount' => 100,
                                                                'percentage' => 10
                                ]
                ],
                'items' => [
                                [
                                                                '_id' => 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
                                                                'createdAt' => '2020-01-01T00:00:00.000Z',
                                                                'amount' => 2,
                                                                'price' => 100,
                                                                'priceWithModifiers' => 120,
                                                                'unitPrice' => 50,
                                                                'productId' => 'a3W2hiuGGLi4eECFa',
                                                                'productName' => 'Café',
                                                                'productInternalName' => 'Café',
                                                                'productUnitItemsCount' => 1,
                                                                'comment' => 'Sin azúcar',
                                                                'sentToKDSAt' => '2020-01-01T00:00:00.000Z',
                                                                'addedByClientUserId' => 'a3W2hiuGGLi4eECFa',
                                                                'addedByClientName' => 'Juan',
                                                                'addedByUserId' => 'a3W2hiuGGLi4eECFa',
                                                                'addedByUserName' => 'Juan',
                                                                'eaterLabels' => [
                                                                                                                                '<string>'
                                                                ],
                                                                'modifiers' => [
                                                                                                                                [
                                                                                                                                                                                                                                                                '_id' => 'tab-4c48bf33-1411-4c3f-adac-db39b4631cb8',
                                                                                                                                                                                                                                                                'modifierGroupId' => 'Li4eEa3W2hiuGGCFa',
                                                                                                                                                                                                                                                                'modifierId' => 'a3W2hiuGGLi4eECFa',
                                                                                                                                                                                                                                                                'amount' => 2,
                                                                                                                                                                                                                                                                'modifierQuantity' => 1,
                                                                                                                                                                                                                                                                'price' => 100,
                                                                                                                                                                                                                                                                'unitPrice' => 50,
                                                                                                                                                                                                                                                                'modifierName' => 'Azúcar',
                                                                                                                                                                                                                                                                'modifierInternalName' => 'Azúcar',
                                                                                                                                                                                                                                                                'modifierGroupName' => 'Azúcar',
                                                                                                                                                                                                                                                                'modifierUnitItemsCount' => 1,
                                                                                                                                                                                                                                                                'modifierUnitWeight' => 100
                                                                                                                                ]
                                                                ],
                                                                'unitProductWeight' => 100,
                                                                'totalWeight' => 100
                                ]
                ]
        ]
    ],
    'websiteId' => '<string>',
    'storeId' => '<string>',
    'date' => '2020-01-01T00:00:00.000Z',
    'eventId' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/tabs.tab.created"

	payload := strings.NewReader("{\n  \"type\": \"tabs.tab.created\",\n  \"data\": {\n    \"tab\": {\n      \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n      \"code\": \"CJXEQZK\",\n      \"description\": \"Justo C#16699-02\",\n      \"comments\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\",\n      \"websiteId\": \"ErCkmcyCEovseJq5E\",\n      \"storeId\": \"Li4eEa3W2hiuGGCFa\",\n      \"shiftId\": \"tsft-b6fda21f-b638-428b-a785-849fdbe3fe0b\",\n      \"tabCounter\": 1,\n      \"createdById\": \"a3W2hiuGGLi4eECFa\",\n      \"operatorUserId\": \"a3W2hiuGGLi4eECFa\",\n      \"driverUserId\": \"a3W2hiuGGLi4eECFa\",\n      \"createdAtDeviceId\": \"W2hiuGGLa3W2hW2hiuGGLiuGGLWW2hiuGGL2hiuGGLW2hiuGGLi4eECFa\",\n      \"countryCode\": \"CL\",\n      \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n      \"closedAt\": \"2020-01-01T00:00:00.000Z\",\n      \"deletedAt\": \"2020-01-01T00:00:00.000Z\",\n      \"cancelledAt\": \"2020-01-01T00:00:00.000Z\",\n      \"cancellationPrompt\": \"El pedido fue cancelado por el cliente.\",\n      \"tableIds\": [\n        \"<string>\"\n      ],\n      \"tableNames\": [\n        \"<string>\"\n      ],\n      \"sectorIds\": [\n        \"<string>\"\n      ],\n      \"reservationId\": \"<string>\",\n      \"statusLabel\": \"<string>\",\n      \"statusLabelForClient\": \"<string>\",\n      \"totalPrice\": 123,\n      \"totalNetPrice\": 123,\n      \"totalTaxPrice\": 123,\n      \"totalPriceBeforeDiscounts\": 123,\n      \"discountsAmount\": 123,\n      \"amountPaid\": 123,\n      \"amountDue\": 123,\n      \"tipAmountPaid\": 123,\n      \"netTipAmountPaid\": 123,\n      \"taxTipAmountPaid\": 123,\n      \"mustBeReadyAt\": \"2020-01-01T00:00:00.000Z\",\n      \"mustBeDeliveredAt\": \"2020-01-01T00:00:00.000Z\",\n      \"readyToPickupAt\": \"2020-01-01T00:00:00.000Z\",\n      \"activatesAt\": \"2020-01-01T00:00:00.000Z\",\n      \"salesChannelConfigId\": \"<string>\",\n      \"channelName\": \"<string>\",\n      \"clientData\": {\n        \"name\": \"<string>\",\n        \"email\": \"<string>\",\n        \"phone\": \"<string>\",\n        \"addressLine1\": \"<string>\",\n        \"addressLine2\": \"<string>\",\n        \"addressExtra\": \"<string>\"\n      },\n      \"integrationClientId\": \"<string>\",\n      \"hasExternalDeliveryProvider\": true,\n      \"generateInvoiceAtClose\": true,\n      \"integrationOrderId\": \"<string>\",\n      \"integrationIsPending\": true,\n      \"integrationComments\": [\n        \"<string>\"\n      ],\n      \"eaterLabels\": [\n        \"<string>\"\n      ],\n      \"externalInvoiceId\": \"<string>\",\n      \"payments\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"code\": \"CJXEQZK\",\n          \"shiftId\": \"Li4eEa3W2hiuGGCFa\",\n          \"paymentMethodId\": \"a3W2hiuGGLi4eECFa\",\n          \"paymentMethodName\": \"Efectivo\",\n          \"amount\": 100,\n          \"tipAmount\": 10,\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"voidedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"shiftEndedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"createdById\": \"a3W2hiuGGLi4eECFa\",\n          \"shouldMakeInvoice\": true,\n          \"payerName\": \"John Doe\",\n          \"payerUserId\": \"a3W2hiuGGLi4eECFa\"\n        }\n      ],\n      \"invoices\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"providerId\": \"openFactura\",\n          \"storeId\": \"sto-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"tabId\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"inventorySaleId\": \"isale-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"generatedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"externalInvoiceId\": \"123456\",\n          \"externalVoidInvoiceId\": \"654321\",\n          \"errorMessage\": \"Error al generar la factura.\",\n          \"voidedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"statusLabel\": \"Pendiente\",\n          \"invoiceURL\": \"https://getjusto.com/invoice/123456\",\n          \"totalAmount\": 100,\n          \"taxAmount\": 10,\n          \"netAmount\": 90\n        }\n      ],\n      \"discounts\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"shiftId\": \"Li4eEa3W2hiuGGCFa\",\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"voidedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"discountedAmount\": 100,\n          \"discountMethodId\": \"a3W2hiuGGLi4eECFa\",\n          \"discountMethodName\": \"Cupón\",\n          \"fixedAmount\": 100,\n          \"percentage\": 10\n        }\n      ],\n      \"items\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"amount\": 2,\n          \"price\": 100,\n          \"priceWithModifiers\": 120,\n          \"unitPrice\": 50,\n          \"productId\": \"a3W2hiuGGLi4eECFa\",\n          \"productName\": \"Café\",\n          \"productInternalName\": \"Café\",\n          \"productUnitItemsCount\": 1,\n          \"comment\": \"Sin azúcar\",\n          \"sentToKDSAt\": \"2020-01-01T00:00:00.000Z\",\n          \"addedByClientUserId\": \"a3W2hiuGGLi4eECFa\",\n          \"addedByClientName\": \"Juan\",\n          \"addedByUserId\": \"a3W2hiuGGLi4eECFa\",\n          \"addedByUserName\": \"Juan\",\n          \"eaterLabels\": [\n            \"<string>\"\n          ],\n          \"modifiers\": [\n            {\n              \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n              \"modifierGroupId\": \"Li4eEa3W2hiuGGCFa\",\n              \"modifierId\": \"a3W2hiuGGLi4eECFa\",\n              \"amount\": 2,\n              \"modifierQuantity\": 1,\n              \"price\": 100,\n              \"unitPrice\": 50,\n              \"modifierName\": \"Azúcar\",\n              \"modifierInternalName\": \"Azúcar\",\n              \"modifierGroupName\": \"Azúcar\",\n              \"modifierUnitItemsCount\": 1,\n              \"modifierUnitWeight\": 100\n            }\n          ],\n          \"unitProductWeight\": 100,\n          \"totalWeight\": 100\n        }\n      ]\n    }\n  },\n  \"websiteId\": \"<string>\",\n  \"storeId\": \"<string>\",\n  \"date\": \"2020-01-01T00:00:00.000Z\",\n  \"eventId\": \"<string>\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/tabs.tab.created")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"type\": \"tabs.tab.created\",\n  \"data\": {\n    \"tab\": {\n      \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n      \"code\": \"CJXEQZK\",\n      \"description\": \"Justo C#16699-02\",\n      \"comments\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\",\n      \"websiteId\": \"ErCkmcyCEovseJq5E\",\n      \"storeId\": \"Li4eEa3W2hiuGGCFa\",\n      \"shiftId\": \"tsft-b6fda21f-b638-428b-a785-849fdbe3fe0b\",\n      \"tabCounter\": 1,\n      \"createdById\": \"a3W2hiuGGLi4eECFa\",\n      \"operatorUserId\": \"a3W2hiuGGLi4eECFa\",\n      \"driverUserId\": \"a3W2hiuGGLi4eECFa\",\n      \"createdAtDeviceId\": \"W2hiuGGLa3W2hW2hiuGGLiuGGLWW2hiuGGL2hiuGGLW2hiuGGLi4eECFa\",\n      \"countryCode\": \"CL\",\n      \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n      \"closedAt\": \"2020-01-01T00:00:00.000Z\",\n      \"deletedAt\": \"2020-01-01T00:00:00.000Z\",\n      \"cancelledAt\": \"2020-01-01T00:00:00.000Z\",\n      \"cancellationPrompt\": \"El pedido fue cancelado por el cliente.\",\n      \"tableIds\": [\n        \"<string>\"\n      ],\n      \"tableNames\": [\n        \"<string>\"\n      ],\n      \"sectorIds\": [\n        \"<string>\"\n      ],\n      \"reservationId\": \"<string>\",\n      \"statusLabel\": \"<string>\",\n      \"statusLabelForClient\": \"<string>\",\n      \"totalPrice\": 123,\n      \"totalNetPrice\": 123,\n      \"totalTaxPrice\": 123,\n      \"totalPriceBeforeDiscounts\": 123,\n      \"discountsAmount\": 123,\n      \"amountPaid\": 123,\n      \"amountDue\": 123,\n      \"tipAmountPaid\": 123,\n      \"netTipAmountPaid\": 123,\n      \"taxTipAmountPaid\": 123,\n      \"mustBeReadyAt\": \"2020-01-01T00:00:00.000Z\",\n      \"mustBeDeliveredAt\": \"2020-01-01T00:00:00.000Z\",\n      \"readyToPickupAt\": \"2020-01-01T00:00:00.000Z\",\n      \"activatesAt\": \"2020-01-01T00:00:00.000Z\",\n      \"salesChannelConfigId\": \"<string>\",\n      \"channelName\": \"<string>\",\n      \"clientData\": {\n        \"name\": \"<string>\",\n        \"email\": \"<string>\",\n        \"phone\": \"<string>\",\n        \"addressLine1\": \"<string>\",\n        \"addressLine2\": \"<string>\",\n        \"addressExtra\": \"<string>\"\n      },\n      \"integrationClientId\": \"<string>\",\n      \"hasExternalDeliveryProvider\": true,\n      \"generateInvoiceAtClose\": true,\n      \"integrationOrderId\": \"<string>\",\n      \"integrationIsPending\": true,\n      \"integrationComments\": [\n        \"<string>\"\n      ],\n      \"eaterLabels\": [\n        \"<string>\"\n      ],\n      \"externalInvoiceId\": \"<string>\",\n      \"payments\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"code\": \"CJXEQZK\",\n          \"shiftId\": \"Li4eEa3W2hiuGGCFa\",\n          \"paymentMethodId\": \"a3W2hiuGGLi4eECFa\",\n          \"paymentMethodName\": \"Efectivo\",\n          \"amount\": 100,\n          \"tipAmount\": 10,\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"voidedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"shiftEndedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"createdById\": \"a3W2hiuGGLi4eECFa\",\n          \"shouldMakeInvoice\": true,\n          \"payerName\": \"John Doe\",\n          \"payerUserId\": \"a3W2hiuGGLi4eECFa\"\n        }\n      ],\n      \"invoices\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"providerId\": \"openFactura\",\n          \"storeId\": \"sto-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"tabId\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"inventorySaleId\": \"isale-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"generatedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"externalInvoiceId\": \"123456\",\n          \"externalVoidInvoiceId\": \"654321\",\n          \"errorMessage\": \"Error al generar la factura.\",\n          \"voidedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"statusLabel\": \"Pendiente\",\n          \"invoiceURL\": \"https://getjusto.com/invoice/123456\",\n          \"totalAmount\": 100,\n          \"taxAmount\": 10,\n          \"netAmount\": 90\n        }\n      ],\n      \"discounts\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"shiftId\": \"Li4eEa3W2hiuGGCFa\",\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"voidedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"discountedAmount\": 100,\n          \"discountMethodId\": \"a3W2hiuGGLi4eECFa\",\n          \"discountMethodName\": \"Cupón\",\n          \"fixedAmount\": 100,\n          \"percentage\": 10\n        }\n      ],\n      \"items\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"amount\": 2,\n          \"price\": 100,\n          \"priceWithModifiers\": 120,\n          \"unitPrice\": 50,\n          \"productId\": \"a3W2hiuGGLi4eECFa\",\n          \"productName\": \"Café\",\n          \"productInternalName\": \"Café\",\n          \"productUnitItemsCount\": 1,\n          \"comment\": \"Sin azúcar\",\n          \"sentToKDSAt\": \"2020-01-01T00:00:00.000Z\",\n          \"addedByClientUserId\": \"a3W2hiuGGLi4eECFa\",\n          \"addedByClientName\": \"Juan\",\n          \"addedByUserId\": \"a3W2hiuGGLi4eECFa\",\n          \"addedByUserName\": \"Juan\",\n          \"eaterLabels\": [\n            \"<string>\"\n          ],\n          \"modifiers\": [\n            {\n              \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n              \"modifierGroupId\": \"Li4eEa3W2hiuGGCFa\",\n              \"modifierId\": \"a3W2hiuGGLi4eECFa\",\n              \"amount\": 2,\n              \"modifierQuantity\": 1,\n              \"price\": 100,\n              \"unitPrice\": 50,\n              \"modifierName\": \"Azúcar\",\n              \"modifierInternalName\": \"Azúcar\",\n              \"modifierGroupName\": \"Azúcar\",\n              \"modifierUnitItemsCount\": 1,\n              \"modifierUnitWeight\": 100\n            }\n          ],\n          \"unitProductWeight\": 100,\n          \"totalWeight\": 100\n        }\n      ]\n    }\n  },\n  \"websiteId\": \"<string>\",\n  \"storeId\": \"<string>\",\n  \"date\": \"2020-01-01T00:00:00.000Z\",\n  \"eventId\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/tabs.tab.created")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"type\": \"tabs.tab.created\",\n  \"data\": {\n    \"tab\": {\n      \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n      \"code\": \"CJXEQZK\",\n      \"description\": \"Justo C#16699-02\",\n      \"comments\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\",\n      \"websiteId\": \"ErCkmcyCEovseJq5E\",\n      \"storeId\": \"Li4eEa3W2hiuGGCFa\",\n      \"shiftId\": \"tsft-b6fda21f-b638-428b-a785-849fdbe3fe0b\",\n      \"tabCounter\": 1,\n      \"createdById\": \"a3W2hiuGGLi4eECFa\",\n      \"operatorUserId\": \"a3W2hiuGGLi4eECFa\",\n      \"driverUserId\": \"a3W2hiuGGLi4eECFa\",\n      \"createdAtDeviceId\": \"W2hiuGGLa3W2hW2hiuGGLiuGGLWW2hiuGGL2hiuGGLW2hiuGGLi4eECFa\",\n      \"countryCode\": \"CL\",\n      \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n      \"closedAt\": \"2020-01-01T00:00:00.000Z\",\n      \"deletedAt\": \"2020-01-01T00:00:00.000Z\",\n      \"cancelledAt\": \"2020-01-01T00:00:00.000Z\",\n      \"cancellationPrompt\": \"El pedido fue cancelado por el cliente.\",\n      \"tableIds\": [\n        \"<string>\"\n      ],\n      \"tableNames\": [\n        \"<string>\"\n      ],\n      \"sectorIds\": [\n        \"<string>\"\n      ],\n      \"reservationId\": \"<string>\",\n      \"statusLabel\": \"<string>\",\n      \"statusLabelForClient\": \"<string>\",\n      \"totalPrice\": 123,\n      \"totalNetPrice\": 123,\n      \"totalTaxPrice\": 123,\n      \"totalPriceBeforeDiscounts\": 123,\n      \"discountsAmount\": 123,\n      \"amountPaid\": 123,\n      \"amountDue\": 123,\n      \"tipAmountPaid\": 123,\n      \"netTipAmountPaid\": 123,\n      \"taxTipAmountPaid\": 123,\n      \"mustBeReadyAt\": \"2020-01-01T00:00:00.000Z\",\n      \"mustBeDeliveredAt\": \"2020-01-01T00:00:00.000Z\",\n      \"readyToPickupAt\": \"2020-01-01T00:00:00.000Z\",\n      \"activatesAt\": \"2020-01-01T00:00:00.000Z\",\n      \"salesChannelConfigId\": \"<string>\",\n      \"channelName\": \"<string>\",\n      \"clientData\": {\n        \"name\": \"<string>\",\n        \"email\": \"<string>\",\n        \"phone\": \"<string>\",\n        \"addressLine1\": \"<string>\",\n        \"addressLine2\": \"<string>\",\n        \"addressExtra\": \"<string>\"\n      },\n      \"integrationClientId\": \"<string>\",\n      \"hasExternalDeliveryProvider\": true,\n      \"generateInvoiceAtClose\": true,\n      \"integrationOrderId\": \"<string>\",\n      \"integrationIsPending\": true,\n      \"integrationComments\": [\n        \"<string>\"\n      ],\n      \"eaterLabels\": [\n        \"<string>\"\n      ],\n      \"externalInvoiceId\": \"<string>\",\n      \"payments\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"code\": \"CJXEQZK\",\n          \"shiftId\": \"Li4eEa3W2hiuGGCFa\",\n          \"paymentMethodId\": \"a3W2hiuGGLi4eECFa\",\n          \"paymentMethodName\": \"Efectivo\",\n          \"amount\": 100,\n          \"tipAmount\": 10,\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"voidedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"shiftEndedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"createdById\": \"a3W2hiuGGLi4eECFa\",\n          \"shouldMakeInvoice\": true,\n          \"payerName\": \"John Doe\",\n          \"payerUserId\": \"a3W2hiuGGLi4eECFa\"\n        }\n      ],\n      \"invoices\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"providerId\": \"openFactura\",\n          \"storeId\": \"sto-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"tabId\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"inventorySaleId\": \"isale-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"generatedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"externalInvoiceId\": \"123456\",\n          \"externalVoidInvoiceId\": \"654321\",\n          \"errorMessage\": \"Error al generar la factura.\",\n          \"voidedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"statusLabel\": \"Pendiente\",\n          \"invoiceURL\": \"https://getjusto.com/invoice/123456\",\n          \"totalAmount\": 100,\n          \"taxAmount\": 10,\n          \"netAmount\": 90\n        }\n      ],\n      \"discounts\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"shiftId\": \"Li4eEa3W2hiuGGCFa\",\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"voidedAt\": \"2020-01-01T00:00:00.000Z\",\n          \"discountedAmount\": 100,\n          \"discountMethodId\": \"a3W2hiuGGLi4eECFa\",\n          \"discountMethodName\": \"Cupón\",\n          \"fixedAmount\": 100,\n          \"percentage\": 10\n        }\n      ],\n      \"items\": [\n        {\n          \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n          \"createdAt\": \"2020-01-01T00:00:00.000Z\",\n          \"amount\": 2,\n          \"price\": 100,\n          \"priceWithModifiers\": 120,\n          \"unitPrice\": 50,\n          \"productId\": \"a3W2hiuGGLi4eECFa\",\n          \"productName\": \"Café\",\n          \"productInternalName\": \"Café\",\n          \"productUnitItemsCount\": 1,\n          \"comment\": \"Sin azúcar\",\n          \"sentToKDSAt\": \"2020-01-01T00:00:00.000Z\",\n          \"addedByClientUserId\": \"a3W2hiuGGLi4eECFa\",\n          \"addedByClientName\": \"Juan\",\n          \"addedByUserId\": \"a3W2hiuGGLi4eECFa\",\n          \"addedByUserName\": \"Juan\",\n          \"eaterLabels\": [\n            \"<string>\"\n          ],\n          \"modifiers\": [\n            {\n              \"_id\": \"tab-4c48bf33-1411-4c3f-adac-db39b4631cb8\",\n              \"modifierGroupId\": \"Li4eEa3W2hiuGGCFa\",\n              \"modifierId\": \"a3W2hiuGGLi4eECFa\",\n              \"amount\": 2,\n              \"modifierQuantity\": 1,\n              \"price\": 100,\n              \"unitPrice\": 50,\n              \"modifierName\": \"Azúcar\",\n              \"modifierInternalName\": \"Azúcar\",\n              \"modifierGroupName\": \"Azúcar\",\n              \"modifierUnitItemsCount\": 1,\n              \"modifierUnitWeight\": 100\n            }\n          ],\n          \"unitProductWeight\": 100,\n          \"totalWeight\": 100\n        }\n      ]\n    }\n  },\n  \"websiteId\": \"<string>\",\n  \"storeId\": \"<string>\",\n  \"date\": \"2020-01-01T00:00:00.000Z\",\n  \"eventId\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Webhook Payload

type
enum<string>

El tipo de webhook

Available options:
tabs.tab.created
Allowed value: "tabs.tab.created"
data
object
websiteId
string

El ID de la marca

storeId
string

El ID del local si es que corresponde

date
string<date-time>

La fecha en que se generó el evento

Example:

"2020-01-01T00:00:00.000Z"

eventId
string

El ID del evento

Response

200

OK