1. Orders
Alfalabs API v2
  • Raiz
    • Orders
      • GET /orders
        GET
      • POST /orders
        POST
      • PUT /orders/status
        PUT
    • Users
      • GET /users
    • Delivery
      • GET /deliveryAreas
    • Nfc
      • GET /nfc
      • POST /nfc
    • Ratings
      • GET /ratings
    • Accounts
      • GET /accounts
    • Discount Coupons
      • GET /discountCoupons
      • GET /discountCoupons/id
      • POST /discountCoupons
      • PUT /discountCoupons
      • DELETE /discountCoupons
    • Webhook
  1. Orders

POST /orders

POST
/v2/orders
Cria um novo pedido no sistema.

Campos do Body#

origin (string, obrigatório) — Origem do pedido (WhatsApp, Totem).
deliveryType (string, obrigatório) — Tipo de entrega (Delivery, Balcão).
customer (object, obrigatório) — Cliente associado ao pedido.
address (object, obrigatório se Delivery) — Endereço de entrega.
payments (array, obrigatório) — Métodos de pagamento e valores.
items (array, obrigatório) — Lista de itens do pedido.
total (object, obrigatório) — Totais e descontos.

Exemplo de Resposta (200)#

{
  "origin": "WhatsApp",
  "deliveryType": "Delivery",
  "documentReceipt": "123.456.789-00",
  "observations": "Entregar na portaria",
  "customer": {
    "id": 123
  },
  "address": {
    "streetName": "Rua das Flores",
    "streetNumber": "123",
    "postalCode": "12345678",
    "city": "Florianópolis",
    "neighborhood": "Centro",
    "state": "SC",
    "country": "Brasil",
    "reference": "Próximo ao mercado",
    "complement": "Apto 101",
    "coordinates": {
      "latitude": -27.5954,
      "longitude": -48.5480
    }
  },
  "payments": [
    {
      "method": "Cartão de Crédito",
      "value": 50.00,
      "card": {
        "brand": "Visa"
      }
    },
    {
      "method": "Dinheiro",
      "value": 25.50,
      "cash": {
        "changeFor": 30.00
      }
    }
  ],
  "items": [
    {
      "name": "X-Burguer Completo",
      "externalCode": "XB001",
      "quantity": 1,
      "unitPrice": 25.50,
      "price": 25.50,
      "category": "Lanches",
      "observations": "Sem cebola",
      "flavors": ["Bovino"],
      "additions": ["Bacon", "Queijo Extra"],
      "complements": [
        {
          "title": "Escolha o Pão",
          "isFraction": false,
          "chargeHigherPrice": false,
          "chargeMediumPrice": false,
          "options": [
            {
              "name": "Pão Australiano",
              "externalCode": "PAO001",
              "quantity": 1,
              "unitPrice": 2.00,
              "price": 2.00
            }
          ]
        },
        {
          "title": "Adicionais",
          "isFraction": false,
          "chargeHigherPrice": true,
          "chargeMediumPrice": false,
          "options": [
            {
              "name": "Ovo",
              "externalCode": "OVO001",
              "quantity": 1,
              "unitPrice": 1.50,
              "price": 1.50
            },
            {
              "name": "Batata Palha",
              "externalCode": "BAT001",
              "quantity": 1,
              "unitPrice": 1.00,
              "price": 1.00
            }
          ]
        },
        {
          "title": "Bebida",
          "isFraction": false,
          "chargeHigherPrice": false,
          "chargeMediumPrice": true,
          "options": [
            {
              "name": "Coca-Cola 350ml",
              "externalCode": "COC001",
              "quantity": 1,
              "unitPrice": 4.50,
              "price": 4.50
            }
          ]
        }
      ]
    },
    {
      "name": "Batata Frita",
      "externalCode": "BAT002",
      "quantity": 2,
      "unitPrice": 8.00,
      "price": 16.00,
      "category": "Acompanhamentos",
      "observations": null,
      "flavors": [],
      "additions": ["Cheddar", "Bacon"],
      "complements": []
    }
  ],
  "total": {
    "subTotal": 51.00,
    "deliveryFee": 5.00,
    "discount": 5.00,
    "addition": 2.50,
    "orderAmount": 53.50
  }
}

Códigos de Resposta#

CódigoDescrição
200Pedido criado com sucesso
400Dados inválidos
401Token ausente ou inválido
500Erro interno

Requisição

Parâmetros Header

Parâmetros Bodyapplication/json

Examples

Respostas

🟢200
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.alfalabs.com.br/v2/v2/orders' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "origin": "WhatsApp",
  "deliveryType": "Delivery",
  "documentReceipt": "12345678900",
  "observations": "Observações do pedido",
  "customer": {
    "id": 100
  },
  "address": {
    "streetName": "Rua das Flores",
    "streetNumber": "123",
    "postalCode": "89010000",
    "city": "Blumenau",
    "neighborhood": "Centro",
    "state": "SC",
    "country": "Brasil"
  },
  "payments": [
    {
      "method": "Dinheiro",
      "value": 50.0,
      "cash": {
        "changeFor": 100.0
      }
    }
  ],
  "items": [
    {
      "name": "Pizza Margherita",
      "externalCode": "PIZZA001",
      "quantity": 1,
      "unitPrice": 45.0,
      "price": 45.0,
      "category": "Pizzas",
      "flavors": [
        "Margherita"
      ]
    }
  ],
  "total": {
    "subTotal": 45.0,
    "deliveryFee": 10.0,
    "discount": 5.0,
    "addition": 0.0,
    "orderAmount": 50.0
  }
}'
Response Response Example
{}
Modificado em 2026-04-27 19:39:30
Página anterior
GET /orders
Próxima página
PUT /orders/status
Built with