Crear pedido
curl --request POST \
--url https://api.lapyme.com.ar/api/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigned_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totals": {
"subtotal": 1,
"tax_amount": 1,
"total": 1
},
"lines": [
{
"product_name_snapshot": "<string>",
"sku_snapshot": "<string>",
"ordered_quantity": 123,
"unit_price": 1,
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_id": 123,
"discount_amount": 1,
"discount_percentage": 50
}
],
"order_date": "2023-11-07T05:31:56Z",
"notes": "<string>",
"discount_amount": 1
}
'{
"request_id": "<string>",
"data": {
"order": {
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": "<string>",
"raw_order_number": 123,
"order_date": "2023-11-07T05:31:56Z",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_name": "<string>",
"customer_tax_id": "<string>",
"items_count": 123,
"total_units": 123,
"discount_amount": 1,
"subtotal": 1,
"tax_amount": 1,
"total": 1,
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_name": "<string>",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_number": 123,
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_name": "<string>",
"sku": "<string>",
"ordered_quantity": 123,
"allocated_quantity": 123,
"fulfilled_quantity": 123,
"invoiced_quantity": 123,
"cancelled_quantity": 123,
"unit_price": 1,
"tax_rate_id": 123,
"discount_amount": 123,
"discount_percentage": 123,
"subtotal": 1
}
],
"active_warehouses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_default": true
}
],
"pending_preparation_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"preparations": [
{
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prepared_at": "2023-11-07T05:31:56Z",
"warehouse_name": "<string>",
"remito_delivery_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"formatted_remito_number": "<string>",
"lines": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_line_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_name": "<string>",
"sku": "<string>",
"variant_options": {},
"option_names": [
"<string>"
],
"quantity": 123,
"ordered_quantity": 123,
"unit_price": 1,
"discount_percentage": 123
}
]
}
],
"invoices": [
{
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"formatted_invoice_number": "<string>",
"invoice_date": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"items_count": 123,
"total_units": 123,
"total": 1
}
]
},
"idempotent_replay": true,
"result": "<unknown>"
},
"warnings": [
"<unknown>"
]
}Crear pedido
Crea un pedido de comercio y su trabajo inicial de preparación. Requiere Idempotency-Key.
POST
/
api
/
v1
/
orders
Crear pedido
curl --request POST \
--url https://api.lapyme.com.ar/api/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigned_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"totals": {
"subtotal": 1,
"tax_amount": 1,
"total": 1
},
"lines": [
{
"product_name_snapshot": "<string>",
"sku_snapshot": "<string>",
"ordered_quantity": 123,
"unit_price": 1,
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tax_rate_id": 123,
"discount_amount": 1,
"discount_percentage": 50
}
],
"order_date": "2023-11-07T05:31:56Z",
"notes": "<string>",
"discount_amount": 1
}
'{
"request_id": "<string>",
"data": {
"order": {
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": "<string>",
"raw_order_number": 123,
"order_date": "2023-11-07T05:31:56Z",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_name": "<string>",
"customer_tax_id": "<string>",
"items_count": 123,
"total_units": 123,
"discount_amount": 1,
"subtotal": 1,
"tax_amount": 1,
"total": 1,
"notes": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_name": "<string>",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"line_number": 123,
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_name": "<string>",
"sku": "<string>",
"ordered_quantity": 123,
"allocated_quantity": 123,
"fulfilled_quantity": 123,
"invoiced_quantity": 123,
"cancelled_quantity": 123,
"unit_price": 1,
"tax_rate_id": 123,
"discount_amount": 123,
"discount_percentage": 123,
"subtotal": 1
}
],
"active_warehouses": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_default": true
}
],
"pending_preparation_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"preparations": [
{
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"prepared_at": "2023-11-07T05:31:56Z",
"warehouse_name": "<string>",
"remito_delivery_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"formatted_remito_number": "<string>",
"lines": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_line_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_name": "<string>",
"sku": "<string>",
"variant_options": {},
"option_names": [
"<string>"
],
"quantity": 123,
"ordered_quantity": 123,
"unit_price": 1,
"discount_percentage": 123
}
]
}
],
"invoices": [
{
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"formatted_invoice_number": "<string>",
"invoice_date": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"items_count": 123,
"total_units": 123,
"total": 1
}
]
},
"idempotent_replay": true,
"result": "<unknown>"
},
"warnings": [
"<unknown>"
]
}Authorizations
Incluí tu API key en el header Authorization con el prefijo Bearer.
Headers
Clave estable para deduplicar reintentos de la misma operación.
Body
application/json
Show child attributes
Show child attributes
Minimum array length:
1Show child attributes
Show child attributes
Available options:
shipping, local_delivery, pickup Available options:
PES, DOL Required range:
x >= 0Was this page helpful?
⌘I

