/
API Documentation for Onboarding Brands

API Documentation for Onboarding Brands

Onboarding Brands

For onboarding brands, we required you to share a CSV file link that automatically updates the available product list.

Header of CSV file should be these 

  • 'ID', 

  • 'availability', 

  • 'title', 

  • 'link', 

  • 'image_link', 

  • 'sale_price', 

  • 'Price',

Example LInk: https://storage.googleapis.com/product-feed-app/bonanza-satrangi-pk.myshopify.com-facebook.csv

  • The brand needs to assign a unique identifier(using cookies) to each user when they visit the site. The identifier consider as user_id 


PostMan API workspace: 

https://app.getpostman.com/join-team?invite_code=6317bedbf302547c2e4e232f3c3d275b&target_code=daea87b6c9eb2ef0d3fc1f02d41e15a5

  • When the user visits our website the following get API executed with the unique user_id 

get  /shopcast/recommender/{user_id}

Response

Example API header

https://prod-shopcast-revamp.shopdev.co/shopcast/recommender/kitchencuisine_5619554

  • In headers add the following key-value pair

key

value

Authorization

API_KEY

To get the response

The response of the API gives the JSON file of 

User to item

It includes the following data

{ "product_id": 9938, "status": "in stock", "name": "Sour Cream & Onion", "url": "https://kitchencuisine.com.pk/lhr/sour-cream-onion-sour-cream-onion", "image": "https://kitchencuisine.com.pk/pub/media/catalog/product/cache//380x/beff4985b56e3afdbeabfc89641a4582/s/o/sour_cream_onion_kc-32007c_rs._295.jpg", "price": "PKR 350.00", "original_price": "PKR 350.00", "unique": "API_KEY" },

TopRated

It includes the following data

"topRated": [ { "product_id": 8475, "status": "in stock", "name": "Snow Spray", "url": "https://kitchencuisine.com.pk/lhr/snow-spray-snow-spray", "image": "https://kitchencuisine.com.pk/pub/media/catalog/product/cache//380x/beff4985b56e3afdbeabfc89641a4582/s/n/snow-spray.jpg", "price": "PKR 200.00", "original_price": "PKR 200.00", "unique": "API_KEY" },

GET /shopcast/recommender/{user_id}/{item_id}

Example API header

https://prod-shopcast-revamp.shopdev.co/shopcast/recommender/kitchencuisine_5619554

In headers add the following key-value pair

key

value

Authorization

API_key

To get the response

The response of the API gives the JSON file of 

User to item

It includes the following data

{ "product_id": 9322, "status": "in stock", "name": "Tipi Cake", "url": "https://kitchencuisine.com.pk/lhr/f-041-tipi-cake", "image": "https://kitchencuisine.com.pk/pub/media/catalog/product/cache//380x/beff4985b56e3afdbeabfc89641a4582/f/-/f-041.jpg", "price": "PKR 7,600.00", "original_price": "PKR 7,600.00", "unique": "API_KEY" },

Item to Item

It includes the following data and has the utmost 10 iterations

{ "product_id": 9839, "status": "in stock", "name": "Cream Cheese", "url": "https://kitchencuisine.com.pk/lhr/cream-cheese-cream-cheese", "image":"https://kitchencuisine.com.pk/pub/media/catalog/product/cache//380x/beff4985b56e3afdbeabfc89641a4582/c/r/cream-cheese.jpg", "price": "PKR 240.00", "original_price": "PKR 240.00", "unique": "API_KEY" }

Top Rated

It includes the following data

{ "product_id": 9572, "status": "in stock", "name": "Supper Heroes", "url": "https://kitchencuisine.com.pk/lhr/f-114-supper-heroes", "image": "https://kitchencuisine.com.pk/pub/media/catalog/product/cache//380x/beff4985b56e3afdbeabfc89641a4582/f/-/f-114.jpg", "price": "PKR 7,600.00", "original_price": "PKR 7,600.00", "unique": "API_KEY" },

Product Purchase API

https://shopcast-app-datacollector-gj5rw6eyra-uc.a.run.app/productpurchase/

In body pass JSON file containing Key Pair value

  • Product: Containing a list of  product Id

  • Uid: Unique User Id

  • Shop: Shop name

{ "product": ["6616366907552","6616366907552"], "uid" : "5663323095200", "shop" : "shopify_domain" } Response of Purchase { "Success": true, "message": "Record Inserted" }

Product View API

https://shopcast-app-datacollector-gj5rw6eyra-uc.a.run.app/productview/

In body pass JSON file containing Key Pair value

  • Product: Unique productId

  • Uid: Unique User Id

  • Shop: Shop name

Example:

{ "product": 34343, "uid" : "unique_user_id", "shop" : "shopify_domain" } Response of product view { "Success": true, "message": "Record Inserted" }

Shopcast Analytics 

https://prod-shopcast-revamp.shopdev.co/shopcast/analytics/ 

In body pass JSON file containing Key Pair value

  • Store: Store name

  • Start date: Start date of the store visit

  • End date: End date of the store visit

  • API key: Authentication token

Response

  • Total viewed:  total number of the viewed item of the store

  • Total purchased: total purchased items

  • Recommended purchased: recommended purchased

  • Recommended viewed: total number of recommended viewed product

  • Store: store name

Example:

{ "store":"shopify_domain", "start_date":"2021-01-01T07:30:22.518070", "end_date":"2021-10-18T07:30:22.518070", "api_key":"API_KEY" }

Response of product view

{ "total_viewed": 572681, "total_purchased": 5557, "recommended_purchased": 94, "recommended_viewed": 18396, "status": true, "store": "shopify_domain" }

 

Related content