La Pyme SDK
import { Lapyme } from "lapyme";
const lapyme = new Lapyme({
bearerAuth: process.env["LAPYME_API_KEY"] ?? "",
});
const purchaseOrder = await lapyme.purchaseOrders.getPurchaseOrderById({
purchaseOrderId: "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
});{
"request_id": "<string>",
"data": {
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": 123,
"formatted_order_number": "<string>",
"order_date": "2023-12-25",
"expected_date": "2023-12-25",
"currency": "<string>",
"supplier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"email": "<string>",
"phone": "<string>",
"tax_id_type": "<string>",
"tax_id": "<string>",
"tax_category": "<string>",
"payment_term_id": "<string>",
"address": "<string>",
"apartment": "<string>",
"city": "<string>",
"province": "<string>",
"postal_code": "<string>"
},
"warehouse": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notes": "<string>",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ordered_quantity": 123,
"received_quantity": 123,
"expected_unit_cost": 1,
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"sku": "<string>",
"variant_options": {},
"option_names": [
"<string>"
]
}
}
]
}
}Obtener orden de compra por ID
Devuelve el detalle de una orden de compra.
GET
/
api
/
v1
/
purchase-orders
/
{purchase_order_id}
La Pyme SDK
import { Lapyme } from "lapyme";
const lapyme = new Lapyme({
bearerAuth: process.env["LAPYME_API_KEY"] ?? "",
});
const purchaseOrder = await lapyme.purchaseOrders.getPurchaseOrderById({
purchaseOrderId: "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
});{
"request_id": "<string>",
"data": {
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_number": 123,
"formatted_order_number": "<string>",
"order_date": "2023-12-25",
"expected_date": "2023-12-25",
"currency": "<string>",
"supplier": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"email": "<string>",
"phone": "<string>",
"tax_id_type": "<string>",
"tax_id": "<string>",
"tax_category": "<string>",
"payment_term_id": "<string>",
"address": "<string>",
"apartment": "<string>",
"city": "<string>",
"province": "<string>",
"postal_code": "<string>"
},
"warehouse": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"notes": "<string>",
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ordered_quantity": 123,
"received_quantity": 123,
"expected_unit_cost": 1,
"product": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"sku": "<string>",
"variant_options": {},
"option_names": [
"<string>"
]
}
}
]
}
}Authorizations
Incluí tu API key en el header Authorization con el prefijo Bearer.
Path Parameters
ID de la orden de compra
Was this page helpful?
⌘I

