API reference

Products

On this page

Products with their sizes, prices and stock. A product made through the API starts as a draft unless it is complete and you ask to publish it. Nothing is deleted: removing a product archives it, and it can be restored in the admin. Stock and order amounts are never accepted here.

The product object#

The fields marked expand=full are only included when you add ?expand=full to the read calls. Answers to writes and webhooks always include them.

FieldTypeIncludedMeaning
idintegerAlwaysThe product id. Ids never change and are never reused.
skustring or nullAlwaysThe product SKU. null when the product has none.
namestringAlwaysThe product name.
slugstringAlwaysThe web address part of the product page.
activebooleanAlwaystrue when the product is published. false for a draft or an archived product (status tells which).
categorystring or nullAlwaysThe name of the category.
urlstringAlwaysThe address of the product page in the shop.
shortstring or nullAlwaysThe short description.
imagesarrayAlwaysAddresses of the product pictures.
variantsarrayAlwaysThe sizes of the product.
variants[].idintegerAlwaysThe size id.
variants[].labelstringAlwaysThe size label, for example "250 g".
variants[].priceintegerAlwaysSelling price, in whole units of the store's currency.
variants[].mrpintegerAlwaysMRP, in whole units of the store's currency.
variants[].stockintegerAlwaysUnits available to sell. Read only: stock changes only through stock adjustments.
statusstringexpand=fullpublished, draft or archived.
category_idinteger or nullexpand=fullThe category id.
hsnstring or nullexpand=fullHSN code used on GST invoices.
gst_ratenumber or nullexpand=fullGST rate in percent. null means the store default applies.
sortintegerexpand=fullPosition in lists (lower first).
created_atstringexpand=fullWhen the product was created (ISO 8601, UTC).
updated_atstringexpand=fullWhen the product was last changed (ISO 8601, UTC).
descriptionstringexpand=fullThe description as plain text.

List products#

GET/api/v1/productsread:products

Products with their sizes (variants), prices and stock, in id order. Drafts and archived products are included (see the active field, or use expand=full for status). The default answer is exactly the one this API has always given; expand=full adds fields.

Query parameters

NameTypeMeaning
skustringOnly the product with this SKU.
statusstringpublished, draft or archived.
One of: published, draft, archived
category_idintegerOnly products in this category.
expandstringfull: add status, category_id, hsn, gst_rate, sort, created_at, updated_at and description.
One of: full
limitintegerRows per page, 1 to 100 (default 25). per_page works too.
pageintegerPage number, starting at 1.
updated_sincestringOnly rows changed at or after this time (ISO 8601, for example 2026-11-21T10:00:00Z, or a date).

Example request

curl -s "https://yourstore.example.com/api/v1/products?status=published&expand=full&limit=25" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example answer (200 OK)

{
    "data": [
        {
            "id": 7,
            "sku": "SAMPLE-001",
            "name": "Sample Product",
            "slug": "sample-product",
            "active": false,
            "category": "Sample Category",
            "url": "https://example.com/product/sample-product",
            "short": "A short description of the product.",
            "images": [
                "https://example.com/img/products/sample-product.jpg"
            ],
            "variants": [
                {
                    "id": 31,
                    "label": "250 g",
                    "price": 399,
                    "mrp": 449,
                    "stock": 120
                },
                {
                    "id": 32,
                    "label": "500 g",
                    "price": 749,
                    "mrp": 849,
                    "stock": 60
                }
            ]
        }
    ],
    "meta": {
        "page": 1,
        "per_page": 25,
        "total": 1,
        "last_page": 1
    },
    "links": {
        "first": "https://yourstore.example.com/api/v1/products?page=1",
        "last": "https://yourstore.example.com/api/v1/products?page=1",
        "prev": null,
        "next": null
    }
}

Errors

StatusCodeWhen
401missing_api_key, invalid_api_key, revoked_api_key, expired_api_keyThe key is missing, not valid, revoked or expired.
403insufficient_scopeThe key does not have the read:products scope. error.required_scope names it. (api_key_disabled and ip_not_allowed also give 403.)
422validation_failedupdated_since could not be read as a date or time.
429rate_limitedMore requests than the key's limit in a minute. Wait for Retry-After.

Example error answer (403):

