La Pyme SDK
import { Lapyme } from "lapyme";
const lapyme = new Lapyme({
bearerAuth: process.env["LAPYME_API_KEY"] ?? "",
});
const order = await lapyme.orders.getOrderById({
orderId: "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
});
{
"request_id": "<string>",
"data": {
"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
}
]
}
}Obtener pedido
Devuelve el detalle persistido de un pedido de comercio.
GET
/
api
/
v1
/
orders
/
{order_id}
La Pyme SDK
import { Lapyme } from "lapyme";
const lapyme = new Lapyme({
bearerAuth: process.env["LAPYME_API_KEY"] ?? "",
});
const order = await lapyme.orders.getOrderById({
orderId: "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
});
{
"request_id": "<string>",
"data": {
"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
}
]
}
}Was this page helpful?
⌘I

