Methods

These methods were added in version 2021.6


Entity Properties


enumeration.list

enumeration.list (int|null $warehouseId)

Get all enumerations.

Parameters

0 int|null
Warehouse.

Return Value

An array of Enumerations or an empty array.

Example Request

Get all enumerations:

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "enumeration.list"
    ]
}

Get all enumerations for warehouse “2”:

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "enumeration.list",
        [2]
    ]
}

Example Response

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "result" : {
        "catalog": {
            "goods_type": {
                "singular_name": "Goods Type",
                "plural_name": "Goods Types",
                "data": [
                    {
                        "key": "HAZMAT",
                        "label": "Regulated"
                    },
                    {
                        "key": "LIMITED_QUANTITIES_COMMODITIES",
                        "label": "Limited Quantities: Consumer Commodity"
                    },
                    {
                        "key": "NORMAL",
                        "label": "Not Regulated"
                    }
                ]
            }
        },
        "shipment": {
            "status": {
                "singular_name": "Status",
                "plural_name": "Statuses",
                "data": [
                    {
                        "key": "canceled",
                        "label": "Canceled"
                    },
                    {
                        "key": "shipped",
                        "label": "Shipped"
                    },
                    {
                        "key": "new",
                        "label": "New"
                    },
                    {
                        "key": "packed",
                        "label": "Packed"
                    },
                    {
                        "key": "packing",
                        "label": "Packing"
                    },
                    {
                        "key": "picked",
                        "label": "Picked"
                    },
                    {
                        "key": "picking",
                        "label": "Picking"
                    },
                    {
                        "key": "voided",
                        "label": "Voided"
                    }
                ]
            }
        }
    }
}

enumeration.info

enumeration.info (string $path, int|null $warehouseId)

Get enumeration info.

Parameters

0 string
Path.
1 int|null
Warehouse.

Return Value

Enumeration.

Example Request

Get enumeration info:

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "method" : "call",
    "params" : [
        "be1c13ed4e03f0ed7f1e4053dfff9658",
        "enumeration.info",
        ["catalog/goods_type"]
    ]
}

Example Response

{
    "jsonrpc" : 2.0,
    "id" : 1234,
    "result" : {
        "singular_name": "Goods Type",
        "plural_name": "Goods Types",
        "data": [
            {
                "key": "HAZMAT",
                "label": "Regulated"
            },
            {
                "key": "LIMITED_QUANTITIES_COMMODITIES",
                "label": "Limited Quantities: Consumer Commodity"
            },
            {
                "key": "NORMAL",
                "label": "Not Regulated"
            }
        ]
    }
}

Enumeration Properties

singular_name
{ "singular_name" : "Lot Type" }
The singular name.
plural_name
{ "plural_name" : "Lot Types" }
The plural name.
depends_on_merchant
{ "depends_on_merchant" : true }
Depends on merchant flag is only returned when the value is true.
depends_on_warehouse
{ "depends_on_warehouse" : true }
Depends on warehouse flag is only returned when the value is true.
data
{ "data" : [{"key": "packed", "label": "Packed"}] }
Enumeration data.