Product Tags API Routes
A tag is another way of organizing a product. Each tag has a name and a value.
Products are organized into the same tag if they have the same value.
These API routes allow admin users to manage product tags.
GET /admin/product-tags#
List Product Tags
Retrieve a list of product tags. The product tags can be filtered by fields such as id. The product tags can also be sorted or paginated.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.offsetnumberOptionallimitnumberOptionalorderstringOptional-.qstringOptionalidstring | string[]Optionalvaluestring | string[]Optionalcreated_atobjectOptionalupdated_atobjectOptionaldeleted_atobjectOptional$andobject[]Optional$orobject[]Optionalwith_deletedbooleanOptionalexternal_idstring | string[]OptionalRequest examples
Responses
200 OK
limitnumberoffsetnumbercountnumberproduct_tagsobject[]The list of product tags.
product_tagsobject[]estimate_countnumberOptional400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/product-tags#
Create Product Tag
Create a product tag.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Query parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
valuestringmetadataobjectOptionalexternal_idstringOptionalRequest examples
Responses
200 OK
product_tagobjectThe product tag's details.
product_tagobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-tag.created: Emitted when product tags are created.
GET /admin/product-tags/{id}#
Get a Product Tag
Retrieve a product tag by its ID. You can expand the product tag's relations or select the fields that should be returned.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request examples
Responses
200 OK
product_tagobjectThe product tag's details.
product_tagobject400, 401, 404, 409, 422, 500: an error response is returned.
POST /admin/product-tags/{id}#
Update a Product Tag
Update a product tag's details.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringQuery parameters
fieldsstringOptional+ it will be added to the default fields, using - will remove it from the default fields. without prefix it will replace the entire default fields.Request body (application/json)
valuestringOptionalmetadataobjectOptionalexternal_idstringOptionalRequest examples
Responses
200 OK
product_tagobjectThe product tag's details.
product_tagobject400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-tag.updated: Emitted when product tags are updated.
DELETE /admin/product-tags/{id}#
Delete a Product Tag
Delete a product tag. This doesn't delete products using the tag.
Authentication: secret API key (HTTP Basic authorization), cookie session, JWT bearer token.
Path parameters
idstringRequest examples
Responses
200 OK
idstringobjectstringDefault: "product_tag"
deletedboolean400, 401, 404, 409, 422, 500: an error response is returned.
Emitted events
product-tag.deleted: Emitted when product tags are deleted.