Price Lists

Per-item selling/purchase price overrides, grouped into named lists.

GET/api/v1/price-lists

List price lists

Scope: priceLists.read

Parameters

NameInTypeRequiredDescription
pagequerynumberOptional1-based page number.
limitquerynumberOptionalPage size, max 200.
qquerystringOptionalFree-text search on name.

Example request

curl "https://pre-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-lists

Create a price list

Scope: priceLists.create

Request body

FieldTypeRequiredConstraints
namestringRequiredmin length 1; max length 150
typestringRequiredone of: SELLING, PURCHASE
descriptionanyOptional—
isActivebooleanOptionaldefault true
isDefaultbooleanOptionaldefault false
effectiveFromanyOptional—
effectiveToanyOptional—
entriesarrayOptional—

Example request

curl -X POST "https://pre-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.read

Parameters

NameInTypeRequiredDescription
idpathstringRequiredPrice list ID.

Example request

curl "https://pre-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.update

PATCH validates against the full price list schema (same as create) — name and type are required in every update, not just changed fields.

Parameters

NameInTypeRequiredDescription
idpathstringRequiredPrice list ID.

Request body

FieldTypeRequiredConstraints
namestringRequiredmin length 1; max length 150
typestringRequiredone of: SELLING, PURCHASE
descriptionanyOptional—
isActivebooleanOptionaldefault true
isDefaultbooleanOptionaldefault false
effectiveFromanyOptional—
effectiveToanyOptional—
entriesarrayOptional—

Example request

curl -X PATCH "https://pre-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.delete

Parameters

NameInTypeRequiredDescription
idpathstringRequiredPrice list ID.

Example request

curl -X DELETE "https://pre-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