{
    "error": {
        "code": "insufficient_scope",
        "message": "This API key does not have the \"read:products\" scope. Add it to the key in the admin (API & webhooks > API keys), or use a key that has it.",
        "required_scope": "read:products"
    }
}

Get a product#

GET/api/v1/products/{id}read:products

One product by id. Add expand=full for the extra fields (status, category_id, hsn, gst_rate, sort, dates and the description text).

Address parameters

NameTypeMeaning
idintegerThe product id (a whole number).

Query parameters

NameTypeMeaning
expandstringfull: add status, category_id, hsn, gst_rate, sort, created_at, updated_at and description.
One of: full

Example request

curl -s "https://yourstore.example.com/api/v1/products/7?expand=full" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example answer (200 OK)

{
    "data": {
        "id": 7,
        "sku": "SAMPLE-001",
        "name": "Sample Product",
        "slug": "sample-product",
        "active": false,
        "category": "Sample Category",
        "url": "https://example.com/product/sample-product",
        "short": "A short description of the product.",
        "images": [
            "https://example.com/img/products/sample-product.jpg"
        ],
        "variants": [
            {
                "id": 31,
                "label": "250 g",
                "price": 399,
                "mrp": 449,
                "stock": 120
            },
            {
                "id": 32,
                "label": "500 g",
                "price": 749,
                "mrp": 849,
                "stock": 60
            }
        ]
    },
    "meta": {}
}

Errors

StatusCodeWhen
401missing_api_key, invalid_api_key, revoked_api_key, expired_api_keyThe key is missing, not valid, revoked or expired.
403insufficient_scopeThe key does not have the read:products scope. error.required_scope names it. (api_key_disabled and ip_not_allowed also give 403.)
404not_foundThat product does not exist.
429rate_limitedMore requests than the key's limit in a minute. Wait for Retry-After.

Example error answer (403):

{
    "error": {
        "code": "insufficient_scope",
        "message": "This API key does not have the \"read:products\" scope. Add it to the key in the admin (API & webhooks > API keys), or use a key that has it.",
        "required_scope": "read:products"
    }
}

Create a product#

POST/api/v1/productswrite:products

Creates a product as a DRAFT, the same as the product import does. Send published: true to publish it at once: that only works when the product passes the import's checks (valid HSN, no duplicate size, a price above zero and a price not above the MRP). Stock cannot be sent: new sizes start at 0 and are filled with POST /inventory/adjustments.

The answer is the full product. If some points did not stop the product from being created, they are listed in meta.warnings.

Send published: true only when the product is complete. If it is not, nothing is created and you get 422 cannot_publish with the points to fix.

Request body (JSON)

FieldTypeRequiredLimitsMeaning
namestringYesat most 190 charactersProduct name.
Example: Sample Product
skustring or nullNoat most 100 charactersProduct SKU (unique).
Example: SAMPLE-001
slugstring or nullNoat most 190 charactersWeb address part. Made from the name when left out; a number is added if it is taken.
Example: sample-product
category_idinteger or nullNoCategory id (see GET /categories). Left out: the General category. An archived category is refused.
Example: 3
shortstring or nullNoat most 2000 charactersShort description.
Example: A short description of the product.
descriptionstring or nullNoat most 20000 charactersDescription. Blank lines make paragraphs; HTML is cleaned.
Example: A longer description of the product.
hsnstring or nullNoat most 8 charactersHSN code for GST invoices: exactly 4, 6 or 8 digits. A 7-digit code is refused (a leading zero was probably lost): send 01234567, not 1234567.
Example: 01234567
gst_ratenumber or nullNo0 to 40GST rate in percent (for example 5 or 18). Left empty: the store default applies.
Example: 5
sortinteger or nullNo0 to 100000Position in lists (lower first).
Example: 10
publishedbooleanNofalse (default): create as a draft. true: publish now (only if the product is complete).
Example: false
variantsarrayYes1 to 50 itemsThe sizes (at least one). Each: label, price, mrp, sku, weight_grams.
variants[].labelstringYesat most 100 charactersSize label, for example "250 g".
Example: 250 g
variants[].priceintegerYesat least 0Selling price in whole units of the store's currency.
Example: 399
variants[].mrpintegerYesat least 0MRP (the printed maximum price) in whole units of the store's currency.
Example: 449
variants[].skustring or nullNoat most 100 charactersSKU of this size (unique). Used by POST /inventory/adjustments.
Example: SAMPLE-001-250
variants[].weight_gramsinteger or nullNo0 to 1000000Shipping weight in grams.
Example: 250

