Skip to content
You are reading the pinned copy of v1.0, which is also the latest release. Read the latest.

Product types (admin API)

Admin routes of the product types module. Every route needs a staff session and the permission named on it; send X-Resolve-Locale: false to receive every locale of a translatable field for editing.

List all product types

Parameters:

  • page in query (string, optional).
  • pageSize in query (string, optional).

Responses:

  • 200: Product types retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

Create new product type

Request body: CreateProductTypeAdminDto.

Responses:

  • 201: Product type created.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

Delete product type

Parameters:

  • id in path (string, required).

Responses:

  • 204: Product type deleted.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Product type not found.
  • 409: Product type in use.

Update product type

Parameters:

  • id in path (string, required).

Request body: UpdateProductTypeAdminDto.

Responses:

  • 200: Product type updated.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Product type not found.
  • name (TranslatableDto, required).
  • code (string, pattern ^[a-z0-9]+(?:[_-][a-z0-9]+)*$, required).
  • taxClassId (string, optional).
  • fr (string, optional).
  • en (string, optional).
  • ar (string, optional).
  • default (string, required).
As seen on Open Source Alternatives The Merchant Engine badge