Factorizer/Cluster ERP WikiCluster ERP Türkçe
Home / API reference

API

Procurement API: Substitution groups endpoints (substitution_groups)

HTTP endpoints of the substitution_groups sub-module of procurement: 10 routes with permissions, schemas, status codes, and error codes.

This page lists the 10 endpoints of the substitution_groups sub-module of the procurement module, under /api/v1/procurement. Scope: Substitution groups, a read by product, and group members. The module entry page is Procurement API.

Group facts

Item Value Source
Base path /api/v1/procurement src/cluster_erp/core/module_base.py:37-38, src/cluster_erp/modules/procurement/module.py:70
Routers 1 router objects in 1 files; listed in the section Endpoints src/cluster_erp/modules/procurement/module.py:35
Endpoints 10, counted from the route decorators and add_api_route calls of the routers that register_routes mounts src/cluster_erp/modules/procurement/substitution_groups/routes.py
Authentication Bearer header or session cookie, resolved by get_current_user; see Authentication and headers src/cluster_erp/modules/auth/guards.py:85-167
Permission guard 10 of 10 routes declare require_permission src/cluster_erp/modules/auth/guards.py:205-240
App entitlement gate require_app("procurement") on every mounted router src/cluster_erp/modules/procurement/module.py:82
Error format JSON body {"error": {...}}; see Errors src/cluster_erp/server/error_handler.py:33-46

Endpoints

Method Path Handler Permission Request Query Response Status Source
GET /api/v1/procurement/substitution-groups/ list_substitution_groups substitution_group.read none search, is_active, limit, offset dict 200 (default) src/cluster_erp/modules/procurement/substitution_groups/routes.py:30
POST /api/v1/procurement/substitution-groups/ create_substitution_group substitution_group.create SubstitutionGroupCreate none SubstitutionGroupRead 201 src/cluster_erp/modules/procurement/substitution_groups/routes.py:56
GET /api/v1/procurement/substitution-groups/by-product/{product_id} get_groups_by_product substitution_group.read none none list[SubstitutionGroupRead] 200 (default) src/cluster_erp/modules/procurement/substitution_groups/routes.py:68
POST /api/v1/procurement/substitution-groups/bulk-delete bulk_delete_substitution_groups substitution_group.bulk_delete BulkDeleteRequest none BulkDeleteResponse 200 (default) src/cluster_erp/modules/procurement/substitution_groups/routes.py:80
GET /api/v1/procurement/substitution-groups/{group_id} get_substitution_group substitution_group.read none none SubstitutionGroupRead 200 (default) src/cluster_erp/modules/procurement/substitution_groups/routes.py:92
PUT /api/v1/procurement/substitution-groups/{group_id} update_substitution_group substitution_group.update SubstitutionGroupUpdate none SubstitutionGroupRead 200 (default) src/cluster_erp/modules/procurement/substitution_groups/routes.py:106
DELETE /api/v1/procurement/substitution-groups/{group_id} delete_substitution_group substitution_group.delete none none none 204 src/cluster_erp/modules/procurement/substitution_groups/routes.py:119
POST /api/v1/procurement/substitution-groups/{group_id}/members add_member substitution_group.create SubstitutionMemberCreate none SubstitutionMemberRead 201 src/cluster_erp/modules/procurement/substitution_groups/routes.py:131
PUT /api/v1/procurement/substitution-groups/{group_id}/members/{member_id} update_member substitution_group.update SubstitutionMemberUpdate none SubstitutionMemberRead 200 (default) src/cluster_erp/modules/procurement/substitution_groups/routes.py:148
DELETE /api/v1/procurement/substitution-groups/{group_id}/members/{member_id} remove_member substitution_group.delete none none none 204 src/cluster_erp/modules/procurement/substitution_groups/routes.py:165

Error codes

The table lists the error codes that code under src/cluster_erp/modules/procurement/substitution_groups/ raises, found by a syntax-tree scan for AppError(...), the factories in src/cluster_erp/core/errors.py (not_found, conflict, protected, permission_denied, privilege_escalation, check_version), and HTTPException(...). A status of 400 is the AppError default (src/cluster_erp/core/errors.py:23). Guard errors (401, 403), the entitlement codes, and validation errors (422) apply to every route and are listed on Errors.

Code HTTP status Raised in First site
CONCURRENCY_VERSION_CONFLICT 409 services src/cluster_erp/modules/procurement/substitution_groups/services.py:159
RESOURCE_NOT_FOUND 404 routes, services src/cluster_erp/modules/procurement/substitution_groups/routes.py:102
SUBSTITUTION_GROUP_DUPLICATE_PRODUCT 409 services src/cluster_erp/modules/procurement/substitution_groups/services.py:221
SUBSTITUTION_GROUP_SINGLE_MEMBER 400 services src/cluster_erp/modules/procurement/substitution_groups/services.py:317

Verified against commit 92f8051 on 2026-11-13.

Verified against commit 92f8051 · 2026-11-13