Skip to content
You are reading the unreleased documentation. No version is released yet, and these pages describe code that is not in a release.

Tax (admin API)

Admin routes of the tax 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 tax classes

Parameters:

  • page in query (number, min 1, optional).
  • pageSize in query (number, min 1, max 100, optional).
  • zoneId in query (string, optional).

Responses:

  • 200: Classes retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

Create tax class

Request body: CreateTaxClassAdminDto.

Responses:

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

List tax zones

Parameters:

  • page in query (number, min 1, optional).
  • pageSize in query (number, min 1, max 100, optional).

Responses:

  • 200: Zones retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.

Create tax zone

Request body: CreateTaxZoneAdminDto.

Responses:

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

Get tax zone

Parameters:

  • id in path (string, required).

Responses:

  • 200: Zone retrieved.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Zone not found.

Update tax zone

Parameters:

  • id in path (string, required).

Request body: UpdateTaxZoneAdminDto.

Responses:

  • 200: Zone updated.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Zone not found.
  • zoneId (string, required).
  • name (string, required).
  • rate (number, min 0, max 1, required).
  • isDefault (boolean, optional).
  • name (TranslatableDto, required).
  • countries (array of string, required).
  • rate (number, min 0, max 1, required).
  • isDefault (boolean, optional).
  • isCompound (boolean, optional).
  • priority (number, min 0, optional).
  • isActive (boolean, optional).
  • default (string, required).
  • fr (string, optional).
  • en (string, optional).
  • ar (string, optional).