Store Transfer

POST
/v1beta/carts/checkout

You can perform Store Transfer operations by submitting list of sku with corresponding amounts. Alternatively you can also provide list of raw items for retailers like AmazonFresh and Instacart.

Parameters

ATTRIBUTETYPEDESCRIPTION
retailerId*string

Retailer Id to perform Checkout for. (short names can be used)

credentialsobject

Authentication credentials in store. Might be Basic or OAuth

itemsarray [QuickCheckoutItem]

Items to checkout. Include sku - the item identifier in Retailer and quantity

extraobject

Extra properties which might be specific to retailer

CheckoutItem

ATTRIBUTETYPEDESCRIPTION
storeItemStoreItemCheckoutValue
rawRawItemCheckoutValue

StoreItemCheckoutValue

ATTRIBUTETYPEDESCRIPTION
sku*string

item identifier in Retailer

quantityinteger

Number of items to checkout

Default value: 1

RawItemCheckoutValue

ATTRIBUTETYPEDESCRIPTION
name*string

Raw item text. Example: 1 tbsp sugar

Credentials

ATTRIBUTETYPEDESCRIPTION
basicBasicCredentials

Basic credantials, login and password

oauthOAuthCredentials

Basic credantials, login and password

BasicCredentials

ATTRIBUTETYPEDESCRIPTION
username*string
password*string

OAuthCredentials

ATTRIBUTETYPEDESCRIPTION
token*string

OAuth token

Sample Request

curl -X POST "https://graph.whisk.com/v1beta/carts/checkout" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Token <Access-Token>" \ -d '{ "items": [ { "storeItem": { "sku": "278272994", "quantity": 1 } }, { "storeItem": { "sku": "258270595" } } ], "retailerId": "tesco", "credentials": { "basic": { "username": "[email protected]", "password": "s3cret" } } }'

Example with AmazonFresh

curl -X POST "https://graph.whisk.com/v1beta/carts/checkout" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Token <Access-Token>" \ -d '{ "items": [ { "raw": { "name": "4 large eggs" } }, { "raw": { "name": "handful basil leaves" } } ], "retailerId": "amazonfresh-us" }'

CheckoutResponse

ATTRIBUTETYPEDESCRIPTION
status*enum

status indicates state of checkout and provides info on following action user need to take.

Possible values: CompleteCheckoutUrlProvided, ItemsTransferred.
itemsarray [CheckedOutItem]

list of items added to basket (if applicable)

completeCheckoutUrlstring

url to complete checkout (if applicable)

CheckedOutItem

ATTRIBUTETYPEDESCRIPTION
sku*string

item identifier in store

status*enum

status indicates whether an item was added to retailers cart or not

Possible values: CheckedOut, Failed.
itemInventoryItem

item details

InventoryItem

ATTRIBUTETYPEDESCRIPTION
sku*string

item identifier in store

name*string

item name

quantity*object

count of items

url*string

direct item url

price*Price

item price

images*array [ResponsiveImage]

responsive images

Price

ATTRIBUTETYPEDESCRIPTION
listnumber

Total price

Sample Response

{ "items": [ { "sku": "278272994", "status": "CheckedOut", "item": { "sku": "278272994", "name": "Tesco Pitted Kalamata Olives In Brine 290G", "quantity": { "count": 1 }, "url": "https://www.tesco.com/groceries/en-GB/products/278272994", "price": { "list": 1.89 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/476/5053947314476/IDShot_540x540.jpg" } ] } }, { "sku": "258270595", "status": "CheckedOut", "item": { "sku": "258270595", "name": "Tesco Green Peppers Each", "quantity": { "count": 1 }, "url": "https://www.tesco.com/groceries/en-GB/products/258270595", "price": { "list": 0.55 }, "images": [ { "url": "https://img.tesco.com/Groceries/pi/000/0200350000000/IDShot_540x540.jpg" } ] } } ] }