Manufacturer
Use the REST API to interact with the manufacturers in the application.
You should take into account when making your request
Remember that for some requests, you need to send the authentication token.
Header Parameters
{
"Authorization": "Bearer ...token..."
}
And the query parameters are as follows:
Query Parameters
{
"setting": {
"timezone": "America/Bogota",
"fromAdmin": true,
"appMode": "iadmin",
"authProvider": "local",
"locale": "en"
}
}
Do you want to see the changes made through the API?
After using the API to access products, it's important to update the cache to see the changes.
How to do it:
- Go to the upper-right corner and select the dropdown menu with your username.
- Click on 'Settings.'
- In the 'Actions' section, look for the 'Clear Cache' option.
- Click on 'Clear Cache' to update the information and view the updated products.
Create a Manufacturer
Use this endpoint to create a manufacturer.
- Minimum
- Rest
{
"attributes": {
"es": { //This depends on the server's language
"title": "Test",
"slug": "test",
"description": "Descriptión" // You can use HTML for this field
}
}
}
{
"attributes": {
"store_id": 1,
"status": "1",
"sort_order": "0",
"medias_single": {},
"medias_multi": {},
"es": {
"name": "test",
"slug": "test",
"description": "Test",
"meta_title": "",
"meta_description": ""
}
}
}
Response
{
"data": {
"id": 1,
"name": "Xiamoi",
"slug": "xiamoi",
"url": "",
"description": "Test",
"storeId": 1,
"sortOrder": "0",
"metaTitle": "",
"metaDescription": "",
"options": null,
"createdAt": "2023-10-23 16:20:04",
"updatedAt": "2023-10-23 16:20:04",
"status": "1",
"mainImage": {
"mimeType": "image/jpeg",
"path": "..."
},
"mediaFiles": {
"mainimage": {
"id": null,
"filename": null,
"mimeType": null,
"fileSize": null,
"path": "...",
"relativePath": "...",
"isImage": true,
"isVideo": false,
"isFolder": false,
"mediaType": false,
"folderId": null,
"description": null,
"alt": null,
"keywords": null,
"createdBy": null,
"createdAt": null,
"updatedAt": null,
"faIcon": "fa-file",
"disk": null,
"extension": null,
"url": "...",
"createdByUser": null,
"tags": [],
"thumbnails": [
{
"name": "smallThumb",
"path": "...",
"size": "300x"
},
{
"name": "mediumThumb",
"path": "...",
"size": "600x"
},
{
"name": "largeThumb",
"path": "...",
"size": "900x"
},
{
"name": "extraLargeThumb",
"path": "...",
"size": "1920x"
}
],
"smallThumb": "...",
"relativeSmallThumb": "//modules/icommerce/img/manufacturer/default.jpg?u=",
"mediumThumb": "...",
"relativeMediumThumb": "//modules/icommerce/img/manufacturer/default.jpg?u=",
"largeThumb": "...",
"relativeLargeThumb": "//modules/icommerce/img/manufacturer/default.jpg?u=",
"extraLargeThumb": "...",
"relativeExtraLargeThumb": "//modules/icommerce/img/manufacturer/default.jpg?u="
},
"secondaryimage": {...},
"tertiaryimage": {...},
"quaternaryimage": {...},
"carouseltopindeximages": []
}
}
}
Modify a Manufacturer
Use this endpoint to modify a manufacturer. You can send one or multiple values in the request.
By default, the accepted value is the ID. However, if you want to send another value, you must include it in the Query Parameters
:
{
"filter": {
"field": "title" // Value by which the search will be performed
}
}
- Minimum
- Rest
{
"attributes": {
"es": {
"title": "change name",
}
}
}
{
"attributes": {
"store_id": 1,
"status": "1",
"sort_order": "0",
"medias_single": {},
"medias_multi": {},
"es": {
"name": "test",
"slug": "test",
"description": "Test",
"meta_title": "",
"meta_description": ""
}
}
}
Response
{
"data": "Item Updated"
}
Get Multiple Manufacturers
Use this endpoint to retrieve multiple manufacturers.
You can filter manufacturers and paginate the results.
Query Parameters
:
- Rest
{
"filter": {
"order": {
"field":"created_at",
"way":"desc"
}
},
"page": 1,
"take": 1
}
Response
{
"data": [
{
"id": 1,
"name": "Test",
"slug": "test",
"url": "",
"description": "Test",
"storeId": 1,
"sortOrder": "0",
"metaTitle": "",
"metaDescription": "",
"options": null,
"createdAt": "2023-10-23 16:20:04",
"updatedAt": "2023-10-23 16:20:04",
"status": "1",
"mainImage": {
"mimeType": "image/jpeg",
"path": "..."
},
"mediaFiles": {
"mainimage": {
"id": null,
"filename": null,
"mimeType": null,
"fileSize": null,
"path": "...",
"relativePath": "...",
"isImage": true,
"isVideo": false,
"isFolder": false,
"mediaType": false,
"folderId": null,
"description": null,
"alt": null,
"keywords": null,
"createdBy": null,
"createdAt": null,
"updatedAt": null,
"faIcon": "fa-file",
"disk": null,
"extension": null,
"url": "...",
"createdByUser": null,
"tags": [],
"thumbnails": [
{
"name": "smallThumb",
"path": "...",
"size": "300x"
},
{
"name": "mediumThumb",
"path": "...",
"size": "600x"
},
{
"name": "largeThumb",
"path": "...",
"size": "900x"
},
{
"name": "extraLargeThumb",
"path": "...",
"size": "1920x"
}
],
"smallThumb": "...",
"relativeSmallThumb": "//modules/icommerce/img/manufacturer/default.jpg?u=",
"mediumThumb": "...",
"relativeMediumThumb": "//modules/icommerce/img/manufacturer/default.jpg?u=",
"largeThumb": "...",
"relativeLargeThumb": "//modules/icommerce/img/manufacturer/default.jpg?u=",
"extraLargeThumb": "...",
"relativeExtraLargeThumb": "//modules/icommerce/img/manufacturer/default.jpg?u="
},
"secondaryimage": {/*...*/},
"tertiaryimage": {/*...*/},
"quaternaryimage": {/* ... */},
"carouseltopindeximages": []
}
}
],
"meta": {
"page": {
"total": 1,
"lastPage": 1,
"perPage": "1",
"currentPage": 1
}
}
}
Get a Manufacturer
Use this endpoint to retrieve a specific manufacturer.
- Rest
{}
Response
{
"data": {
"id": 1,
"name": "Test",
"slug": "test",
"url": "",
"description": "Test",
"storeId": 1,
"sortOrder": "0",
"metaTitle": "",
"metaDescription": "",
"options": null,
"createdAt": "2023-10-23 16:20:04",
"updatedAt": "2023-10-23 16:20:04",
"status": "1",
"mainImage": {
"mimeType": "image/jpeg",
"path": "..."
},
"mediaFiles": {
"mainimage": {
"id": null,
"filename": null,
"mimeType": null,
"fileSize": null,
"path": "...",
"relativePath": "...",
"isImage": true,
"isVideo": false,
"isFolder": false,
"mediaType": false,
"folderId": null,
"description": null,
"alt": null,
"keywords": null,
"createdBy": null,
"createdAt": null,
"updatedAt": null,
"faIcon": "fa-file",
"disk": null,
"extension": null,
"url": "...",
"createdByUser": null,
"tags": [],
"thumbnails": [
{
"name": "smallThumb",
"path": "...",
"size": "300x"
},
{
"name": "mediumThumb",
"path": "...",
"size": "600x"
},
{
"name": "largeThumb",
"path": "...",
"size": "900x"
},
{
"name": "extraLargeThumb",
"path": "...",
"size": "1920x"
}
],
"smallThumb": "...",
"relativeSmallThumb": "//modules/icommerce/img/manufacturer/default.jpg?u=",
"mediumThumb": "...",
"relativeMediumThumb": "//modules/icommerce/img/manufacturer/default.jpg?u=",
"largeThumb": "...",
"relativeLargeThumb": "//modules/icommerce/img/manufacturer/default.jpg?u=",
"extraLargeThumb": "...",
"relativeExtraLargeThumb": "//modules/icommerce/img/manufacturer/default.jpg?u="
},
"secondaryimage": {/* ... */},
"tertiaryimage": {/*... */},
"quaternaryimage": {/**... */},
"carouseltopindeximages": []
},
"es": {
"name": "Test",
"slug": "test",
"description": "Test",
"metaTitle": null,
"metaDescription": null
}
}
}
Delete a Manufacturer
Use this endpoint to delete a specific manufacturer.
Send the manufacturer's ID to delete it.
- Rest
{}
Response
{
"data": "Request successful"
}
Manufacturer Fields
name | Type:Varchar Description: Manufacturer's name. Maximum characters are 191. |
slug | Type:Varchar Description: Friendly URL or slug of the manufacturer. Maximum characters are 191. |
description | Type:Text Description: Detailed description of the manufacturer. |
meta_title | Type:Text Description: Meta title for the manufacturer. |
meta_description | Type:Text Description: Meta description for the manufacturer. |
status | Type:Boolean Description: Manufacturer's status. |
sort_order | Type:Integer Description: Sort order of the manufacturer. |
store_id | Type:Integer Description: Identification of the store associated with the manufacturer. |