Llamafood Merchant API Documentation

Setup

Configuración inicial

Configurar en admin.llamafood.com / Configuración / Modo desarrollador los siguientes valores:

  • Endpoint
Configuración en business.llamafood.com

Webhooks

New Order

When a new order is placed, Llamafood will send a POST request to your endpoint with the following JSON structure:


{
  "order": {
    "ll_order_id": 3448896,
    "ll_branch_id": 183,
    "ll_order_status": "created",
    "branch_order_number": 17,
    "branch_name": "Nexus Huancayo",
    "order_time": "2023-10-11T18:12:16.000Z",
    "customer_first_name": "Juan",
    "customer_last_name": "Perez",
    "customer_address_reference": "Al costado de la casa azul",
    "customer_note_for_branch": "Por favor con bastante ají",
    "customer_invoice_type": "boleta",
    "customer_invoice_id": "412345678",
    "customer_invoice_fullname": "Juan Perez",
    "customer_invoice_address": "Av. Las Flores 123",
    "is_customer_pickup_order": 0,
    "customer_payment_method": "CASH",
    "delivery_llamacredit_used": 0.0,
    "subtotal": 19,
    "final_subtotal": 22.5,
    "order_items": [
        {
            "ll_order_item_id": 7441859,
            "item_name": "Pan al Ajo",
            "order_note": "Test Op1",
            "price": 6,
            "count": 1,
            "ll_alternative_id": null,
            "option_items": [
                {
                    "option_alternative_id": null,
                    "ll_order_item_id": 7441859,
                    "ll_option_name": "Sin picante",
                    "ll_option_price": 1
                },
                {
                    "option_alternative_id": null,
                    "ll_order_item_id": 7441859,
                    "ll_option_name": "Medio picante",
                    "ll_option_price": 4
                }
            ]
        }
    ],
    "org_group_id" : 1,
    "org_group_name": "Nexus",
  },
  "status": "OK"
}
                

Cancelled Order

Mientras la orden no es aceptada, el usuario puede cancelar la orden. Cuando la orden es cancelada, se enviará un POST request a tu endpoint con el siguiente JSON structure:


{
  "order": {
    "ll_order_id": 3448896,
    "ll_order_status": "canceled"
  },
  "status": "OK"
}
                

API

URLs de los endpoints

Utiliza las siguientes URLs para hacer llamadas con este endpoint:

  • URL de Production: https://driver.llama-apis.com

Accept Order

  • Endpoint: https://driver.llama-apis.com/integrations/v2/llamafood_deliveries/:oId/branches/:bId/accepted
  • Method: PUT
  • API Key: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
  • Request Body:

{
  "expected_preparation_duration": 30
}
                

Mark Order Complete

  • Endpoint: https://driver.llama-apis.com/integrations/v1/llamafood_deliveries/:oId/branches/:bId/mark_as_prepared
  • Method: PUT
  • API Key: Bearer UbhId1yD6hb6_u7DfOACKxq_Oos