23 operations. All of them live under https://app.iknal.mx/api.
Appointments
The detailed description of each endpoint and its parameters is in Spanish for now; the examples and field names are the same in any language.
| Operation | Permission | What it does |
|---|
| GET /v1/appointments | read:appointments | List appointments |
| POST /v1/appointments | write:appointments | Create an appointment |
| GET /v1/appointments/{id} | read:appointments | View an appointment |
| PATCH /v1/appointments/{id} | write:appointments | Cancel, complete or mark as no-show |
GET/v1/appointments
Citas de la organización ordenadas de la más reciente a la más antigua por `starts_at`. Paginación por cursor.
| Parameter | Where | Description |
|---|
status | query | `confirmed`, `cancelled`, `completed`, `no_show` o `pending_payment`. |
contact_id | query | Solo las citas de un contacto. |
resource_id | query | Solo las de un recurso. |
from | query | Cita a partir de este instante (ISO 8601). |
to | query | Cita hasta este instante (ISO 8601). |
limit | query | Tamaño de página (1-200). Por defecto 50. |
cursor | query | Cursor opaco de la página siguiente (`pagination.next_cursor`). |
Example
curl -s "https://app.iknal.mx/api/v1/appointments?from=2026-09-01T00%3A00%3A00-06%3A00&limit=50&cursor=MjAyNi0wOC0xOVQxMDowMDowMFp8YWJj" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": [
{
"id": "8f2a1c34-77d1-4d5e-9b3a-2a5f9d3c1b77",
"status": "confirmed",
"service": "Limpieza dental",
"service_id": "2b9c7f10-3a44-4f0c-9e11-77a2d5c8e001",
"starts_at": "2026-09-01T16:00:00.000Z",
"ends_at": "2026-09-01T17:00:00.000Z",
"resource": {
"id": "0f61e2a9-9c3b-4d2e-8a11-5c7d9e2f4a10",
"name": "Dra. Ruiz"
},
"contact": {
"id": "c1a2b3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Ana Pérez",
"phone": "+5215512345678"
},
"conversation_id": "d4c3b2a1-f6e5-4b7a-9d8c-1f0e3a2b5c4d",
"notes": null,
"created_by": "api",
"created_at": "2026-08-19T18:22:04.117Z",
"cancelled_at": null,
"cancellation_reason": null,
"no_show_at": null,
"confirmation_status": "unconfirmed",
"deposit_status": "none"
}
],
"pagination": {
"next_cursor": null,
"limit": 50
}
}
POST/v1/appointments
Crea una cita con el mismo motor que el panel: revalida el hueco, respeta la antelación mínima, programa los recordatorios y espeja el evento en el calendario del recurso. El contacto se identifica por teléfono (se crea si no existía) o por `contact_id`. Devuelve 409 si el hueco se ocupó mientras tanto.
Body
`service` tiene que ser el nombre exacto de `GET /v1/services`. `force: true` salta la revalidación del hueco y queda anotado en la cita.
{
"phone": "+5215512345678",
"full_name": "Ana Pérez",
"service": "Limpieza dental",
"starts_at": "2026-09-01T10:00:00-06:00",
"resource_id": "0f61e2a9-9c3b-4d2e-8a11-5c7d9e2f4a10",
"notes": "Viene recomendada por su hermana.",
"force": false,
"requires_deposit": false
}
Example
curl -s -X POST "https://app.iknal.mx/api/v1/appointments" \
-H "Authorization: Bearer $IKNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone":"+5215512345678","full_name":"Ana Pérez","service":"Limpieza dental","starts_at":"2026-09-01T10:00:00-06:00","resource_id":"0f61e2a9-9c3b-4d2e-8a11-5c7d9e2f4a10","notes":"Viene recomendada por su hermana.","force":false,"requires_deposit":false}'
Response · 201
{
"data": {
"id": "8f2a1c34-77d1-4d5e-9b3a-2a5f9d3c1b77",
"status": "confirmed",
"service": "Limpieza dental",
"service_id": "2b9c7f10-3a44-4f0c-9e11-77a2d5c8e001",
"starts_at": "2026-09-01T16:00:00.000Z",
"ends_at": "2026-09-01T17:00:00.000Z",
"resource": {
"id": "0f61e2a9-9c3b-4d2e-8a11-5c7d9e2f4a10",
"name": "Dra. Ruiz"
},
"contact": {
"id": "c1a2b3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Ana Pérez",
"phone": "+5215512345678"
},
"conversation_id": "d4c3b2a1-f6e5-4b7a-9d8c-1f0e3a2b5c4d",
"notes": null,
"created_by": "api",
"created_at": "2026-08-19T18:22:04.117Z",
"cancelled_at": null,
"cancellation_reason": null,
"no_show_at": null,
"confirmation_status": "unconfirmed",
"deposit_status": "none",
"calendar_synced": true
}
}
GET/v1/appointments/{id}
Una cita concreta de la organización de la clave.
| Parameter | Where | Description |
|---|
idrequired | path | Id de la cita. |
Example
curl -s "https://app.iknal.mx/api/v1/appointments/<id>" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": {
"id": "8f2a1c34-77d1-4d5e-9b3a-2a5f9d3c1b77",
"status": "confirmed",
"service": "Limpieza dental",
"service_id": "2b9c7f10-3a44-4f0c-9e11-77a2d5c8e001",
"starts_at": "2026-09-01T16:00:00.000Z",
"ends_at": "2026-09-01T17:00:00.000Z",
"resource": {
"id": "0f61e2a9-9c3b-4d2e-8a11-5c7d9e2f4a10",
"name": "Dra. Ruiz"
},
"contact": {
"id": "c1a2b3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Ana Pérez",
"phone": "+5215512345678"
},
"conversation_id": "d4c3b2a1-f6e5-4b7a-9d8c-1f0e3a2b5c4d",
"notes": null,
"created_by": "api",
"created_at": "2026-08-19T18:22:04.117Z",
"cancelled_at": null,
"cancellation_reason": null,
"no_show_at": null,
"confirmation_status": "unconfirmed",
"deposit_status": "none"
}
}
PATCH/v1/appointments/{id}
Cambia el estado final de una cita. Cancelar cancela también los recordatorios pendientes y renombra el evento en el calendario externo en vez de borrarlo. Es idempotente: repetir la misma transición devuelve 200 con `changed: false`.
| Parameter | Where | Description |
|---|
idrequired | path | Id de la cita. |
Body
`status` solo admite `cancelled`, `completed` o `no_show`. Reagendar no se hace aquí: se cancela y se crea otra cita.
{
"status": "cancelled",
"cancellation_reason": "El paciente avisó por teléfono."
}
Example
curl -s -X PATCH "https://app.iknal.mx/api/v1/appointments/<id>" \
-H "Authorization: Bearer $IKNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"cancelled","cancellation_reason":"El paciente avisó por teléfono."}'
Response · 200
{
"data": {
"id": "8f2a1c34-77d1-4d5e-9b3a-2a5f9d3c1b77",
"status": "cancelled",
"service": "Limpieza dental",
"service_id": "2b9c7f10-3a44-4f0c-9e11-77a2d5c8e001",
"starts_at": "2026-09-01T16:00:00.000Z",
"ends_at": "2026-09-01T17:00:00.000Z",
"resource": {
"id": "0f61e2a9-9c3b-4d2e-8a11-5c7d9e2f4a10",
"name": "Dra. Ruiz"
},
"contact": {
"id": "c1a2b3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Ana Pérez",
"phone": "+5215512345678"
},
"conversation_id": "d4c3b2a1-f6e5-4b7a-9d8c-1f0e3a2b5c4d",
"notes": null,
"created_by": "api",
"created_at": "2026-08-19T18:22:04.117Z",
"cancelled_at": null,
"cancellation_reason": null,
"no_show_at": null,
"confirmation_status": "unconfirmed",
"deposit_status": "none",
"changed": true
}
}
Contacts
The detailed description of each endpoint and its parameters is in Spanish for now; the examples and field names are the same in any language.
| Operation | Permission | What it does |
|---|
| GET /v1/contacts | read:contacts | List contacts |
| POST /v1/contacts | write:contacts | Create a contact |
| GET /v1/contacts/{id} | read:contacts | View a contact |
| PATCH /v1/contacts/{id} | write:contacts | Edit name, tags and attributes |
GET/v1/contacts
Contactos de la organización, del más reciente al más antiguo. Admite búsqueda por nombre o teléfono y filtro por etiqueta.
| Parameter | Where | Description |
|---|
q | query | Busca por nombre o por teléfono. |
tag | query | Solo los contactos con esta etiqueta. |
limit | query | Tamaño de página (1-200). Por defecto 50. |
cursor | query | Cursor opaco de la página siguiente (`pagination.next_cursor`). |
Example
curl -s "https://app.iknal.mx/api/v1/contacts?limit=50&cursor=MjAyNi0wOC0xOVQxMDowMDowMFp8YWJj" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": [
{
"id": "c1a2b3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"phone": "+5215512345678",
"full_name": "Ana Pérez",
"tags": [
"vip",
"recomendada"
],
"attributes": {
"crm_id": "A-1029"
},
"external_ids": {
"hubspot": "77123"
},
"created_at": "2026-07-02T15:04:01.000Z"
}
],
"pagination": {
"next_cursor": null,
"limit": 50
}
}
POST/v1/contacts
Alta de contacto. El teléfono en formato internacional es su identidad: si ya existe uno con ese número, se devuelve 409 en vez de duplicar la ficha.
Body
Solo `phone` es obligatorio.
{
"phone": "+5215512345678",
"full_name": "Ana Pérez",
"tags": [
"vip"
],
"attributes": {
"crm_id": "A-1029"
}
}
Example
curl -s -X POST "https://app.iknal.mx/api/v1/contacts" \
-H "Authorization: Bearer $IKNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phone":"+5215512345678","full_name":"Ana Pérez","tags":["vip"],"attributes":{"crm_id":"A-1029"}}'
Response · 201
{
"data": {
"id": "c1a2b3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"phone": "+5215512345678",
"full_name": "Ana Pérez",
"tags": [
"vip",
"recomendada"
],
"attributes": {
"crm_id": "A-1029"
},
"external_ids": {
"hubspot": "77123"
},
"created_at": "2026-07-02T15:04:01.000Z"
}
}
GET/v1/contacts/{id}
La ficha de un contacto.
| Parameter | Where | Description |
|---|
idrequired | path | Id del contacto. |
Example
curl -s "https://app.iknal.mx/api/v1/contacts/<id>" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": {
"id": "c1a2b3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"phone": "+5215512345678",
"full_name": "Ana Pérez",
"tags": [
"vip",
"recomendada"
],
"attributes": {
"crm_id": "A-1029"
},
"external_ids": {
"hubspot": "77123"
},
"created_at": "2026-07-02T15:04:01.000Z"
}
}
PATCH/v1/contacts/{id}
Actualiza la ficha. `tags`, `attributes` y `external_ids` se REEMPLAZAN enteros, no se fusionan: manda siempre la lista completa. El teléfono no se puede cambiar — es la identidad del contacto.
| Parameter | Where | Description |
|---|
idrequired | path | Id del contacto. |
Body
Manda al menos uno de los cuatro campos.
{
"full_name": "Ana Pérez Gómez",
"tags": [
"vip",
"recomendada"
]
}
Example
curl -s -X PATCH "https://app.iknal.mx/api/v1/contacts/<id>" \
-H "Authorization: Bearer $IKNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"full_name":"Ana Pérez Gómez","tags":["vip","recomendada"]}'
Response · 200
{
"data": {
"id": "c1a2b3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"phone": "+5215512345678",
"full_name": "Ana Pérez",
"tags": [
"vip",
"recomendada"
],
"attributes": {
"crm_id": "A-1029"
},
"external_ids": {
"hubspot": "77123"
},
"created_at": "2026-07-02T15:04:01.000Z"
}
}
Conversations
The detailed description of each endpoint and its parameters is in Spanish for now; the examples and field names are the same in any language.
| Operation | Permission | What it does |
|---|
| GET /v1/conversations | read:conversations | List conversations |
| GET /v1/conversations/{id}/messages | read:conversations | Message history |
| POST /v1/conversations/{id}/messages | write:messages | Send a message as the team |
GET/v1/conversations
La bandeja, ordenada por actividad. `window_expires_at` dice hasta cuándo se le puede escribir texto libre al contacto; después solo se le puede escribir con una plantilla aprobada.
| Parameter | Where | Description |
|---|
contact_id | query | Solo las de un contacto. |
needs_attention | query | `true` = solo las que piden a una persona. |
bot_active | query | Filtra por si el agente sigue contestando. |
limit | query | Tamaño de página (1-200). Por defecto 50. |
cursor | query | Cursor opaco de la página siguiente (`pagination.next_cursor`). |
Example
curl -s "https://app.iknal.mx/api/v1/conversations?limit=50&cursor=MjAyNi0wOC0xOVQxMDowMDowMFp8YWJj" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": [
{
"id": "d4c3b2a1-f6e5-4b7a-9d8c-1f0e3a2b5c4d",
"contact": {
"id": "c1a2b3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Ana Pérez",
"phone": "+5215512345678"
},
"channel_id": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d",
"bot_active": true,
"needs_attention": false,
"needs_attention_reason": null,
"last_message_at": "2026-08-19T17:58:00.000Z",
"last_inbound_at": "2026-08-19T17:57:12.000Z",
"window_expires_at": "2026-08-20T17:57:12.000Z",
"created_at": "2026-07-02T15:04:01.000Z"
}
],
"pagination": {
"next_cursor": null,
"limit": 50
}
}
GET/v1/conversations/{id}/messages
Mensajes de una conversación, del más reciente al más antiguo.
| Parameter | Where | Description |
|---|
idrequired | path | Id de la conversación. |
limit | query | Tamaño de página (1-200). Por defecto 50. |
cursor | query | Cursor opaco de la página siguiente (`pagination.next_cursor`). |
Example
curl -s "https://app.iknal.mx/api/v1/conversations/<id>/messages?limit=50&cursor=MjAyNi0wOC0xOVQxMDowMDowMFp8YWJj" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": [
{
"id": "1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"conversation_id": "d4c3b2a1-f6e5-4b7a-9d8c-1f0e3a2b5c4d",
"direction": "inbound",
"sender": "contact",
"content": "Hola, ¿tienen hueco el jueves?",
"template_name": null,
"delivery_status": null,
"media_type": null,
"transcript": null,
"created_at": "2026-08-19T17:57:12.000Z"
}
],
"pagination": {
"next_cursor": null,
"limit": 50
}
}
POST/v1/conversations/{id}/messages
Guarda el mensaje antes de entregarlo al cliente y desactiva el agente en esa conversación. Devuelve 201 con status=sent si el proveedor lo aceptó, o 202 con status=pending si quedó guardado para reintento automático; en ese caso no vuelvas a enviarlo. Fuera de la ventana de 24 h de Meta hay que mandar template (una plantilla aprobada); si mandas content con la ventana cerrada, la respuesta es 409.
| Parameter | Where | Description |
|---|
idrequired | path | Id de la conversación. |
Body
`content` para texto libre (ventana abierta) o `template` para reabrir la conversación.
{
"content": "Hola Ana, te confirmamos tu cita del jueves a las 10."
}
Example
curl -s -X POST "https://app.iknal.mx/api/v1/conversations/<id>/messages" \
-H "Authorization: Bearer $IKNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content":"Hola Ana, te confirmamos tu cita del jueves a las 10."}'
Response · 201
{
"data": {
"id": "1c2d…",
"conversation_id": "d4c3…",
"status": "sent",
"bot_deactivated": true
}
}
Catalog
The detailed description of each endpoint and its parameters is in Spanish for now; the examples and field names are the same in any language.
| Operation | Permission | What it does |
|---|
| GET /v1/services | read:availability | Business services |
| GET /v1/resources | read:availability | Staff and resources (practitioners, rooms, units) |
GET/v1/services
Catálogo de servicios con duración, precio y política de anticipo. Es la fuente del campo `service` al crear una cita.
| Parameter | Where | Description |
|---|
include_inactive | query | `true` para incluir los dados de baja. |
Example
curl -s "https://app.iknal.mx/api/v1/services" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": [
{
"id": "2b9c…",
"name": "Limpieza dental",
"description": "",
"duration_minutes": 60,
"buffer_before_min": 0,
"buffer_after_min": 10,
"price_cents": 80000,
"currency": "MXN",
"deposit_type": "none",
"deposit_value": 0,
"requires_intake": false,
"category": null,
"active": true,
"position": 0
}
]
}
GET/v1/resources
Quién o qué atiende. `services` dice qué servicios da cada recurso; `null` significa todos.
| Parameter | Where | Description |
|---|
include_inactive | query | `true` para incluir los inactivos. |
Example
curl -s "https://app.iknal.mx/api/v1/resources" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": [
{
"id": "0f61…",
"name": "Dra. Ruiz",
"kind": "practitioner",
"timezone": null,
"services": [
"Limpieza dental"
],
"active": true,
"position": 0
}
]
}
Metrics
The detailed description of each endpoint and its parameters is in Spanish for now; the examples and field names are the same in any language.
| Operation | Permission | What it does |
|---|
| GET /v1/metrics/summary | read:metrics | Business summary |
GET/v1/metrics/summary
Los mismos números que el panel: citas y sus finales, mezcla de clientes nuevos y recurrentes, embudo de conversación y reparto entre bot, equipo e integraciones.
| Parameter | Where | Description |
|---|
range | query | `7d`, `30d` (por defecto) o `90d`. |
Example
curl -s "https://app.iknal.mx/api/v1/metrics/summary" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": {
"range": {
"from": "2026-07-20T00:00:00.000Z",
"to": "2026-08-19T00:00:00.000Z",
"days": 30,
"bucket": "week"
},
"appointments": {
"booked": 142,
"completed": 118,
"cancelled": 12,
"no_show": 9,
"upcoming": 3,
"late_cancels": 4,
"no_show_rate_pct": 7.1,
"cancel_rate_pct": 8.5,
"series": []
},
"customers": {
"new_customers": 34,
"returning_customers": 61,
"active_customers": 95,
"repeat_rate_pct": 64.2
},
"conversations": {
"conversations": 210,
"conversations_with_booking": 128,
"conversion_pct": 61,
"handoffs": 11
},
"by_source": [
{
"created_by": "bot",
"appointments": 96,
"completed": 80,
"no_show": 6,
"share_pct": 67.6,
"after_hours": 41
}
]
}
}
Store
The detailed description of each endpoint and its parameters is in Spanish for now; the examples and field names are the same in any language.
| Operation | Permission | What it does |
|---|
| GET /v1/products | read:products | Store catalog |
| POST /v1/products | write:products | Create a product |
| GET /v1/products/{id} | read:products | View a product |
| PATCH /v1/products/{id} | write:products | Edit price, details and stock |
| GET /v1/orders | read:orders | List orders |
| GET /v1/orders/{id} | read:orders | View an order |
GET/v1/products
Productos con precio, existencias y variantes, del último modificado al primero. Con `updated_since` un POS o ERP trae solo lo que cambió. `retailer_id` es el identificador estable para cruzar catálogos. Solo para negocios del giro tienda (otro giro: 403).
| Parameter | Where | Description |
|---|
category | query | Solo los de esta categoría. |
sku | query | Busca por SKU exacto. |
include_inactive | query | `true` para incluir los dados de baja. |
updated_since | query | ISO 8601: solo los modificados desde ese instante. |
limit | query | Tamaño de página (1-200). Por defecto 50. |
cursor | query | Cursor opaco de la página siguiente (`pagination.next_cursor`). |
Example
curl -s "https://app.iknal.mx/api/v1/products?updated_since=2026-11-11T00%3A00%3A00-06%3A00&limit=50&cursor=MjAyNi0wOC0xOVQxMDowMDowMFp8YWJj" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": [
{
"id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c2b",
"retailer_id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c2b",
"name": "Playera básica",
"description": "Algodón, cuello redondo.",
"sku": "PLY-001",
"category": "Ropa",
"price_cents": 19900,
"active": true,
"track_inventory": true,
"stock": 0,
"external_catalog_id": null,
"variants": [
{
"id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"retailer_id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"name": "Talla M",
"sku": "PLY-001-M",
"price_cents": 19900,
"stock": 12,
"active": true
}
],
"created_at": "2026-11-11T15:04:05.000Z",
"updated_at": "2026-11-11T15:04:05.000Z"
}
],
"pagination": {
"next_cursor": null,
"limit": 50
}
}
POST/v1/products
Alta de producto con variantes opcionales (talla, color, presentación) con precio y existencias propias. Importes en centavos. Un `sku` repetido da 409.
Body
Solo `name` es obligatorio; sin `price_cents` el precio queda por confirmar y el agente no lo vende.
{
"name": "Playera básica",
"sku": "PLY-001",
"category": "Ropa",
"price_cents": 19900,
"track_inventory": true,
"variants": [
{
"name": "Talla M",
"sku": "PLY-001-M",
"price_cents": 19900,
"stock": 12
}
]
}
Example
curl -s -X POST "https://app.iknal.mx/api/v1/products" \
-H "Authorization: Bearer $IKNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Playera básica","sku":"PLY-001","category":"Ropa","price_cents":19900,"track_inventory":true,"variants":[{"name":"Talla M","sku":"PLY-001-M","price_cents":19900,"stock":12}]}'
Response · 201
{
"data": {
"id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c2b",
"retailer_id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c2b",
"name": "Playera básica",
"description": "Algodón, cuello redondo.",
"sku": "PLY-001",
"category": "Ropa",
"price_cents": 19900,
"active": true,
"track_inventory": true,
"stock": 0,
"external_catalog_id": null,
"variants": [
{
"id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"retailer_id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"name": "Talla M",
"sku": "PLY-001-M",
"price_cents": 19900,
"stock": 12,
"active": true
}
],
"created_at": "2026-11-11T15:04:05.000Z",
"updated_at": "2026-11-11T15:04:05.000Z"
}
}
GET/v1/products/{id}
Un producto con sus variantes, precio y existencias actuales.
| Parameter | Where | Description |
|---|
idrequired | path | Id del producto. |
Example
curl -s "https://app.iknal.mx/api/v1/products/<id>" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": {
"id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c2b",
"retailer_id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c2b",
"name": "Playera básica",
"description": "Algodón, cuello redondo.",
"sku": "PLY-001",
"category": "Ropa",
"price_cents": 19900,
"active": true,
"track_inventory": true,
"stock": 0,
"external_catalog_id": null,
"variants": [
{
"id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"retailer_id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"name": "Talla M",
"sku": "PLY-001-M",
"price_cents": 19900,
"stock": 12,
"active": true
}
],
"created_at": "2026-11-11T15:04:05.000Z",
"updated_at": "2026-11-11T15:04:05.000Z"
}
}
PATCH/v1/products/{id}
Actualiza el producto y sus variantes (por `id`; sin `id` se crea una variante nueva). `stock` FIJA las existencias (conteo); `stock_adjustment` las mueve de forma relativa y atómica (vendí 2 en mostrador = -2) sin pisar un pedido de WhatsApp que entre a la vez. Un ajuste que dejaría existencias negativas da 409.
| Parameter | Where | Description |
|---|
idrequired | path | Id del producto. |
Body
Manda solo lo que cambia.
{
"price_cents": 18900,
"variants": [
{
"id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"stock_adjustment": -2
}
]
}
Example
curl -s -X PATCH "https://app.iknal.mx/api/v1/products/<id>" \
-H "Authorization: Bearer $IKNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"price_cents":18900,"variants":[{"id":"5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a","stock_adjustment":-2}]}'
Response · 200
{
"data": {
"id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c2b",
"retailer_id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c2b",
"name": "Playera básica",
"description": "Algodón, cuello redondo.",
"sku": "PLY-001",
"category": "Ropa",
"price_cents": 19900,
"active": true,
"track_inventory": true,
"stock": 0,
"external_catalog_id": null,
"variants": [
{
"id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"retailer_id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"name": "Talla M",
"sku": "PLY-001-M",
"price_cents": 19900,
"stock": 12,
"active": true
}
],
"created_at": "2026-11-11T15:04:05.000Z",
"updated_at": "2026-11-11T15:04:05.000Z"
}
}
GET/v1/orders
Pedidos de la tienda, del más reciente al más antiguo, con sus líneas a precio congelado. Para enterarte al momento suscríbete a los webhooks `order.*`; este listado sirve para conciliar.
| Parameter | Where | Description |
|---|
status | query | `nuevo`, `confirmado`, `preparando`, `listo`, `en_camino`, `entregado` o `cancelado`. |
payment_status | query | `pendiente` o `pagado`. |
contact_id | query | Solo los de un contacto. |
updated_since | query | ISO 8601: solo los modificados desde ese instante. |
limit | query | Tamaño de página (1-200). Por defecto 50. |
cursor | query | Cursor opaco de la página siguiente (`pagination.next_cursor`). |
Example
curl -s "https://app.iknal.mx/api/v1/orders?limit=50&cursor=MjAyNi0wOC0xOVQxMDowMDowMFp8YWJj" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": [
{
"id": "4a3f2e1d-0c9b-4a8f-7e6d-5c4b3a2f1e0d",
"folio": 37,
"status": "nuevo",
"payment_status": "pendiente",
"payment_method": "contra_entrega",
"fulfillment": "domicilio",
"delivery_address": "Av. Juárez 120, Centro. Portón verde.",
"delivery_zone": "Centro",
"currency": "MXN",
"subtotal_cents": 39800,
"shipping_cents": 3000,
"total_cents": 42800,
"notes": null,
"source": "whatsapp",
"contact_id": "5b0c7f3e-1f2a-4c1d-9f0e-2a3b4c5d6e7f",
"items": [
{
"product_id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c2b",
"variant_id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"name": "Playera básica",
"variant_name": "Talla M",
"sku": "PLY-001-M",
"quantity": 2,
"unit_price_cents": 19900,
"line_total_cents": 39800
}
],
"created_at": "2026-11-11T15:04:05.000Z",
"updated_at": "2026-11-11T15:04:05.000Z",
"paid_at": null,
"delivered_at": null,
"cancelled_at": null
}
],
"pagination": {
"next_cursor": null,
"limit": 50
}
}
GET/v1/orders/{id}
Un pedido con sus líneas, totales, forma de entrega (incluida la dirección) y estado de pago.
| Parameter | Where | Description |
|---|
idrequired | path | Id del pedido. |
Example
curl -s "https://app.iknal.mx/api/v1/orders/<id>" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": {
"id": "4a3f2e1d-0c9b-4a8f-7e6d-5c4b3a2f1e0d",
"folio": 37,
"status": "nuevo",
"payment_status": "pendiente",
"payment_method": "contra_entrega",
"fulfillment": "domicilio",
"delivery_address": "Av. Juárez 120, Centro. Portón verde.",
"delivery_zone": "Centro",
"currency": "MXN",
"subtotal_cents": 39800,
"shipping_cents": 3000,
"total_cents": 42800,
"notes": null,
"source": "whatsapp",
"contact_id": "5b0c7f3e-1f2a-4c1d-9f0e-2a3b4c5d6e7f",
"items": [
{
"product_id": "6e5d4c3b-2a1f-4e0d-9c8b-7a6f5e4d3c2b",
"variant_id": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
"name": "Playera básica",
"variant_name": "Talla M",
"sku": "PLY-001-M",
"quantity": 2,
"unit_price_cents": 19900,
"line_total_cents": 39800
}
],
"created_at": "2026-11-11T15:04:05.000Z",
"updated_at": "2026-11-11T15:04:05.000Z",
"paid_at": null,
"delivered_at": null,
"cancelled_at": null
}
}
Invoices
The detailed description of each endpoint and its parameters is in Spanish for now; the examples and field names are the same in any language.
| Operation | Permission | What it does |
|---|
| GET /v1/invoices | read:invoices | List CFDI invoices |
GET/v1/invoices
Facturas que el negocio emitió con su PAC desde Iknal (de un cobro o la global a público en general), de la más reciente a la más antigua. Del receptor solo se publica el RFC enmascarado. Para enterarte al momento suscríbete a los webhooks `invoice.issued` e `invoice.cancelled`; el XML y el PDF se descargan del PAC con el `uuid`.
| Parameter | Where | Description |
|---|
status | query | `issuing`, `valid`, `cancellation_pending`, `cancelled` o `failed`. |
kind | query | `nominativa` o `global`. |
payment_id | query | Solo las que cubren ese cobro. |
contact_id | query | Solo las de un contacto. |
updated_since | query | ISO 8601: solo las modificadas desde ese instante. |
limit | query | Tamaño de página (1-200). Por defecto 50. |
cursor | query | Cursor opaco de la página siguiente (`pagination.next_cursor`). |
Example
curl -s "https://app.iknal.mx/api/v1/invoices?limit=50&cursor=MjAyNi0wOC0xOVQxMDowMDowMFp8YWJj" \
-H "Authorization: Bearer $IKNAL_API_KEY"
Response · 200
{
"data": [
{
"id": "6f5e4d3c-2b1a-4c0d-9e8f-7a6b5c4d3e2f",
"kind": "nominativa",
"status": "valid",
"cancellation_status": "none",
"uuid": "39c85a3f-275b-4341-b259-e8971d9f8a94",
"series": "A",
"folio_number": 128,
"currency": "MXN",
"subtotal_cents": 43103,
"tax_cents": 6897,
"total_cents": 50000,
"payment_form": "04",
"payment_method": "PUE",
"receptor_rfc_masked": "PEGA••••••Q12",
"payment_ids": [
"2d1c0b9a-8f7e-4d6c-5b4a-3f2e1d0c9b8a"
],
"contact_id": "c1a2b3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"global": null,
"livemode": true,
"issued_by": "agent",
"issued_at": "2026-11-12T16:20:00.000Z",
"cancellation_motive": null,
"cancelled_at": null,
"created_at": "2026-11-12T16:19:58.000Z",
"updated_at": "2026-11-12T16:20:00.000Z"
}
],
"pagination": {
"next_cursor": null,
"limit": 50
}
}