Retailer Aliases
Retailers can be referenced by either the full RetailerId or a Retailer Alias.
As a general rule of thumb, if you have the retailer
The Retailer alias format is:
For passing the retailer when creating a cart, you get the store info from the retailers API:
curl "https://graph.whisk.com/v1/retailers?country=US&zipcode=95050" \
-H "Accept: application/json" \
-H "Authorization: Token <TOKEN>"Sample response (some data collapsed/excluded)
{ "retailers":[ { "id":"103ba72991985be40739d8bf3bdf2807504", "name":"Walmart", ... "metadata":{ "branch":"2082" } }, ... ]}
Then you can pass in either the retailer id: (recommended){ "retailerId": "103ba72991985be40739d8bf3bdf2807504",...} or the retailer-country-branch:{"retailerId": "Walmart-US-2082",...}
If you have
It is possible to use retailer alias to skip "get available retailers" phase.
The alias should be built with this rule: [RetailerName]-[Country code]
e.g. AmazonFresh-GB
.
If a retailer is available in only one country it is possible to use only name e.g. Tesco
.
Note, that only retailers which do not require zipcode can be used as aliases. You can find retailers required zipcode in the table above.
Last updated