Any field not listed here is refused with 422. Send an Idempotency-Key header so a retry is safe (see Requests).

Example request

curl -s -X POST "https://yourstore.example.com/api/v1/products" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 6f1c0b3e-0d5a-4a52-9d5e-1f6c2a7b9e10" \
  -d '{
    "name": "Sample Product",
    "sku": "SAMPLE-001",
    "category_id": 3,
    "hsn": "01234567",
    "gst_rate": 5,
    "short": "A short description of the product.",
    "variants": [
        {
            "label": "250 g",
            "price": 399,
            "mrp": 449,
            "sku": "SAMPLE-001-250",
            "weight_grams": 250
        }
    ]
}'

Example answer (201 Created)

{
    "data": {
        "id": 7,
        "sku": "SAMPLE-001",
        "name": "Sample Product",
        "slug": "sample-product",
        "active": false,
        "category": "Sample Category",
        "url": "https://example.com/product/sample-product",
        "short": "A short description of the product.",
        "images": [
            "https://example.com/img/products/sample-product.jpg"
        ],
        "variants": [
            {
                "id": 31,
                "label": "250 g",
                "price": 399,
                "mrp": 449,
                "stock": 120
            },
            {
                "id": 32,
                "label": "500 g",
                "price": 749,
                "mrp": 849,
                "stock": 60
            }
        ],
        "status": "draft",
        "category_id": 3,
        "hsn": "01234567",
        "gst_rate": 5,
        "sort": 10,
        "created_at": "2026-11-01T09:00:00Z",
        "updated_at": "2026-11-21T10:00:00Z",
        "description": "A longer description of the product."
    },
    "meta": {}
}

Errors

StatusCodeWhen
401missing_api_key, invalid_api_key, revoked_api_key, expired_api_keyThe key is missing, not valid, revoked or expired.
403insufficient_scopeThe key does not have the write:products scope. error.required_scope names it. (api_key_disabled and ip_not_allowed also give 403.)
422validation_failedA field is missing or wrong. error.fields says which and why.
422cannot_publishThe product failed the import's checks, so it was not published.
409idempotency_key_reuse, idempotency_in_progressThe Idempotency-Key was used for a different request, or the first request with it is still running.
429rate_limitedMore requests than the key's limit in a minute. Wait for Retry-After.

Example error answer (422):

{
    "error": {
        "code": "validation_failed",
        "message": "The request could not be accepted. See \"fields\" for what to fix.",
        "fields": {
            "name": [
                "The name field is required."
            ]
        }
    }
}

Update a product#

PATCH/api/v1/products/{id}write:products

Changes only the fields you send. active: true publishes the product (an archived product cannot be published; weight is set on each size, see the variants endpoints). Stock and the payment or order amounts are never accepted here.

Only the fields you send are changed. The answer is the full product.

Weight is set on each size, not on the product: see PATCH /products/{id}/variants/{variantId}.

Address parameters

NameTypeMeaning
idintegerThe product id (a whole number).

Request body (JSON)

FieldTypeRequiredLimitsMeaning
namestringNoat most 190 charactersProduct name.
Example: Sample Product
category_idinteger or nullNoCategory id (see GET /categories). Left out: the General category. An archived category is refused.
Example: 3
shortstring or nullNoat most 2000 charactersShort description.
Example: A short description of the product.
descriptionstring or nullNoat most 20000 charactersDescription. Blank lines make paragraphs; HTML is cleaned.
Example: A longer description of the product.
hsnstring or nullNoat most 8 charactersHSN code for GST invoices: exactly 4, 6 or 8 digits. A 7-digit code is refused (a leading zero was probably lost): send 01234567, not 1234567.
Example: 01234567
gst_ratenumber or nullNo0 to 40GST rate in percent (for example 5 or 18). Left empty: the store default applies.
Example: 5
sortinteger or nullNo0 to 100000Position in lists (lower first).
Example: 10
activebooleanNotrue: publish. false: set back to draft.
Example: true

Any field not listed here is refused with 422. Send an Idempotency-Key header so a retry is safe (see Requests).

Example request

