Skip to main content
Omneya
EN
Start test system Try it
Developer docs menu

Maintain manufacturers

List, read, create, change and delete manufacturers, including the product safety (GPSR) contact data.

Manufacturers are shared

Manufacturers do not belong to a shop. They apply to all shops of the system, and every article of every shop can point to them. Changing or deleting a manufacturer therefore affects all shops at once. A key with manufacturers.write changes manufacturers for the whole system, so the operator grants this scope deliberately. The scopes need no shop assigned to your access.

Scopes:

Scope Allows
manufacturers.read list and search manufacturers, read a single manufacturer
manufacturers.write create, change and delete manufacturers

See the scope reference. The examples use https://shop.example.com/api/v1.

Deleted and unknown manufacturers answer 404 not_found. One exception: when you delete, an invalid confirmed_articles_count answers 422 before the manufacturer is looked up (see Delete).

GET /manufacturers returns the manufacturers page by page, sorted by name:

curl -s "https://shop.example.com/api/v1/manufacturers?search=Ac&status=1&per_page=50" \
  -H "Authorization: Bearer $OMNEYA_API_KEY" \
  -H "Accept: application/json"

All parameters are optional:

  • search finds manufacturers whose name starts with the text, without regard to upper and lower case. It needs at least 2 characters. The text is matched literally, so % and _ are ordinary characters, not wildcards.
  • status limits the list to active (1) or inactive (0) manufacturers.
  • page and per_page control the paging. A page holds 25 manufacturers by default and at most 100. page goes up to 1000000.
{
  "data": [
    {
      "id": 12,
      "name": "Acme Tools",
      "status": 1,
      "website": "https://acme.example",
      "logo_url": null,
      "street": "Sample Street",
      "house_number": "7",
      "postal_code": "20095",
      "city": "Hamburg",
      "phone_number": "+49 40 1234567",
      "fax_number": null,
      "contact_email": "info@acme.example",
      "external_name": null,
      "country": "DE",
      "responsible_name": null,
      "responsible_street": null,
      "responsible_house_number": null,
      "responsible_postal_code": null,
      "responsible_city": null,
      "responsible_country": null,
      "responsible_email": null,
      "responsible_phone": null,
      "position": 1,
      "comments": null,
      "created_at": "2026-10-15T09:30:00+02:00",
      "updated_at": "2026-10-15T09:30:00+02:00"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 50,
    "total": 1,
    "last_page": 1
  }
}

meta.total is the number of matches across all pages. Request further pages with page until current_page equals last_page.

Read one manufacturer

GET /manufacturers/{id} returns one manufacturer with the same fields as the list, plus articles_count:

curl -s https://shop.example.com/api/v1/manufacturers/12 \
  -H "Authorization: Bearer $OMNEYA_API_KEY" \
  -H "Accept: application/json"

articles_count is the number of articles currently assigned to the manufacturer. Deleted articles are not counted. It is also the number you confirm when you delete the manufacturer.

Create

POST /manufacturers creates a manufacturer and answers 201:

curl -s -X POST https://shop.example.com/api/v1/manufacturers \
  -H "Authorization: Bearer $OMNEYA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  --data '{
    "name": "Acme Tools",
    "website": "https://acme.example",
    "street": "Sample Street",
    "house_number": "7",
    "postal_code": "20095",
    "city": "Hamburg",
    "country": "DE",
    "contact_email": "info@acme.example",
    "responsible_name": "Example Compliance Ltd",
    "responsible_street": "Example Road",
    "responsible_house_number": "1",
    "responsible_postal_code": "1010",
    "responsible_city": "Vienna",
    "responsible_country": "AT",
    "responsible_email": "safety@compliance.example"
  }'

What to know when creating:

  • Only name is required. Without status the manufacturer is active (1).
  • Countries are sent as two-letter ISO codes in country and responsible_country. An unknown code answers unknown_country.
  • website and logo_url accept only http and https addresses. Anything else answers invalid_format. There is no logo upload; logo_url points to an image you host. A stored value that does not start with http:// or https:// (for example www.example.com, entered in the shop’s back office) is returned as null; if you send the whole object back unchanged, that old value is cleared.
  • Text fields hold at most 191 characters, comments holds up to 16383 characters.
  • The product safety data follows the EU General Product Safety Regulation (GPSR). The fields without prefix (street, city, country, contact_email and so on) are the manufacturer’s own contact data in the sense of Article 19. The fields with the prefix responsible_ describe the responsible person in the EU in the sense of Article 16, needed when the manufacturer is based outside the EU.
  • The name must not be used by another manufacturer. The comparison ignores upper and lower case and accents, so ACME TOOLS collides with Acme Tools and Muller with Müller, and answers manufacturer_name_taken on the field name. Deleted manufacturers do not count.

The response contains the stored manufacturer with its id and articles_count: 0.

Change

PATCH /manufacturers/{id} changes only the fields you send. All other fields keep their value:

curl -s -X PATCH https://shop.example.com/api/v1/manufacturers/12 \
  -H "Authorization: Bearer $OMNEYA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  --data '{ "city": "Bremen", "fax_number": null }'
  • Send null to clear a field. name and status cannot be cleared; null there answers required.
  • A new name must not be used by another manufacturer (manufacturer_name_taken). Sending the unchanged name is fine, so you can send back the whole object you read.
  • A field the API does not know, for example a typo such as cty, answers unknown_field and nothing is saved.
  • An empty body answers required on body. Send at least one field.

The response contains the complete manufacturer after the change, including articles_count.

Delete

DELETE /manufacturers/{id} works in two steps when articles are assigned to the manufacturer. Without assigned articles the manufacturer is deleted right away and the request answers 204 with no body.

If articles are assigned, the first request deletes nothing and answers 409:

curl -s -X DELETE https://shop.example.com/api/v1/manufacturers/12 \
  -H "Authorization: Bearer $OMNEYA_API_KEY" \
  -H "Accept: application/json"
{
  "error": {
    "code": "manufacturer_has_articles",
    "message": "12 articles are assigned to this manufacturer. Deleting it removes the manufacturer from these articles. To confirm, repeat the request with confirmed_articles_count=12.",
    "details": {
      "articles_count": 12
    }
  }
}

Repeat the request with the number from details.articles_count as the query parameter confirmed_articles_count:

curl -s -X DELETE "https://shop.example.com/api/v1/manufacturers/12?confirmed_articles_count=12" \
  -H "Authorization: Bearer $OMNEYA_API_KEY" \
  -H "Accept: application/json"

The manufacturer is deleted with 204, and the 12 articles no longer have a manufacturer. If articles were assigned or removed in the meantime, the number no longer matches: you receive 409 again with the new number, and nothing is deleted. Ask your user to confirm the new number before you repeat the request.

confirmed_articles_count is read from the query only; a request body is ignored. A value that is not a whole number answers 422 with invalid_format. This check comes first, so it also answers 422 for a manufacturer that no longer exists.

Errors

Invalid input answers 422 validation_failed with all problems per field, in the same format as orders:

{
  "error": {
    "code": "validation_failed",
    "message": "The request payload is invalid.",
    "details": {
      "name": [
        {
          "code": "manufacturer_name_taken",
          "message": "A manufacturer with this name already exists."
        }
      ]
    }
  }
}

Typical field codes here: required, manufacturer_name_taken, unknown_field, unknown_country, invalid_format for a malformed email address or a link that is not http or https, too_long for text over the limit, invalid_value for a status other than 0 or 1, and out_of_range for a search shorter than 2 characters, a page over 1000000 or a per_page over 100. See Errors.