Create a vendor product
Módulo Procurement
POST/vendor-productsvendorProducts.create
A product a vendor offers, optionally bound to an element. Creates a vendor product. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.
- Requiere la capacidad procurement.catalog.write.
- Alcances de OAuth: procurement.
- Envía el encabezado Idempotency-Key. Una repetición con la misma clave devuelve la respuesta original.
- Estados de error: 400, 401, 409, 422, 429. Los errores son detalles de problema RFC 9457.
Cuerpo de la solicitud: VendorProductCreate
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| vendor_id | string (uuid) | Sí | Identifier of the vendor. |
| element_id | ItemId | No | Catalog item identifier `{URID}-{ORG}-{SEQ}` (Section 3.6).Restricciones: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}-[A-Z0-9]+-[0-9]+$ |
| unit_price_minor | integer (int64) | null | No | List unit price. Integer minor units of the resource currency; null means unpriced, never zero. |
| currency_code | string | null | No | ISO 4217 currency code of every money field.Restricciones: pattern ^[A-Z]{3}$ |
| vendor_sku | string | Sí | The vendor's product identifier.Restricciones: length 1 to 100 |
| catalog_binding_id | string (uuid) | null | No | Identifier of the catalog item the product fulfills. |
| lead_time_days | integer | null | No | Days from order to delivery.Restricciones: range 0 to any |
{
"vendor_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"unit_price_minor": 4500,
"currency_code": "USD",
"vendor_sku": "DSS-DECK-0408",
"catalog_binding_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"lead_time_days": 14
}Respuesta 201: VendorProduct
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| id | string (uuid) | Sí | Identifier of the vendor product. |
| org_id | string (uuid) | Sí | Identifier of the owning organization, derived from the parent row and never accepted from the caller. |
| created_at | string (date-time) | Sí | When the row was created. |
| created_by | string (uuid) | null | Sí | Identifier of the person who created the row; null when a seed, platform or system process created it. |
| updated_at | string (date-time) | Sí | When the row was last updated. |
| updated_by | string (uuid) | null | Sí | Identifier of the person who last updated the row; null when a seed, platform or system process updated it. |
| vendor_id | string (uuid) | Sí | Identifier of the vendor. |
| element_id | ItemId | Sí | Catalog item identifier `{URID}-{ORG}-{SEQ}` (Section 3.6).Restricciones: pattern ^[0-9]000\.[0-9]{2}\.[0-9]{2}-[A-Z0-9]+-[0-9]+$ |
| unit_price_minor | integer (int64) | null | Sí | List unit price. Integer minor units of the resource currency; null means unpriced, never zero. |
| currency_code | string | null | Sí | ISO 4217 currency code of every money field.Restricciones: pattern ^[A-Z]{3}$ |
| vendor_sku | string | Sí | The vendor's product identifier.Restricciones: length 1 to 100 |
| catalog_binding_id | string (uuid) | null | Sí | Identifier of the catalog item the product fulfills. |
| lead_time_days | integer | null | Sí | Days from order to delivery.Restricciones: range 0 to any |
{
"id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"org_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"created_at": "2026-10-08T14:30:00Z",
"created_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"updated_at": "2026-10-08T14:30:00Z",
"updated_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"vendor_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"element_id": "4000.01.01-XPMS-001",
"unit_price_minor": 4500,
"currency_code": "USD",
"vendor_sku": "DSS-DECK-0408",
"catalog_binding_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"lead_time_days": 14
}Ejemplos de código
curl -X POST "$XOS_BASE_URL/vendor-products" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"vendor_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","unit_price_minor":4500,"currency_code":"USD","vendor_sku":"DSS-DECK-0408","catalog_binding_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","lead_time_days":14}'const { data } = await xos.vendorProducts.create({
"vendor_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"unit_price_minor": 4500,
"currency_code": "USD",
"vendor_sku": "DSS-DECK-0408",
"catalog_binding_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"lead_time_days": 14
});response = xos.vendor_products.create({"vendor_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "unit_price_minor": 4500, "currency_code": "USD", "vendor_sku": "DSS-DECK-0408", "catalog_binding_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "lead_time_days": 14})xos vendor-products create --data '{"vendor_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","unit_price_minor":4500,"currency_code":"USD","vendor_sku":"DSS-DECK-0408","catalog_binding_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","lead_time_days":14}'