The Price Lists API manages commercial price tiers, base lists, promotional pricing, currency denominations, and item price lines mapping to SAP Business One OPLN (Price Lists) and ITM1 (Price Lines).
/v1/inventory/price-lists
| Header | Type | Description |
|---|---|---|
Authorization |
string |
Bearer <token> OAuth2 token. |
x-app-stage |
string |
Current tenant stage (dev, staging, prod). |
x-app-uid |
string |
Authenticated user UUID. |
| Parameter | Type | Default | Description |
|---|---|---|---|
companyId |
integer |
Required | Active operating company ID. |
view |
string |
A |
State: A (Active), I (Inactive), D (Trashed), ALL. |
Retrieve all price lists configured for the company.
GET /v1/inventory/price-lists?companyId=1&view=A
200 OK{
"success": true,
"message": "Proceso realizado correctamente",
"data": [
{
"id": 1,
"company_id": 1,
"list_num": 1,
"name": "PRECIO BASE MAYORISTA",
"currency": "PEN",
"is_gross_price": true,
"sap_price_list_id": 1,
"status": "A",
"created_at": "2026-01-01T00:00:00.000Z"
},
{
"id": 2,
"company_id": 1,
"list_num": 2,
"name": "PRECIO CANAL TRADICIONAL BODEGAS",
"currency": "PEN",
"is_gross_price": true,
"sap_price_list_id": 2,
"status": "A",
"created_at": "2026-01-01T00:00:00.000Z"
}
]
}
GET /v1/inventory/price-lists/groups?companyId=1
GET /v1/inventory/price-lists/by-group/2?companyId=1
Returns all SAP Business One price list headers (OPLN) with optional GOAL linkage (goal_price_list_id, goal_name, linked_in_goal).
GET /v1/inventory/price-lists/sap-opln?companyId=1
200 OK{
"success": true,
"message": "Listas de precios SAP (OPLN)",
"data": [
{
"list_num": 10,
"list_name": "COSTO ICA NORTE",
"sell_list": "N",
"valid": "Y",
"report": "N",
"lista_pqt": "N",
"is_base": "N",
"base_list": 0,
"customer_list": 0,
"goal_price_list_id": 26,
"goal_name": "COSTO ICA NORTE",
"linked_in_goal": true
}
]
}
Returns SAP Business One price lists (OPLN) whose ListNum is not already linked to any GOAL price_lists.remote_id for the company.
GET /v1/inventory/price-lists/sap-unassigned?companyId=1
200 OK{
"success": true,
"message": "Listas SAP disponibles",
"data": [
{
"list_num": 42,
"list_name": "PRECIO REGION NORTE",
"sell_list": "Y"
}
]
}
Creates a GOAL price list header linked to SAP ListNum (remote_id). The SAP list number must be unique per company (DB unique index on (company_id, remote_id)).
Assignment modes (create only):
| Mode | Body | Behavior |
|---|---|---|
| Link existing SAP list | remote_id (int), create_in_sap omitted or false |
remote_id must appear in sap-unassigned for the company |
| Create in SAP B1 | create_in_sap: true, no remote_id |
Inserts OPLN, seeds ITM1 with Price = 0 for all OITM items, then saves GOAL row with new remote_id |
POST /v1/inventory/price-lists?companyId=1
Content-Type: application/json
{
"company_id": 1,
"name": "PRECIO REGION NORTE",
"remote_id": 42,
"type": "S",
"factor_codes": [{ "code": "PZA", "name": "Pieza" }],
"status": "A",
"assignable": true,
"auto_update": false,
"price_list_group_id": 12,
"region_territory_id": 4,
"sub_region_territory_id": 5
}
Optional price_list_group_id: when set, the API resolves region_territory_id and sub_region_territory_id from the price list group and sets territory_id to the sub-region territory id. Client-sent region/sub-region values are overwritten when a group id is provided.
{
"company_id": 1,
"name": "PRECIO REGION NORTE",
"create_in_sap": true,
"type": "S",
"factor_codes": [{ "code": "PZA", "name": "Pieza" }],
"status": "A",
"assignable": true,
"auto_update": false
}
201 CreatedStandard ActionResult with the created PriceList resource.
| Case | HTTP | Message (example) |
|---|---|---|
Duplicate remote_id for company |
400 |
El número de lista SAP ya está asignado a otra lista de precios |
remote_id not in unassigned SAP lists |
400 |
El número de lista SAP no está disponible o ya está asignado en GOAL |
Both remote_id and create_in_sap |
400 |
No envíe remote_id cuando create_in_sap es verdadero |
| SAP create failure | 400 |
Error al crear lista en SAP: … |
GET /v1/inventory/price-lists/1?companyId=1
Response includes optional grouping fields: price_list_group_id, price_list_group_name, region_territory_id, region_name, region_code, sub_region_territory_id, sub_region_name, sub_region_code, and territory_id (aligned with sub-region when a group is set).
PUT /v1/inventory/price-lists/{id}?companyId=1
Content-Type: application/json
Accepts the same optional price_list_group_id (and derived territory fields) as create. Send price_list_group_id: null with cleared region/sub-region ids to unlink.
Returns item unit prices for all SKUs within this price list.
GET /v1/inventory/price-lists/1/lines?companyId=1&search=PILSEN&limit=25
200 OK{
"success": true,
"data": [
{
"price_list_id": 1,
"product_id": 1042,
"sku": "CERV-PIL-355",
"product_name": "CERVEZA PILSEN CALLAO LATA 355ML",
"price": 38.50,
"currency": "PEN",
"unit_id": 2,
"unit_name": "SIXPACK",
"updated_at": "2026-10-05T12:00:00.000Z"
}
]
}
Synchronizes list headers from SAP Business One OPLN.
POST /v1/inventory/price-lists/sync?companyId=1
Triggers background synchronization of ITM1 prices for list {id}.
POST /v1/inventory/price-lists/1/sync-lines?companyId=1
Aborts an ongoing bulk synchronization job if needed.
POST /v1/inventory/price-lists/1/cancel-sync-lines?companyId=1
POST /v1/inventory/price-lists?companyId=1
Content-Type: application/json
{
"name": "PRECIO ESPECIAL DISTRIBUIDORES SUR",
"currency": "PEN",
"is_gross_price": true,
"base_price_list_id": 1,
"factor": 0.95
}
PUT /v1/inventory/price-lists/3?companyId=1
Content-Type: application/json
{
"name": "PRECIO ESPECIAL DISTRIBUIDORES SUR V2",
"factor": 0.94
}