Skip to main content

Crear órdenes de compra

El punto final POST /pic/link/purchase-orders/create le permite crear órdenes de compra (PO) generadas desde un sistema externo. 👔💼🤝

Authorización

Este endpoint requiere autenticación a través de Basic Auth con el nombre de usuario y contraseña del backend que lo consumirá. Para crear y configurar un backend, siga el tutorial de backends

Parámetros requeridos


Esta solicitud no contiene parámetros de tipo Path

Ejemplos

curl --location 'https://<identifier>.api.appliqloud.com/pic/link/purchase-orders/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <token>' \
--data '{
"inputs": [
{
"header": {
"purchaseOrderId": "450000001",
"purchaseOrderType": "IMPORT",
"accountingEntityId": "AE1",
"vendorBusinessPartnerId": "9715",
"currencyId": "MXN"
},
"items": [
{
"itemId": "10",
"itemType": "GOODS",
"ascriptionType": "INVENTORY",
"productGroupId": "1",
"productId": "101",
"locationId": "MX-LOC",
"storageId": "123123",
"requiredDeliveryDate": "2024-07-22",
"quantity": 5,
"unitId": "EA",
"netUnitPrice": 6000
}
]
}
]
}'

Respuestas


Las órdenes de compra fueron creadas exitosamente.

{
"success": [
{
"header": {
"purchaseOrderId": "450000001",
"purchaseOrderStatus": "OPEN",
"purchaseOrderType": "IMPORT",
"accountingEntityId": "AE1",
"vendorBusinessPartnerId": "9715",
"currencyId": "MXN",
"netTotalPrice": 6000.0
},
"items": [
{
"itemId": "10",
"itemType": "GOODS",
"ascriptionType": "EXPENSE",
"productGroupId": "1",
"productId": "101",
"locationId": "MX-LOC",
"storageId": "123123",
"requiredDeliveryDate": "2024-07-22",
"quantity": 5,
"unitId": "EA",
"netUnitPrice": 6000.0,
"netTotalPrice": 30000.0
}
]
}
],
"errors": []
}