curl -s -X PATCH "https://yourstore.example.com/api/v1/products/7" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 6f1c0b3e-0d5a-4a52-9d5e-1f6c2a7b9e10" \
  -d '{
    "gst_rate": 5,
    "hsn": "01234567",
    "active": true
}'

Example answer (200 OK)

{
    "data": {
        "id": 7,
        "sku": "SAMPLE-001",
        "name": "Sample Product",
        "slug": "sample-product",
        "active": false,
        "category": "Sample Category",
        "url": "https://example.com/product/sample-product",
        "short": "A short description of the product.",
        "images": [
            "https://example.com/img/products/sample-product.jpg"
        ],
        "variants": [
            {
                "id": 31,
                "label": "250 g",
                "price": 399,
                "mrp": 449,
                "stock": 120
            },
            {
                "id": 32,
                "label": "500 g",
                "price": 749,
                "mrp": 849,
                "stock": 60
            }
        ],
        "status": "draft",
        "category_id": 3,
        "hsn": "01234567",
        "gst_rate": 5,
        "sort": 10,
        "created_at": "2026-11-01T09:00:00Z",
        "updated_at": "2026-11-21T10:00:00Z",
        "description": "A longer description of the product."
    },
    "meta": {}
}

Errors

StatusCodeWhen
401missing_api_key, invalid_api_key, revoked_api_key, expired_api_keyThe key is missing, not valid, revoked or expired.
403insufficient_scopeThe key does not have the write:products scope. error.required_scope names it. (api_key_disabled and ip_not_allowed also give 403.)
404not_foundThat product does not exist.
422validation_failedA field is missing or wrong. error.fields says which and why.
422product_archivedAn archived product cannot be published through the API.
422cannot_publishThe product failed the import's checks, so it was not published.
409idempotency_key_reuse, idempotency_in_progressThe Idempotency-Key was used for a different request, or the first request with it is still running.
429rate_limitedMore requests than the key's limit in a minute. Wait for Retry-After.

Example error answer (422):

{
    "error": {
        "code": "validation_failed",
        "message": "The request could not be accepted. See \"fields\" for what to fix.",
        "fields": {
            "name": [
                "The name field is required."
            ]
        }
    }
}

Archive a product#

DELETE/api/v1/products/{id}write:products

Archives the product: it disappears from the shop but stays in the admin and on old orders, and can be restored there. Nothing is ever deleted through the API.

The answer is the archived product. To bring it back, restore it from the archive in the admin.

Address parameters

NameTypeMeaning
idintegerThe product id (a whole number).

Example request

curl -s -X DELETE "https://yourstore.example.com/api/v1/products/7" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example answer (200 OK)

{
    "data": {
        "id": 7,
        "sku": "SAMPLE-001",
        "name": "Sample Product",
        "slug": "sample-product",
        "active": false,
        "category": "Sample Category",
        "url": "https://example.com/product/sample-product",
        "short": "A short description of the product.",
        "images": [
            "https://example.com/img/products/sample-product.jpg"
        ],
        "variants": [
            {
                "id": 31,
                "label": "250 g",
                "price": 399,
                "mrp": 449,
                "stock": 120
            },
            {
                "id": 32,
                "label": "500 g",
                "price": 749,
                "mrp": 849,
                "stock": 60
            }
        ],
        "status": "draft",
        "category_id": 3,
        "hsn": "01234567",
        "gst_rate": 5,
        "sort": 10,
        "created_at": "2026-11-01T09:00:00Z",
        "updated_at": "2026-11-21T10:00:00Z",
        "description": "A longer description of the product."
    },
    "meta": {}
}

Errors

StatusCodeWhen
401missing_api_key, invalid_api_key, revoked_api_key, expired_api_keyThe key is missing, not valid, revoked or expired.
403insufficient_scopeThe key does not have the write:products scope. error.required_scope names it. (api_key_disabled and ip_not_allowed also give 403.)
404not_foundThat product does not exist.
429rate_limitedMore requests than the key's limit in a minute. Wait for Retry-After.

Example error answer (403):

{
    "error": {
        "code": "insufficient_scope",
        "message": "This API key does not have the \"write:products\" scope. Add it to the key in the admin (API & webhooks > API keys), or use a key that has it.",
        "required_scope": "write:products"
    }
}