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.

Shipping (admin API)

Admin routes of the shipping 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 shipping methods

Parameters:

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

Responses:

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

Create shipping method

Request body: CreateShippingMethodAdminDto.

Responses:

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

Delete shipping method

Parameters:

  • id in path (string, required).

Responses:

  • 204: Method deleted.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Method not found.

Update shipping method

Parameters:

  • id in path (string, required).

Request body: UpdateShippingMethodAdminDto.

Responses:

  • 200: Method updated.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Method not found.

List shipping 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 shipping zone

Request body: CreateShippingZoneAdminDto.

Responses:

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

Update shipping zone

Parameters:

  • id in path (string, required).

Request body: UpdateShippingZoneAdminDto.

Responses:

  • 200: Zone updated.
  • 400: Invalid input.
  • 401: Unauthorized.
  • 403: Insufficient permissions.
  • 404: Zone not found.
  • zoneId (string, required).
  • name (TranslatableDto, required).
  • type (object, required).
  • price (number, min 0, optional).
  • weightRanges (array of WeightRangeDto, optional).
  • priceRanges (array of PriceRangeDto, optional).
  • freeAbove (number, min 0, optional).
  • estimatedDaysMin (number, min 0, optional).
  • estimatedDaysMax (number, min 0, optional).
  • isActive (boolean, optional).
  • isDefault (boolean, optional).
  • sortOrder (number, min 0, optional).
  • name (TranslatableDto, required).
  • countries (array of string, required).
  • states (array of string, optional).
  • postalCodeRanges (array of string, optional).
  • priority (number, optional).
  • isActive (boolean, optional).
  • minAmount (number, min 0, required).
  • maxAmount (number, min 0, required).
  • price (number, min 0, required).
  • default (string, required).
  • fr (string, optional).
  • en (string, optional).
  • ar (string, optional).
  • minKg (number, min 0, required).
  • maxKg (number, min 0, required).
  • price (number, min 0, required).