The Price List Groups API manages commercial price list groupings per sub-region. Each record in GOAL mirrors gproc.price_list_groups in SAP Business One (SB1): region/sub-region (via territory codes), unit price list, and optional pack price list. After ERP sync, the SB1 row id is stored in remote_id.
/v1/inventory/master/price-list-groupsApp\Http\Controllers\V1\Backend\Inventory\Master\PriceListGroupControllerDomain\Inventory\Master\PriceListGroup\Actions\*, Domain\Sync\Master\ImportPriceListGroupsFromSb1ActionApp\Models\Inventory\Master\PriceListGroup (price_list_groups on goal-data-db)gproc.price_list_groups via App\Models\SB1\GProc\GProcPriceListGroupAuthorization: Bearer <jwt-token>
x-app-stage: <stage-identifier>
x-app-uid: <application-uuid>
Content-Type: application/json
Accept: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
companyId / company_id |
integer |
Yes | Company context (company-validator). |
| Method | Endpoint | Description |
|---|---|---|
GET |
/v1/inventory/master/price-list-groups |
List groups (search, sort, view) |
POST |
/v1/inventory/master/price-list-groups |
Create group |
GET |
/v1/inventory/master/price-list-groups/{id} |
Show group |
PUT |
/v1/inventory/master/price-list-groups/{id} |
Update group |
DELETE |
/v1/inventory/master/price-list-groups/{id} |
Soft delete |
PUT |
/v1/inventory/master/price-list-groups/{id}/restore |
Restore soft-deleted group |
POST |
/v1/inventory/master/price-list-groups/sync-to-erp |
Bulk push selected groups to SB1 |
POST |
/v1/inventory/master/price-list-groups/import-from-sb1 |
Import/backfill from gproc.price_list_groups |
Path parameter {id} accepts the numeric primary key or the record uuid.
Legacy consumer: GET /v1/inventory/price-lists/groups still lists groups from GOAL (same data).
| Field | Type | Required | Description |
|---|---|---|---|
company_id |
integer |
Yes | Company id |
name |
string |
Yes | Display name |
region_territory_id |
integer |
Yes | Territory level 1 FK |
sub_region_territory_id |
integer |
Yes | Territory level 2 FK (child of region) |
unit_price_list_id |
integer |
Yes | GOAL price_lists.id (uses remote_id on ERP sync) |
pack_price_list_id |
integer |
No | Optional pack list |
status |
string |
No | A / I |
POST /v1/inventory/master/price-list-groups/sync-to-erp
{
"companyId": 1,
"priceListGroupIds": [12, 15]
}
Snake case price_list_group_ids is also accepted.
region_id / sub_region_id by territory code (L1/L2).unit_price_list / pack_price_list from linked GOAL price lists’ remote_id.remote_id is null; update when set.remote_id with the SB1 gproc.price_list_groups.id.200 OK (ActionResult){
"success": true,
"message": "Sincronización de grupos completada: 1 creados, 1 actualizados",
"data": {
"created": 1,
"updated": 1,
"errors": [],
"sync": {}
}
}
POST /v1/inventory/master/price-list-groups/import-from-sb1
Body: { "company_id": 1 }
Matches territories by SB1 region/sub-region codes, price lists by remote_id, upserts by sub_region_territory_id, sets remote_id from SB1 id.
| Code | When |
|---|---|
200 |
Success |
201 |
Created |
400 |
Validation / sync failures |
401 |
Unauthorized |
404 |
Not found |
422 |
Validation errors |
500 |
Server error |