Skip to content

Powered by Grav CMS + Helios Theme

Manufacturers

Who makes what you sell: the legal name, address and EU responsible person shown in the Product safety section, and the default safety text.

The manufacturers behind the Product safety section of a product page. What each field means, the store default and how a product picks its manufacturer are on Products and catalog.

List manufacturers

GET /api/v1/kahunacart/manufacturers Permission kahunacart.products.manage

Every manufacturer with its name, trade name, address, email, website, EU responsible person, default safety text with its translations, and how many products name it as their own, plus default_manufacturer_id, the store default a product without its own falls back to. These are what the product page's Product safety section shows under the EU's General Product Safety Regulation. A product is pointed at one through manufacturer_id on create_product or update_product.

Create a manufacturer

POST /api/v1/kahunacart/manufacturers Permission kahunacart.products.manage

Create a manufacturer. name is required and unique, ignoring case (409 when taken). An email must look like one and a website must be an http or https URL, or the request is refused with 422 naming the field. Fill the rp_* fields only when the manufacturer is outside the EU: they are the EU responsible person.

Parameters

Name Type Description
name required string The legal name
trade_name optional string or null Registered trade name or trademark, when it differs from the name
address optional string or null Postal address, one line per line
email optional string or null 190 characters or fewer.
url optional string or null Website or contact form, http or https
rp_name optional string or null EU responsible person: name
rp_address optional string or null EU responsible person: postal address
rp_email optional string or null EU responsible person: email
rp_url optional string or null EU responsible person: website or contact form
safety_info optional string or null Default Product safety text in Markdown, shown on every product of this manufacturer that has none of its own
translations optional object Language code to a map of overrides of safety_info, for example {"de": {"safety_info": "..."}}. Replaces the stored overrides wholesale when present

Update a manufacturer

PATCH /api/v1/kahunacart/manufacturers/{id} Permission kahunacart.products.manage

Change one or more fields of a manufacturer. Only the keys sent are touched; null or an empty string clears a field (never the name). The same checks as create_manufacturer.

Parameters

Name Type Description
id required integer Manufacturer id
name optional string 190 characters or fewer.
trade_name optional string or null 190 characters or fewer.
address optional string or null
email optional string or null 190 characters or fewer.
url optional string or null 500 characters or fewer.
rp_name optional string or null 190 characters or fewer.
rp_address optional string or null
rp_email optional string or null 190 characters or fewer.
rp_url optional string or null 500 characters or fewer.
safety_info optional string or null Default Product safety text in Markdown; null or an empty string clears it
translations optional object Language code to a map of overrides of safety_info, for example {"de": {"safety_info": "..."}}. Replaces the stored overrides wholesale when present

Delete a manufacturer

DELETE /api/v1/kahunacart/manufacturers/{id} Permission kahunacart.products.manage

Delete a manufacturer and take it off every product that named it, and report how many there were (products_affected) and whether it was the store default (was_default). Those products fall back to the store default; nothing else about them changes.

Parameters

Name Type Description
id required integer Manufacturer id

name is required and unique ignoring case, so a name another manufacturer has is a 409. An email that is not one, or a website that is not an http or https address, is a 422 naming the field. safety_info is Markdown of up to 20,000 characters, shown on every product of the manufacturer that has none of its own, and a blank value clears it. translations, as in {"de": {"safety_info": "..."}}, replaces its per-language overrides, and a map that is wrong is a 422 that saves nothing. See Multilanguage. A product is pointed at a manufacturer through manufacturer_id on the product routes.