Órdenes de compra
Las órdenes de compra permite crear pedidos a través de canales externos.
Propiedades
| Propiedad | Descripción |
|---|---|
| id | Identificador único del carrito |
| payment_title | Título del pago |
| total | Total del carrito |
| subtotal | Subtotal del carrito |
| created_at | Fecha de creación |
| updated_at | Fecha de última actualización |
| note | Notas del carrito abandonado |
| currency | Tipo de moneda de la tienda |
| tracking_link | Link de recuperación del carrito |
| customer | Información básica del cliente |
| products | Lista de productos en el carrito |
Endpoints
GET /draft-order
Obtiene una lista de órdenes de compra.
Parámetros de query
| Parámetro | Descripción |
|---|---|
| q | Filtrar por ID |
| page | Número de página |
| per_page | Cantidad de resultados por página |
| customer_email | Filtrar por email del cliente |
| updated_at_from | Fecha mínima de actualización (ISO UTC) |
| updated_at_to | Fecha máxima de actualización (ISO UTC) |
Ejemplo de respuesta
HTTP/1.1 200 OK
{
"pagination": {
"total": 1,
"page": 1,
"per_page": 30,
"next_page": null
},
"results": [
{
"id": 24,
"payment_title": "Pago a convenir",
"total": "15",
"subtotal": "15",
"created_at": "2026-05-21T12:32:32.000Z",
"updated_at": "2026-05-21T12:32:32.000Z",
"note": null,
"currency": "ARS",
"tracking_link": "https://asd.tiendanegocio.com/compra/proceso/orden?hash=MPFNGAAO",
"customer": {
"id": 3,
"name": "juan carlos",
"email": "juang@example.com"
},
"products": [
{
"id": 25,
"product_id": 3,
"variant_id": 1,
"name": "nuevo produto (XS) (Negro)",
"quantity": 1,
"image": "https://cdn.v2.tiendanegocio.com/",
"price": "15",
"sku": null
}
]
}
]
}
GET /draft-order/{id}
Obtiene una órden de compra ID.
Ejemplo
GET /draft-order/24
HTTP/1.1 200 OK
{
{
"id": 24,
"payment_title": "Pago a convenir",
"total": "15",
"subtotal": "15",
"created_at": "2026-05-21T12:32:32.000Z",
"updated_at": "2026-05-21T12:32:32.000Z",
"note": null,
"currency": "ARS",
"tracking_link": "https://asd.tiendanegocio.com/compra/proceso/orden?hash=MPFNGAAO",
"customer": {
"id": 3,
"name": "juan carlos",
"email": "juang@example.com"
},
"products": [
{
"id": 25,
"product_id": 3,
"variant_id": 1,
"name": "nuevo produto (XS) (Negro)",
"quantity": 1,
"image": "https://cdn.v2.tiendanegocio.com/",
"price": "15",
"sku": null
}
]
}
}
POST /draft-order
Crea una nueva órden de compra.
Products
| Parámetro | Descripción |
|---|---|
| product_id | ID del producto |
| variant_id | ID de la variante (opcional) |
| quantity | Cantidad |
Shipment (opcional)
| Parámetro | Descripción |
|---|---|
| name | Nombre del receptor |
| last_name | Apellido del receptor |
| Email del receptor | |
| phone | Teléfono del receptor |
| shipment_title | Título del envío |
| zip_code | Código postal |
| province | Provincia |
| city | Ciudad |
| department | Departamento |
| direction | Dirección |
| street | Calle |
| street_number | Número |
| description | Descripción |
Bill
| Parámetro | Descripción |
|---|---|
| dni | DNI |
| name | Nombre |
| last_name | Apellido |
| phone | Teléfono |
| direction | Dirección |
| street | Calle |
| street_number | Número |
| city | Ciudad |
| department | Departamento |
| zip_code | Código postal |
| province | Provincia |
Ejemplo de request
{
"note": "compra del local",
"payment_title": "plata",
"origin_name": "tienda fisica",
"products": [
{
"product_id": 1,
"variant_id": 0,
"quantity": 3
}
],
"shipment": {
"name": "Carlos",
"last_name": "Martinez",
"email": "carlos@email.com",
"phone": "541112345678",
"shipment_title": "Envío por moto",
"zip_code": "1832",
"province": "Buenos Aires",
"city": "Lomas de Zamora",
"department": "A",
"direction": "Casa",
"street": "Alsina",
"street_number": "123",
"description": "Dejar en portería"
},
"bill": {
"dni": "string",
"name": "Juan",
"last_name": "Pérez",
"email": "juan@email.com",
"phone": "541112345678",
"direction": "string",
"street": "string",
"street_number": "string",
"city": "string",
"department": "string",
"zip_code": "string",
"provincie": "string"
}
}
Respuesta
HTTP/1.1 201 OK
{
"id": 25,
"payment_title": "plata",
"total": "60",
"subtotal": "20",
"created_at": "2026-05-21T15:57:30.000Z",
"updated_at": "2026-05-21T15:57:30.000Z",
"note": "compra del local",
"currency": "ARS",
"tracking_link": "https://asd.tiendanegocio.com/compra/proceso/orden?hash=sjtrbms34qdzg0qxad3vk",
"customer": {
"id": 4,
"name": "Juan Pérez",
"email": "juan@email.com"
},
"products": [
{
"id": 26,
"product_id": 1,
"variant_id": 0,
"name": "1",
"quantity": 3,
"image": "https://cdn.v2.tiendanegocio.com/null",
"price": "20",
"sku": null
}
]
}
PUT /draft-order/{id}
Actualiza una órden de compra existente.
| Parámetro | Descripción |
|---|---|
| confirm_pay | Confirmar el pago de la órden (Booleano) |
Ejemplo
PUT /draft-order/1
{
"note": "string",
"confirm_pay": true,
"payment_title": "string",
"shipment_title": "string",
"origin_name": "string"
}
Respuesta
HTTP/1.1 200 OK
{
"id": 25,
"payment_title": "string",
"total": "60",
"subtotal": "20",
"created_at": "2026-05-21T15:57:30.000Z",
"updated_at": "2026-05-21T15:57:30.000Z",
"note": "nota",
"currency": "ARS",
"tracking_link": "https://asd.tiendanegocio.com/compra/proceso/orden?hash=sjtrbms34qdzg0qxad3vk",
"customer": {
"id": 4,
"name": "Juan Pérez",
"email": "juan@email.com"
},
"products": [
{
"id": 26,
"product_id": 1,
"variant_id": 0,
"name": "1",
"quantity": 3,
"image": "https://cdn.v2.tiendanegocio.com/null",
"price": "20",
"sku": null
}
]
}