Skip to main content
POST
Create rule

Authorizations

Authorization
string
header
required

An API token from Sign in, sent as Authorization: Bearer <token>. Tokens last 30 days.

Body

application/json
name
string
required

Rule name. Must not be greater than 255 characters.

Example:

"WH1: Stock -> Output"

action
enum<string>
required

Rule action.

Available options:
pull,
push,
pull_push,
buy
Example:

"pull"

operation_type_id
integer
required

Operation type ID. The id of an existing record in the inventories_operation_types table.

Example:

1

source_location_id
integer
required

Source location ID. The id of an existing record in the inventories_locations table.

Example:

3

destination_location_id
integer
required

Destination location ID. The id of an existing record in the inventories_locations table.

Example:

4

route_id
integer
required

Route ID. The id of an existing record in the inventories_routes table.

Example:

1

partner_address_id
integer | null

Partner address ID. The id of an existing record in the partners_partners table.

Example:

10

delay
integer | null

Lead time in days. Must be at least 0.

Example:

1

company_id
integer | null

Company ID. The id of an existing record in the companies table.

Example:

1

Response

Created