Price Lists
Per-item selling/purchase price overrides, grouped into named lists.
GET
/api/v1/price-listsList price lists
Scope:
priceLists.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | number | Optional | 1-based page number. |
limit | query | number | Optional | Page size, max 200. |
q | query | string | Optional | Free-text search on name. |
Example request
curl "https://invoice.avscorp.in/api/v1/price-lists" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2price0000qzrm1p5x8n2a",
"organizationId": "clx0org000000000000000001",
"name": "Retail Selling Price List",
"type": "SELLING",
"description": "Standard MRP-based selling price list",
"isActive": true,
"isDefault": true,
"effectiveFrom": "2026-01-01T00:00:00.000Z",
"effectiveTo": null,
"createdAt": "2026-01-01T09:15:00.000Z",
"updatedAt": "2026-01-01T09:15:00.000Z"
}Possible errors: unauthorized, insufficient_scope, forbidden
POST
/api/v1/price-listsCreate a price list
Scope:
priceLists.createRequest body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | Required | min length 1; max length 150 |
type | string | Required | one of: SELLING, PURCHASE |
description | any | Optional | — |
isActive | boolean | Optional | default true |
isDefault | boolean | Optional | default false |
effectiveFrom | any | Optional | — |
effectiveTo | any | Optional | — |
entries | array | Optional | — |
Example request
curl -X POST "https://invoice.avscorp.in/api/v1/price-lists" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Retail Selling Price List",
"type": "SELLING",
"entries": [
{
"itemId": "clx3itm000000000000000001",
"rate": 499.5
}
]
}'Example response
JSON
{
"id": "clx2price0000qzrm1p5x8n2a",
"organizationId": "clx0org000000000000000001",
"name": "Retail Selling Price List",
"type": "SELLING",
"description": "Standard MRP-based selling price list",
"isActive": true,
"isDefault": true,
"effectiveFrom": "2026-01-01T00:00:00.000Z",
"effectiveTo": null,
"createdAt": "2026-01-01T09:15:00.000Z",
"updatedAt": "2026-01-01T09:15:00.000Z",
"entries": [
{
"id": "clx2entry0000qzrmabcd1234",
"organizationId": "clx0org000000000000000001",
"priceListId": "clx2price0000qzrm1p5x8n2a",
"itemId": "clx3itm000000000000000001",
"itemVariantId": null,
"rate": 499.5,
"createdAt": "2026-01-01T09:15:00.000Z",
"updatedAt": "2026-01-01T09:15:00.000Z"
}
]
}Possible errors: unauthorized, insufficient_scope, forbidden, validation_error
GET
/api/v1/price-lists/{id}Get a price list
Scope:
priceLists.readParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Price list ID. |
Example request
curl "https://invoice.avscorp.in/api/v1/price-lists/clx2price0000qzrm1p5x8n2a" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"id": "clx2price0000qzrm1p5x8n2a",
"organizationId": "clx0org000000000000000001",
"name": "Retail Selling Price List",
"type": "SELLING",
"description": "Standard MRP-based selling price list",
"isActive": true,
"isDefault": true,
"effectiveFrom": "2026-01-01T00:00:00.000Z",
"effectiveTo": null,
"createdAt": "2026-01-01T09:15:00.000Z",
"updatedAt": "2026-01-01T09:15:00.000Z",
"entries": [
{
"id": "clx2entry0000qzrmabcd1234",
"organizationId": "clx0org000000000000000001",
"priceListId": "clx2price0000qzrm1p5x8n2a",
"itemId": "clx3itm000000000000000001",
"itemVariantId": null,
"rate": 499.5,
"createdAt": "2026-01-01T09:15:00.000Z",
"updatedAt": "2026-01-01T09:15:00.000Z"
}
]
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found
PATCH
/api/v1/price-lists/{id}Update a price list
Scope:
priceLists.updatePATCH validates against the full price list schema (same as create) — name and type are required in every update, not just changed fields.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Price list ID. |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | Required | min length 1; max length 150 |
type | string | Required | one of: SELLING, PURCHASE |
description | any | Optional | — |
isActive | boolean | Optional | default true |
isDefault | boolean | Optional | default false |
effectiveFrom | any | Optional | — |
effectiveTo | any | Optional | — |
entries | array | Optional | — |
Example request
curl -X PATCH "https://invoice.avscorp.in/api/v1/price-lists/clx2price0000qzrm1p5x8n2a" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Retail Selling Price List",
"type": "SELLING",
"isDefault": true
}'Example response
JSON
{
"id": "clx2price0000qzrm1p5x8n2a",
"organizationId": "clx0org000000000000000001",
"name": "Retail Selling Price List",
"type": "SELLING",
"description": "Standard MRP-based selling price list",
"isActive": true,
"isDefault": true,
"effectiveFrom": "2026-01-01T00:00:00.000Z",
"effectiveTo": null,
"createdAt": "2026-01-01T09:15:00.000Z",
"updatedAt": "2026-01-01T09:15:00.000Z",
"entries": [
{
"id": "clx2entry0000qzrmabcd1234",
"organizationId": "clx0org000000000000000001",
"priceListId": "clx2price0000qzrm1p5x8n2a",
"itemId": "clx3itm000000000000000001",
"itemVariantId": null,
"rate": 499.5,
"createdAt": "2026-01-01T09:15:00.000Z",
"updatedAt": "2026-01-01T09:15:00.000Z"
}
]
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found, validation_error
DELETE
/api/v1/price-lists/{id}Delete a price list
Scope:
priceLists.deleteParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Required | Price list ID. |
Example request
curl -X DELETE "https://invoice.avscorp.in/api/v1/price-lists/clx2price0000qzrm1p5x8n2a" \
-H "Authorization: Bearer YOUR_API_KEY"Example response
JSON
{
"deleted": true
}Possible errors: unauthorized, insufficient_scope, forbidden, not_found