Printago API
POST /v1/routing-rules/reorder

Reorder routing rules

Put the store's rules in a new order `ids` must name every rule of the store exactly once; anything else returns 400 and changes nothing.

Requires: routingRules.manage

Request Body

Every rule id, in the new order

RoutingRuleReorderRequest
idsrequired
string[]
Every rule of the store, in the new order.

Example Request

application/json
{
  "ids": [
    "string"
  ]
}

Response Schema

RoutingRule[]
Array of RoutingRule, each with:
createdAtrequired
string
format: date-time
enabledrequired
boolean
exprrequired
object
What must hold for a job the rule applies to and the printer it runs on.
Variant 1AllExprTrue when every condition in the list is true.
allrequired
object[]
Variant 2AnyExprTrue when at least one condition in the list is true.
anyrequired
object[]
Variant 3NotExprTrue when the condition is false.
notrequired
object
Variant 1AllExprTrue when every condition in the list is true.
allrequired
object[]
Variant 2AnyExprTrue when at least one condition in the list is true.
anyrequired
object[]
Variant 3NotExprTrue when the condition is false.
Variant 4CmpExprOne field compared with a value or with another field.
cmprequired
enum
in<>contains!=>=<=betweenexists==containsAnycontainsAllisEmptymatches
leftrequired
object
A reference to an attribute on one side of the pairing.
pathrequired
string
Catalog path, e.g. `userTags`, `source`, `custom.batchColor`.
refrequired
"order" | "sku" | "printer" | "part" | "orderItem"
orderskuprinterpartorderItem
rightoptional
object
Left out for the operators that take no value: `exists`, `isEmpty`.
Variant 1RefA reference to an attribute on one side of the pairing.
pathrequired
string
Catalog path, e.g. `userTags`, `source`, `custom.batchColor`.
refrequired
"order" | "sku" | "printer" | "part" | "orderItem"
orderskuprinterpartorderItem
Variant 2LiteralA constant literal operand.
constrequired
string | number | boolean | string | number[]
Variant 4CmpExprOne field compared with a value or with another field.
cmprequired
enum
in<>contains!=>=<=betweenexists==containsAnycontainsAllisEmptymatches
leftrequired
object
A reference to an attribute on one side of the pairing.
pathrequired
string
Catalog path, e.g. `userTags`, `source`, `custom.batchColor`.
refrequired
"order" | "sku" | "printer" | "part" | "orderItem"
orderskuprinterpartorderItem
rightoptional
object
Left out for the operators that take no value: `exists`, `isEmpty`.
Variant 1RefA reference to an attribute on one side of the pairing.
pathrequired
string
Catalog path, e.g. `userTags`, `source`, `custom.batchColor`.
refrequired
"order" | "sku" | "printer" | "part" | "orderItem"
orderskuprinterpartorderItem
Variant 2LiteralA constant literal operand.
constrequired
string | number | boolean | string | number[]
idrequired
string
pattern: ^[a-z0-9]{24}$
kindrequired
"require" | "prefer"
requireprefer
namerequired
string
positionrequired
number
Where the rule sits in the store's list, lowest first.
storeIdrequired
string
pattern: ^[a-z0-9]{24}$
updatedAtrequired
string
format: date-time
whenExprrequirednullable
object
Which jobs the rule applies to. Null applies it to every job.
Variant 1AllExprTrue when every condition in the list is true.
allrequired
object[]
Variant 2AnyExprTrue when at least one condition in the list is true.
anyrequired
object[]
Variant 3NotExprTrue when the condition is false.
notrequired
object
Variant 1AllExprTrue when every condition in the list is true.
allrequired
object[]
Variant 2AnyExprTrue when at least one condition in the list is true.
anyrequired
object[]
Variant 3NotExprTrue when the condition is false.
Variant 4CmpExprOne field compared with a value or with another field.
cmprequired
enum
in<>contains!=>=<=betweenexists==containsAnycontainsAllisEmptymatches
leftrequired
object
A reference to an attribute on one side of the pairing.
pathrequired
string
Catalog path, e.g. `userTags`, `source`, `custom.batchColor`.
refrequired
"order" | "sku" | "printer" | "part" | "orderItem"
orderskuprinterpartorderItem
rightoptional
object
Left out for the operators that take no value: `exists`, `isEmpty`.
Variant 1RefA reference to an attribute on one side of the pairing.
pathrequired
string
Catalog path, e.g. `userTags`, `source`, `custom.batchColor`.
refrequired
"order" | "sku" | "printer" | "part" | "orderItem"
orderskuprinterpartorderItem
Variant 2LiteralA constant literal operand.
constrequired
string | number | boolean | string | number[]
Variant 4CmpExprOne field compared with a value or with another field.
cmprequired
enum
in<>contains!=>=<=betweenexists==containsAnycontainsAllisEmptymatches
leftrequired
object
A reference to an attribute on one side of the pairing.
pathrequired
string
Catalog path, e.g. `userTags`, `source`, `custom.batchColor`.
refrequired
"order" | "sku" | "printer" | "part" | "orderItem"
orderskuprinterpartorderItem
rightoptional
object
Left out for the operators that take no value: `exists`, `isEmpty`.
Variant 1RefA reference to an attribute on one side of the pairing.
pathrequired
string
Catalog path, e.g. `userTags`, `source`, `custom.batchColor`.
refrequired
"order" | "sku" | "printer" | "part" | "orderItem"
orderskuprinterpartorderItem
Variant 2LiteralA constant literal operand.
constrequired
string | number | boolean | string | number[]

Example Response

201 OK — application/json
[
  {
    "name": "string",
    "enabled": true,
    "kind": "require",
    "position": 1,
    "whenExpr": {
      "all": []
    },
    "expr": {
      "all": []
    },
    "id": "string",
    "storeId": "string",
    "createdAt": "2025-01-15T12:00:00.000Z",
    "updatedAt": "2025-01-15T12:00:00.000Z"
  }
]