Skip to main content

Routing ruleset API (v0)

Download OpenAPI specification:Download

Define routing rules for your business

Get routing rules example

Retrieves the current 'fulfillment configuration V1' transformed to adhere to the 'Routing Rule' V2 format. It shows the change in value-mapping between V1 and V2. If already using V2, this endpoint is of no use, and will return the current configuration. Refer to the 'Response Examples' to see the type of structure to be returned.

Authorizations:
newStoreAccessToken

Responses

Response samples

Content type
application/json
{
  • "routes": [
    ],
  • "sl_levels_priority": [
    ],
  • "location_groups": {
    },
  • "zip_code_regions": {
    }
}

Get routing rules

Retrieves the current 'Routing Rule V2'. If customer using V1, this endpoint is of no use, and will return the error.

Authorizations:
newStoreAccessToken

Responses

Response samples

Content type
application/json
{
  • "routes": [
    ],
  • "sl_levels_priority": [
    ],
  • "location_groups": {
    },
  • "zip_code_regions": {
    }
}

Updates the routing rules

This endpoint is used to initially seed the routing rules or to replace it completely

Authorizations:
newStoreAccessToken
Request Body schema: application/json
Array of objects

Routing rules specification

sl_levels_priority
Array of strings non-empty [ items non-empty ]

Service levels priority. This is ordered according to which service level will be taken first

object

Location groups identifiers

object

Zip code groups, in order to facilitate the identification routes per regions

Responses

Request samples

Content type
application/json
{
  • "routes": [
    ],
  • "sl_levels_priority": [
    ],
  • "location_groups": {
    },
  • "zip_code_regions": {
    }
}

Response samples

Content type
application/json
{
  • "routing_ruleset": {
    },
  • "fulfillment_config_uri": "v0/fulfillment_configuration/revision/13"
}

Patch the routing rules

A convenience endpoint, where you can use json patch to change parts of the currently enabled routing rules if the v2 fulfillment config is used. Mostly used by the UI.

Authorizations:
newStoreAccessToken
Request Body schema: application/json
Array
One of
path
required
string

A JSON Pointer path.

op
required
string
Enum: "add" "replace" "test"

The operation to perform.

value
required
any

The value to add, replace or test.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "routing_ruleset": {
    },
  • "fulfillment_config_uri": "v0/fulfillment_configuration/revision/13"
}

Get routing rules section

Retrieves a section of the current 'Routing Rule V2'. If customer using V1, this endpoint is of no use, and will return the error.

Authorizations:
newStoreAccessToken
path Parameters
section
required
string
Enum: "routes" "sl_levels_priority" "location_groups" "zip_code_regions"

name of the section to retrieve

Responses

Response samples

Content type
application/json
{
  • "zip_code_regions": {
    }
}