Manufacturers

This endpoint can be used to create a manufacturer and retrieve a list of available manufacturers and optionaly filter by category and/or brand.

Reference

POST /manufacturers/

Create a new manufacturer

PUT /manufacturers/

Update a manufacturer

DELETE /manufacturers/

Remove a manufacturer

GET /manufacturers/

Retrieve a list of manufacturers and optionaly filter by category and/or brand

POST /manufacturers/batch/

Update a selection of advertisements with a specific manufacturer

General search parameters

field type description/constraints Req
useCache boolean Use API caching module No
manufacturerId int The manufacturerId No
userId int No
groupId int No
categoryId int when used, parameter categoryDescription will be ignored No
brand string No
categoryDescription string No
manufacturerTradename string No
chatgpt boolean Ask ChatGPT for the information No


Fields for creating, updating and retrieving a manufacturer

field type constraints Req W U
manufacturerId int The manufacturerId No No No
userId int The userId Yes Yes Yes
groupId int The groupId No Yes Yes
categoryId int The categoryId No Yes Yes
categoryDescription string No No No
brands array List of brand-names associated with this manufacturer No Yes Yes
manufacturerTradename string Yes Yes Yes
manufacturerAddress string Yes Yes Yes
manufacturerEmail string Yes Yes Yes
description string A free description field for internal usage No Yes Yes

Fields for updating a selection of advertisements with a specific manufacturer

field type constraints Req
manufacturerId int The manufacturerId to use Yes
userId int The userId Yes
adId int/array one or more adId's to update with the specified manufacturerId No
publish boolean Update the advertisement on all portals it is published to (default: false) No

Example retrieving manufacturers

Request

GET /rest/v1/manufacturers/?useCache=0&userId=0&groupId=0&categoryId=0&brand=Preethi HTTP/2

Response

{
    "result": true,
    "fromCache": false,
    "totalItems": 1,
    "totalInSet": 1,
    "page": 1,
    "itemsPerPage": 25,
    "speed": 0.004974842071533203,
    "data": [
        {
            "manufacturerId": 1,
            "userId": 0,
            "groupId": 17,
            "categoryId": 563,
            "brands": [
                "Philips",
                "Saeco",
                "Walita",
                "Preethi",
                "Gaggia",
                "L'Or"
            ],
            "manufacturerTradename": "Versuni B.V.",
            "manufacturerAddress": "Claude Debussylaan 88, 1082 MD, Amsterdam",
            "manufacturerEmail": "info@versuni.com",
            "description": "fabrikant"
        }
    ]
}

Example creating new manufacturer

Request

POST /rest/v1/manufacturers/ HTTP/2
{
    "userId": 12311,
    "groupId": 0,
    "categoryId": 1,
    "brands": [
        "Atag",
        "Nevit"
    ],
    "manufacturerTradename": "Atag B.V.",
    "manufacturerAddress": "Atagstraat 1, 1241AA Zierikzee",
    "manufacturerEmail": "info@atag.nl"
}

Response

{
    "result": true,
    "data": {
        "manufacturerId": 3,
        "userId": 12311,
        "groupId": 0,
        "categoryId": 1,
        "brands": [
            "Atag",
            "Nevit"
        ],
        "manufacturerTradename": "Atag B.V.",
        "manufacturerAddress": "Atagstraat 1, 1241AA Zierikzee",
        "manufacturerEmail": "info@atag.nl",
        "description": ""
    }
}

Example removing a manufacturer

Request

DELETE /rest/v1/manufacturers/ HTTP/2
{
    "manufacturerId": 4
}

Response

{
    "result": true,
    "errors": [],
    "data": []
}


Example updating a selection of advertisements with a specific manufacturer

Request

POST /rest/v1/manufacturers/batch/ HTTP/2
{
    "userId": 12311,
    "manufacturerId": 3,
    "adId": [
        1, 2, 3
    ],
    "publish": true
}

Response

{
    "result": true,
    "errors": [],
    "data": []
}