Context

Some fulfillmenttools entities contain a context field. This object defines the value range of the root entity. If no context is defined, no limitations are set.

Some context implementations can be found in the User Roles REST API, the Listings (Attributes) API, or Facility Discounts REST API.

The context object looks like the following example:

{
    ...
    "context": [    
        {
            "type": "FACILITY",
            "operator": "NOT",
            "values": [
                "string"
            ]
        },
        {
            "type": "FACILITY",
            "operator": "NOT",
            "values": [
                "string", "string"
            ]
        }
    ]
}

Rules

  • Entries in the context array are and-linked

  • Strings in the values array are or-linked

  • type defines what entity IDs are saved in the values

  • Not every entity has the value operator

Example

The context of the facility connection (Facility Connection REST API) defines where the facility connection is explicitly active.

More information about the facility connection can be found under Products – Facility connection.

{
    ...
    "context": [
        {
            "type": "FACILITY",
            "values": [
                "12345-67890",
                "09876-54321"
            ]
        }
    ]
}

In this example, the facility connection is defined for facilities with the ID 12345-67890 and 09876-54321.

Last updated