Skip to main content

Product API

The Product API allows you to programmatically manage products in your EverShop store. This RESTful interface provides endpoints for creating, updating, retrieving, and deleting products.

Endpoints

Create a Product

Creates a new product in your EverShop store with the specified attributes.

Request Schema (application/json)
Field NameField TypeRequired
namestringNo
descriptionarray of objectNo
Field NameField TypeRequired
idstringYes
sizenumberYes
columnsarray of objectYes
Field NameField TypeRequired
idstringYes
sizenumberYes
dataobjectYes
short_descriptionstringNo
url_keystring (^\S+$)No
meta_titlestringNo
meta_descriptionstringNo
meta_keywordsstringNo
statusinteger or string or boolean (0, 1, '0', '1', true, false)No
skustringNo
pricestring or numberNo
weightstring or numberNo
qtystring or numberNo
tax_classstring or number or nullNo
manage_stockinteger or string or boolean (0, 1, '0', '1', true, false)No
stock_availabilityinteger or string or boolean (0, 1, '0', '1', true, false)No
group_idstring or integerNo
visibilityinteger or string or boolean (0, 1, '0', '1', true, false)No
imagesarray of stringNo
attributesarray of objectNo
Field NameField TypeRequired
attribute_codestringNo
valuestring or arrayNo
category_idstring or number or nullNo
optionsarray of objectNo
Field NameField TypeRequired
option_namestringYes
option_typestring (select, multiselect)Yes
is_requiredstring or integer (0, 1, '0', '1')No
valuesarray of objectYes
Field NameField TypeRequired
valuestringNo
extra_pricestring or numberNo
metafieldsobjectNo
duplicate_ofstringNo
POST/api/products
curl
-H "Accept: application/json"
-H "Authorization: Bearer <admin JWT token>"
--data-raw '<JSON DATA>'
https://<your domain>/api/products
Sample Of Response
{
"data": {
"product_id": 281,
"uuid": "99a7b39ca63211edb46b60d819134f39",
"variant_group_id": null,
"visibility": 1,
"group_id": 4,
"image": null,
"sku": "Q7Oq0kxZIMQ5isUyJRbg",
"price": 43,
"qty": 123,
"weight": 17,
"manage_stock": 1,
"stock_availability": 1,
"tax_class": null,
"status": 0,
"created_at": "2023-02-07 00:01:46",
"updated_at": "2023-02-07 00:01:46",
"product_description_id": 351,
"product_description_product_id": 281,
"name": "Q7Oq0kxZIMQ5isUyJRbg",
"description": null,
"short_description": null,
"url_key": "Q7Oq0kxZIMQ5isUyJRbg",
"meta_title": "Q7Oq0kxZIMQ5isUyJRbg",
"meta_description": null,
"meta_keywords": null,
"links": [
{
"rel": "productGrid",
"href": "/admin/products",
"action": "GET",
"types": [
"text/xml"
]
},
{
"rel": "view",
"href": "/product/99a7b39ca63211edb46b60d819134f39",
"action": "GET",
"types": [
"text/xml"
]
},
{
"rel": "edit",
"href": "/admin/products/edit/99a7b39ca63211edb46b60d819134f39",
"action": "GET",
"types": [
"text/xml"
]
}
]
}
}

Update a Product

Updates an existing product with new attribute values.

