SKU Data Set

PUT{{api_url}}/shop/products/sku_data/{{sku}}

Sets SKU Data entries on one SKU. The body is a JSON array of data name and value pairs; each is saved against the SKU in the path, creating the entry if the name is new to that SKU and overwriting it if it already exists. Names not sent are left untouched, so a call can change one entry without restating the rest. Use SKU Data Bulk Update to write across many SKUs in one call.

SKU Data is the per-SKU key/value store connections read when they interact with a SKU: setting thehomedepot_sku changes what InfiPlex sends to Home Depot for the SKU, costco_sku what it sends to Costco, amazon_business_pricing_base_price the Amazon Business price, and so on. The full list of reserved names is on SKU Data Get. Any other name is accepted and becomes a custom entry on the SKU, so check the spelling of a reserved name before sending it: home_depot_sku saves as a new custom entry and Home Depot never sees it.

An empty data_value clears the entry, leaving the name on the SKU with no value. To remove the entry itself use SKU Data Delete. Values InfiPlex writes on its own, such as amazon_business_pricing_last_sync_time, can be overwritten too; clearing a sync time makes the next sync treat the SKU as never synced, which is sometimes the point.

Entries that hold JSON, avcr_auto_confirm_rule_price and avcr_auto_confirm_rule_inventory, must be sent as a complete JSON string in data_value. The SKU Data tool in the OMS is the safer place to change those.

Path variables

VariableTypeDescription
skustringThe SKU to write to.

Body

A JSON array, one object per entry:

FieldTypeDescription
data_namestringThe data name, reserved or custom.
data_valuestringThe value to store. Empty string clears the entry.
[
    {"data_name": "thehomedepot_sku", "data_value": "1004567890"},
    {"data_name": "vendor_case_pack", "data_value": "12"}
]

Example

{{api_url}}/shop/products/sku_data/abc

Response

A JSON array with one object per entry sent, in the order sent:

[
    {
        "data_name": "thehomedepot_sku",
        "data_value": "1004567890",
        "message": "data saved"
    },
    {
        "data_name": "vendor_case_pack",
        "data_value": "12",
        "message": "data saved"
    }
]
FieldTypeDescription
data_namestringThe data name as sent.
data_valuestringThe value as stored.
messagestringdata saved on success, otherwise the reason the entry was not saved.

Check every row rather than the HTTP status: one entry failing does not fail the others.

Authorization

Bearer token, sent in the Authorization header. Inherited from the collection.

Body

[
    {
        "data_name": "custom_data_1",
        "data_value": "some value 111"
    },
    {
        "data_name": "custom_data_2",
        "data_value": "some value 222"
    }
]

Example Request

curl --location --request PUT '{{api_url}}/shop/products/sku_data/{{sku}}' \
--header 'Authorization: Bearer {{auth_token}}' \
--data '[
    {
        "data_name": "custom_data_1",
        "data_value": "some value 111"
    },
    {
        "data_name": "custom_data_2",
        "data_value": "some value 222"
    }
]'

Example Responses

SKU Data Set

Request

curl --location --request PUT '{{api_url}}/shop/products/sku_data/abc' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '[
    {
        "data_name": "custom_data_1",
        "data_value": "some value 111"
    },
    {
        "data_name": "custom_data_2",
        "data_value": "some value 222"
    }
]'

Response 200 OK

[
    {
        "data_name": "custom_data_1",
        "data_value": "some value 111",
        "message": "data saved"
    },
    {
        "data_name": "custom_data_2",
        "data_value": "some value 222",
        "message": "data saved"
    }
]