Bulk activate scenarios
Scenarios can be bulk activated via API using the https://apis.supplierxm.salsify.com/public/v1/validation/rulesets/require endpoint. Its reference is available here: Bulk activate scenarios .
curl --request POST \
--url https://apis.supplierxm.salsify.com/public/v1/validation/rulesets/require \
--header 'Authorization: Bearer SALSIFY_TOKEN'
--header 'Content-Type: application/json'
--data '{"uuids":["uuid1","uuid2"],"ruleset_values":{"1":true,"2":false}}'
(uuid being the product uuid and ruleset_values the scenario's id: see below for more explanation)
Eligible products are those for which product data was shared by a manufacturer (for instance products with pending assignation are not eligible for scenario activation).
To activate scenarios on products you must specify:
- on which products this update applies, these products are identified by their
uuid
- which scenarios should be activated/deactivated: scenarios are identified by their
id
(see section List available scenarios for your organization )
Activate a scenario with a deadline
curl --request POST \
--url https://apis.supplierxm.salsify.com/public/v1/validation/rulesets/require \
--header 'Authorization: Bearer SALSIFY_TOKEN'
--header 'Content-Type: application/json'
--data '{"uuids":["uuid1","uuid2"],"ruleset_values":{"1":true,"2":false}, "deadline": "2021-12-01"}'
Prerequisites: this request is only available to retailers with scenarios with deadlines activated in their organization and deadlines enabled on the targeted ruleset.
Retrieve the product uuid
To retrieve your products uuid, simply search your products using the body params filter_gtins_in and filter_source_include.
It will return a json containing the uuid linked to your products.
curl --request POST \
--url https://apis.supplierxm.salsify.com/public/v1/products/list \
--header 'Authorization: Bearer SALSIFY_TOKEN'
--header 'Content-Type: application/json'
--data '{"filter_gtins_in":"gtin1,gtin2","filter_source_include":"uuid"'
API References
Bulk activate scenarios
This API is only available to retailers with scenarios activated in their organization.
Updated about 1 year ago