Request Schema (application/json)
Field NameField TypeRequired
namestringNo
descriptionarray of objectNo
Field NameField TypeRequired
idstringYes
sizenumberYes
columnsarray of objectYes
Field NameField TypeRequired
idstringYes
sizenumberYes
dataobjectYes
short_descriptionstringNo
url_keystring (^\S+$)No
meta_titlestringNo
meta_descriptionstringNo
meta_keywordsstringNo
statusinteger or string or boolean (0, 1, '0', '1', true, false)No
skustringNo
pricestring or numberNo
weightstring or numberNo
qtystring or numberNo
tax_classstring or number or nullNo
manage_stockinteger or string or boolean (0, 1, '0', '1', true, false)No
stock_availabilityinteger or string or boolean (0, 1, '0', '1', true, false)No
group_idstring or integerNo
visibilityinteger or string or boolean (0, 1, '0', '1', true, false)No
imagesarray of stringNo
attributesarray of objectNo
Field NameField TypeRequired
attribute_codestringNo
valuestring or arrayNo
category_idstring or number or nullNo
optionsarray of objectNo
Field NameField TypeRequired
option_namestringYes
option_typestring (select, multiselect)Yes
is_requiredstring or integer (0, 1, '0', '1')No
valuesarray of objectYes
Field NameField TypeRequired
valuestringNo
extra_pricestring or numberNo
metafieldsobjectNo
PATCH/api/products/433ba97f-8be7-4be9-be3f-a9f341f2b89f
curl
-H "Accept: application/json"
-H "Authorization: Bearer <admin JWT token>"
--data-raw '<JSON DATA>'
https://<your domain>/api/products/433ba97f-8be7-4be9-be3f-a9f341f2b89f
Sample Of Response
{
"data": {
"product_id": 281,
"uuid": "433ba97f-8be7-4be9-be3f-a9f341f2b89f",
"variant_group_id": null,
"visibility": 1,
"group_id": 4,
"image": null,
"sku": "Q7Oq0kxZIMQ5isUyJRbg",
"price": 43,
"qty": 123,
"weight": 17,
"manage_stock": 1,
"stock_availability": 1,
"tax_class": null,
"status": 0,
"created_at": "2023-02-07 00:01:46",
"updated_at": "2023-02-07 00:01:46",
"product_description_id": 351,
"product_description_product_id": 281,
"name": "Q7Oq0kxZIMQ5isUyJRbg",
"description": null,
"short_description": null,
"url_key": "Q7Oq0kxZIMQ5isUyJRbg",
"meta_title": "Q7Oq0kxZIMQ5isUyJRbg",
"meta_description": null,
"meta_keywords": null,
"links": [
{
"rel": "productGrid",
"href": "/admin/products",
"action": "GET",
"types": [
"text/xml"
]
},
{
"rel": "view",
"href": "/product/99a7b39ca63211edb46b60d819134f39",
"action": "GET",
"types": [
"text/xml"
]
},
{
"rel": "edit",
"href": "/admin/products/edit/99a7b39ca63211edb46b60d819134f39",
"action": "GET",
"types": [
"text/xml"
]
}
]
}
}

Path Parameters

ParameterTypeDescriptionRequired
idstringThe UUID of the product to updateYes

Update Parameters

All parameters are optional for updates. Only include the parameters you want to modify. See the Create a Product section for detailed parameter descriptions.

duplicate_of is accepted only on create — it has no meaning on update.


Metafields

Both create and update accept a metafields object. It is keyed namespace → key → value: the outer key is the definition's namespace (custom unless you set another), the inner key is the definition's key. Values are validated against each definition's type and validations, then folded into the product's meta_data column.

{
"name": "Lite racer adapt 3.0 shoes",
"sku": "NJC90842",
"metafields": {
"custom": {
"care_instructions": "Machine wash cold",
"warranty_months": 24
}
}
}
A flat object silently drops every value

Validation reads each value at input[definition.namespace][definition.key]. Passing { "care_instructions": "..." } without the namespace level means nothing is found, so optional fields are written as empty and any required definition fails the request with "custom.care_instructions" is required.

Omitting metafields leaves meta_data untouched — the fold runs only when the key is explicitly present, so a partial update never wipes existing values. Sending a value that fails its definition's validation fails the whole request.

The same field is available on POST/PATCH for categories and collections, scoped to the category and collection owner types respectively.


Delete a Product

Removes a product from your EverShop store.

Request Schema (application/json)
No request body required
DELETE/api/products/433ba97f-8be7-4be9-be3f-a9f341f2b89f
curl
-H "Accept: application/json"
-H "Authorization: Bearer <admin JWT token>"
https://<your domain>/api/products/433ba97f-8be7-4be9-be3f-a9f341f2b89f
Sample Of Response
{
"data": {
"product_id": 281,
"uuid": "433ba97f-8be7-4be9-be3f-a9f341f2b89f",
"variant_group_id": null,
"visibility": 1,
"group_id": 4,
"image": null,
"sku": "skuUpdated",
"price": 45,
"qty": 123,
"weight": 17,
"manage_stock": 1,
"stock_availability": 1,
"tax_class": null,
"status": 1,
"created_at": "2023-02-07 00:01:46",
"updated_at": "2023-02-07 00:01:46",
"product_description_id": null,
"product_description_product_id": null,
"name": null,
"description": null,
"short_description": null,
"url_key": null,
"meta_title": null,
"meta_description": null,
"meta_keywords": null
}
}

Path Parameters

ParameterTypeDescriptionRequired
idstringThe UUID of the product to deleteYes

Get Product Data with GraphQL

EverShop uses GraphQL for querying product data. For detailed information on how to query products, refer to the GraphQL API documentation.