Ordexs API v1 Get an API key

Delivery setup

Add a routing rule

POSThttps://api.ordexs.com/v1/delivery/routing_rules

Like the Delivery page, a courier has one rule of each type: adding regions or products to a courier that already has that rule extends it. A region or product can be routed to one courier only, and weight ranges can't overlap (request_rejected names the courier that already has it).

Body

  • courier_idstringRequired

    starts with cour_

  • typestringRequired

    One of region, product, weight

  • regionsarray of strings

    up to 100 items · at least 1 item

  • product_idsarray of strings

    up to 500 items · at least 1 item

  • weight_min_gramsinteger or null

    min 0

  • weight_max_gramsinteger or null

    null for no upper limit.

    min 1

Returns

201 Created · The rule. RoutingRule

  • idstring

    starts with rul_

  • objectstring

    always "routing_rule"

  • courier_idstring
  • typestring

    One of region, product, weight

  • regionsarray of strings
  • product_idsarray of strings
  • weight_min_gramsinteger or null
  • weight_max_gramsinteger or null
  • activeboolean
  • created_atstring

    ISO 8601 date-time, UTC

  • updated_atstring

    ISO 8601 date-time, UTC

Errors

Every error has the same shape. This endpoint can answer with: