Skip to main content
⭐️ If you love EverShop, give it a star on GitHub. Thanks!

Products API

Use the REST API to interact with EverShop products.

Create a product

Use this endpoint to create a product.

Request Schema (application/json)
Field NameField TypeRequired
namestringYes
descriptionstringNo
short_descriptionstringNo
url_keystring (^\S+$)Yes
meta_titlestringYes
meta_descriptionstringNo
meta_keywordsstringNo
statusinteger or string (0, 1, '0', '1')Yes
skustringYes
pricestring or numberYes
weightstring or numberYes
qtystring or numberYes
manage_stockstring or number (0, 1, '0', '1')No
stock_availabilitystring or number (0, 1, '0', '1')No
group_idstring or integerYes
visibilityinteger or string (0, 1, '0', '1')Yes
imagesarray of stringNo
attributesarray of objectNo
Field NameField TypeRequired
attribute_codestringNo
valuestring or arrayNo
category_idstring or integer 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
POST/api/products
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
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/Q7Oq0kxZIMQ5isUyJRbg",
"action": "GET",
"types": [
"text/xml"
]
},
{
"rel": "edit",
"href": "/admin/products/edit/99a7b39ca63211edb46b60d819134f39",
"action": "GET",
"types": [
"text/xml"
]
}
]
}
}

Update a product

Use this endpoint to update a product.

Request Schema (application/json)
Field NameField TypeRequired
namestringNo
descriptionstringNo
short_descriptionstringNo
url_keystring (^\S+$)No
meta_titlestringNo
meta_descriptionstringNo
meta_keywordsstringNo
statusinteger or string (0, 1, '0', '1')No
skustringNo
pricestring or numberNo
weightstring or numberNo
qtystring or numberNo
manage_stockstring or number (0, 1, '0', '1')No
stock_availabilitystring or number (0, 1, '0', '1')No
group_idstring or integerNo
visibilityinteger or string (0, 1, '0', '1')No
imagesarray of stringNo
attributesarray of objectNo
Field NameField TypeRequired
attribute_codestringNo
valuestring or arrayNo
categoriesarray of string,integerNo
optionsarray of objectNo
Field NameField TypeRequired
option_idnumberNo
option_namestringYes
option_typestring (select, multiselect)Yes
is_requiredstring or integer (0, 1, '0', '1')No
valuesarray of objectYes
Field NameField TypeRequired
value_idnumberNo
valuestringYes
extra_pricestring or numberYes
PATCH/api/products/{id}
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/products/{id}
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/Q7Oq0kxZIMQ5isUyJRbg",
"action": "GET",
"types": [
"text/xml"
]
},
{
"rel": "edit",
"href": "/admin/products/edit/99a7b39ca63211edb46b60d819134f39",
"action": "GET",
"types": [
"text/xml"
]
}
]
}
}

Delete a product

Use this endpoint to delete a product.

Request Schema (application/json)
No request body required
DELETE/api/products/{id}
curl
-H "Accept: application/json"
-H "Cookie: asid=<your admin cookie>"
https://<your domain>/api/products/{id}
Sample Of Response
{
"data": {
"product_id": 281,
"uuid": "99a7b39ca63211edb46b60d819134f39",
"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
}
}