curl --request POST \
--url https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo",
"salesPrice": 543,
"regularPrice": 543,
"quantity": 100,
"weight": 2,
"categoryInformation": [
"breakfast menu"
],
"tagInformation": [
"vegan"
],
"description": "Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.",
"shortDescription": "Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff",
"hide": false,
"active": true,
"outOfStock": false,
"displayOrder": 1,
"width": 100,
"height": 200,
"depth": 20,
"isShippingEnabled": true,
"seo": {
"title": "Head and Shoulders",
"description": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair",
"image": {
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
},
"images": [
{
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "https://images.aasaan.app/123412421"
}
],
"brandInformation": "Nike",
"metaData": {},
"variantAttributeValues": [
{
"name": "color",
"value": [
"blue, yellow, green"
]
}
]
}
'import requests
url = "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}"
payload = {
"name": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo",
"salesPrice": 543,
"regularPrice": 543,
"quantity": 100,
"weight": 2,
"categoryInformation": ["breakfast menu"],
"tagInformation": ["vegan"],
"description": "Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.",
"shortDescription": "Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff",
"hide": False,
"active": True,
"outOfStock": False,
"displayOrder": 1,
"width": 100,
"height": 200,
"depth": 20,
"isShippingEnabled": True,
"seo": {
"title": "Head and Shoulders",
"description": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair",
"image": {
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
},
"images": [
{
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "https://images.aasaan.app/123412421"
}
],
"brandInformation": "Nike",
"metaData": {},
"variantAttributeValues": [
{
"name": "color",
"value": ["blue, yellow, green"]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Head & Shoulders Anti Hairfall Anti Dandruff Shampoo',
salesPrice: 543,
regularPrice: 543,
quantity: 100,
weight: 2,
categoryInformation: ['breakfast menu'],
tagInformation: ['vegan'],
description: 'Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.',
shortDescription: 'Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff',
hide: false,
active: true,
outOfStock: false,
displayOrder: 1,
width: 100,
height: 200,
depth: 20,
isShippingEnabled: true,
seo: {
title: 'Head and Shoulders',
description: 'Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair',
image: {url: 'https://images.aasaan.app/123412421', type: 'image/png'}
},
images: [
{
id: 0,
url: 'https://images.aasaan.app/123412421',
type: 'https://images.aasaan.app/123412421'
}
],
brandInformation: 'Nike',
metaData: {},
variantAttributeValues: [{name: 'color', value: ['blue, yellow, green']}]
})
};
fetch('https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Head & Shoulders Anti Hairfall Anti Dandruff Shampoo',
'salesPrice' => 543,
'regularPrice' => 543,
'quantity' => 100,
'weight' => 2,
'categoryInformation' => [
'breakfast menu'
],
'tagInformation' => [
'vegan'
],
'description' => 'Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.',
'shortDescription' => 'Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff',
'hide' => false,
'active' => true,
'outOfStock' => false,
'displayOrder' => 1,
'width' => 100,
'height' => 200,
'depth' => 20,
'isShippingEnabled' => true,
'seo' => [
'title' => 'Head and Shoulders',
'description' => 'Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair',
'image' => [
'url' => 'https://images.aasaan.app/123412421',
'type' => 'image/png'
]
],
'images' => [
[
'id' => 0,
'url' => 'https://images.aasaan.app/123412421',
'type' => 'https://images.aasaan.app/123412421'
]
],
'brandInformation' => 'Nike',
'metaData' => [
],
'variantAttributeValues' => [
[
'name' => 'color',
'value' => [
'blue, yellow, green'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}"
payload := strings.NewReader("{\n \"name\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo\",\n \"salesPrice\": 543,\n \"regularPrice\": 543,\n \"quantity\": 100,\n \"weight\": 2,\n \"categoryInformation\": [\n \"breakfast menu\"\n ],\n \"tagInformation\": [\n \"vegan\"\n ],\n \"description\": \"Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.\",\n \"shortDescription\": \"Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff\",\n \"hide\": false,\n \"active\": true,\n \"outOfStock\": false,\n \"displayOrder\": 1,\n \"width\": 100,\n \"height\": 200,\n \"depth\": 20,\n \"isShippingEnabled\": true,\n \"seo\": {\n \"title\": \"Head and Shoulders\",\n \"description\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair\",\n \"image\": {\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\n }\n },\n \"images\": [\n {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"https://images.aasaan.app/123412421\"\n }\n ],\n \"brandInformation\": \"Nike\",\n \"metaData\": {},\n \"variantAttributeValues\": [\n {\n \"name\": \"color\",\n \"value\": [\n \"blue, yellow, green\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo\",\n \"salesPrice\": 543,\n \"regularPrice\": 543,\n \"quantity\": 100,\n \"weight\": 2,\n \"categoryInformation\": [\n \"breakfast menu\"\n ],\n \"tagInformation\": [\n \"vegan\"\n ],\n \"description\": \"Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.\",\n \"shortDescription\": \"Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff\",\n \"hide\": false,\n \"active\": true,\n \"outOfStock\": false,\n \"displayOrder\": 1,\n \"width\": 100,\n \"height\": 200,\n \"depth\": 20,\n \"isShippingEnabled\": true,\n \"seo\": {\n \"title\": \"Head and Shoulders\",\n \"description\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair\",\n \"image\": {\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\n }\n },\n \"images\": [\n {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"https://images.aasaan.app/123412421\"\n }\n ],\n \"brandInformation\": \"Nike\",\n \"metaData\": {},\n \"variantAttributeValues\": [\n {\n \"name\": \"color\",\n \"value\": [\n \"blue, yellow, green\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo\",\n \"salesPrice\": 543,\n \"regularPrice\": 543,\n \"quantity\": 100,\n \"weight\": 2,\n \"categoryInformation\": [\n \"breakfast menu\"\n ],\n \"tagInformation\": [\n \"vegan\"\n ],\n \"description\": \"Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.\",\n \"shortDescription\": \"Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff\",\n \"hide\": false,\n \"active\": true,\n \"outOfStock\": false,\n \"displayOrder\": 1,\n \"width\": 100,\n \"height\": 200,\n \"depth\": 20,\n \"isShippingEnabled\": true,\n \"seo\": {\n \"title\": \"Head and Shoulders\",\n \"description\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair\",\n \"image\": {\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\n }\n },\n \"images\": [\n {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"https://images.aasaan.app/123412421\"\n }\n ],\n \"brandInformation\": \"Nike\",\n \"metaData\": {},\n \"variantAttributeValues\": [\n {\n \"name\": \"color\",\n \"value\": [\n \"blue, yellow, green\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "623d3455ec3c4b3548eb4a343",
"name": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo",
"slug": "head_shoulders_anti_hairfall_anti_dandruff_shampoo_650_ml_22",
"salesPrice": 543,
"regularPrice": 543,
"quantity": 1,
"description": "Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.",
"shortDescription": "Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff",
"hide": false,
"active": true,
"outOfStock": false,
"displayOrder": 1,
"width": 100,
"height": 200,
"depth": 20,
"weight": 500,
"isShippingEnabled": true,
"isVariantEnabled": true,
"variantAttributeValues": [
{
"name": "color",
"value": [
"blue, yellow, green"
]
}
],
"seo": {
"title": "Head and Shoulders",
"description": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair",
"image": {
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
},
"categories": [
{
"id": "1231231",
"name": "Shampoos and Soaps"
}
],
"images": [
{
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
],
"brand": {
"id": "636f2e876e9de14bfe1b02fa",
"name": "P&G"
},
"metaData": {},
"variants": [
{
"id": "567152378158871683",
"name": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo 600ml",
"salesPrice": 800,
"regularPrice": 800,
"quantity": 10,
"description": "",
"shortDescription": "",
"hide": false,
"active": true,
"outOfStock": false,
"width": 10,
"height": 10,
"depth": 10,
"weight": 10,
"isShippingEnabled": true,
"images": [
{
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
],
"date_created": "2022-03-25T03:17:44.092Z",
"date_modified": "2022-06-10T07:51:12.510Z"
}
],
"date_created": "2022-03-25T03:17:44.092Z",
"date_modified": "2022-06-10T07:51:12.510Z"
}Create a new product.
Create a new product.
curl --request POST \
--url https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo",
"salesPrice": 543,
"regularPrice": 543,
"quantity": 100,
"weight": 2,
"categoryInformation": [
"breakfast menu"
],
"tagInformation": [
"vegan"
],
"description": "Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.",
"shortDescription": "Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff",
"hide": false,
"active": true,
"outOfStock": false,
"displayOrder": 1,
"width": 100,
"height": 200,
"depth": 20,
"isShippingEnabled": true,
"seo": {
"title": "Head and Shoulders",
"description": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair",
"image": {
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
},
"images": [
{
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "https://images.aasaan.app/123412421"
}
],
"brandInformation": "Nike",
"metaData": {},
"variantAttributeValues": [
{
"name": "color",
"value": [
"blue, yellow, green"
]
}
]
}
'import requests
url = "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}"
payload = {
"name": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo",
"salesPrice": 543,
"regularPrice": 543,
"quantity": 100,
"weight": 2,
"categoryInformation": ["breakfast menu"],
"tagInformation": ["vegan"],
"description": "Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.",
"shortDescription": "Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff",
"hide": False,
"active": True,
"outOfStock": False,
"displayOrder": 1,
"width": 100,
"height": 200,
"depth": 20,
"isShippingEnabled": True,
"seo": {
"title": "Head and Shoulders",
"description": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair",
"image": {
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
},
"images": [
{
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "https://images.aasaan.app/123412421"
}
],
"brandInformation": "Nike",
"metaData": {},
"variantAttributeValues": [
{
"name": "color",
"value": ["blue, yellow, green"]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Head & Shoulders Anti Hairfall Anti Dandruff Shampoo',
salesPrice: 543,
regularPrice: 543,
quantity: 100,
weight: 2,
categoryInformation: ['breakfast menu'],
tagInformation: ['vegan'],
description: 'Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.',
shortDescription: 'Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff',
hide: false,
active: true,
outOfStock: false,
displayOrder: 1,
width: 100,
height: 200,
depth: 20,
isShippingEnabled: true,
seo: {
title: 'Head and Shoulders',
description: 'Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair',
image: {url: 'https://images.aasaan.app/123412421', type: 'image/png'}
},
images: [
{
id: 0,
url: 'https://images.aasaan.app/123412421',
type: 'https://images.aasaan.app/123412421'
}
],
brandInformation: 'Nike',
metaData: {},
variantAttributeValues: [{name: 'color', value: ['blue, yellow, green']}]
})
};
fetch('https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Head & Shoulders Anti Hairfall Anti Dandruff Shampoo',
'salesPrice' => 543,
'regularPrice' => 543,
'quantity' => 100,
'weight' => 2,
'categoryInformation' => [
'breakfast menu'
],
'tagInformation' => [
'vegan'
],
'description' => 'Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.',
'shortDescription' => 'Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff',
'hide' => false,
'active' => true,
'outOfStock' => false,
'displayOrder' => 1,
'width' => 100,
'height' => 200,
'depth' => 20,
'isShippingEnabled' => true,
'seo' => [
'title' => 'Head and Shoulders',
'description' => 'Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair',
'image' => [
'url' => 'https://images.aasaan.app/123412421',
'type' => 'image/png'
]
],
'images' => [
[
'id' => 0,
'url' => 'https://images.aasaan.app/123412421',
'type' => 'https://images.aasaan.app/123412421'
]
],
'brandInformation' => 'Nike',
'metaData' => [
],
'variantAttributeValues' => [
[
'name' => 'color',
'value' => [
'blue, yellow, green'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}"
payload := strings.NewReader("{\n \"name\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo\",\n \"salesPrice\": 543,\n \"regularPrice\": 543,\n \"quantity\": 100,\n \"weight\": 2,\n \"categoryInformation\": [\n \"breakfast menu\"\n ],\n \"tagInformation\": [\n \"vegan\"\n ],\n \"description\": \"Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.\",\n \"shortDescription\": \"Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff\",\n \"hide\": false,\n \"active\": true,\n \"outOfStock\": false,\n \"displayOrder\": 1,\n \"width\": 100,\n \"height\": 200,\n \"depth\": 20,\n \"isShippingEnabled\": true,\n \"seo\": {\n \"title\": \"Head and Shoulders\",\n \"description\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair\",\n \"image\": {\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\n }\n },\n \"images\": [\n {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"https://images.aasaan.app/123412421\"\n }\n ],\n \"brandInformation\": \"Nike\",\n \"metaData\": {},\n \"variantAttributeValues\": [\n {\n \"name\": \"color\",\n \"value\": [\n \"blue, yellow, green\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo\",\n \"salesPrice\": 543,\n \"regularPrice\": 543,\n \"quantity\": 100,\n \"weight\": 2,\n \"categoryInformation\": [\n \"breakfast menu\"\n ],\n \"tagInformation\": [\n \"vegan\"\n ],\n \"description\": \"Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.\",\n \"shortDescription\": \"Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff\",\n \"hide\": false,\n \"active\": true,\n \"outOfStock\": false,\n \"displayOrder\": 1,\n \"width\": 100,\n \"height\": 200,\n \"depth\": 20,\n \"isShippingEnabled\": true,\n \"seo\": {\n \"title\": \"Head and Shoulders\",\n \"description\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair\",\n \"image\": {\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\n }\n },\n \"images\": [\n {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"https://images.aasaan.app/123412421\"\n }\n ],\n \"brandInformation\": \"Nike\",\n \"metaData\": {},\n \"variantAttributeValues\": [\n {\n \"name\": \"color\",\n \"value\": [\n \"blue, yellow, green\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/products/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo\",\n \"salesPrice\": 543,\n \"regularPrice\": 543,\n \"quantity\": 100,\n \"weight\": 2,\n \"categoryInformation\": [\n \"breakfast menu\"\n ],\n \"tagInformation\": [\n \"vegan\"\n ],\n \"description\": \"Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.\",\n \"shortDescription\": \"Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff\",\n \"hide\": false,\n \"active\": true,\n \"outOfStock\": false,\n \"displayOrder\": 1,\n \"width\": 100,\n \"height\": 200,\n \"depth\": 20,\n \"isShippingEnabled\": true,\n \"seo\": {\n \"title\": \"Head and Shoulders\",\n \"description\": \"Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair\",\n \"image\": {\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\n }\n },\n \"images\": [\n {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"https://images.aasaan.app/123412421\"\n }\n ],\n \"brandInformation\": \"Nike\",\n \"metaData\": {},\n \"variantAttributeValues\": [\n {\n \"name\": \"color\",\n \"value\": [\n \"blue, yellow, green\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "623d3455ec3c4b3548eb4a343",
"name": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo",
"slug": "head_shoulders_anti_hairfall_anti_dandruff_shampoo_650_ml_22",
"salesPrice": 543,
"regularPrice": 543,
"quantity": 1,
"description": "Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day.",
"shortDescription": "Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff",
"hide": false,
"active": true,
"outOfStock": false,
"displayOrder": 1,
"width": 100,
"height": 200,
"depth": 20,
"weight": 500,
"isShippingEnabled": true,
"isVariantEnabled": true,
"variantAttributeValues": [
{
"name": "color",
"value": [
"blue, yellow, green"
]
}
],
"seo": {
"title": "Head and Shoulders",
"description": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair",
"image": {
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
},
"categories": [
{
"id": "1231231",
"name": "Shampoos and Soaps"
}
],
"images": [
{
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
],
"brand": {
"id": "636f2e876e9de14bfe1b02fa",
"name": "P&G"
},
"metaData": {},
"variants": [
{
"id": "567152378158871683",
"name": "Head & Shoulders Anti Hairfall Anti Dandruff Shampoo 600ml",
"salesPrice": 800,
"regularPrice": 800,
"quantity": 10,
"description": "",
"shortDescription": "",
"hide": false,
"active": true,
"outOfStock": false,
"width": 10,
"height": 10,
"depth": 10,
"weight": 10,
"isShippingEnabled": true,
"images": [
{
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
],
"date_created": "2022-03-25T03:17:44.092Z",
"date_modified": "2022-06-10T07:51:12.510Z"
}
],
"date_created": "2022-03-25T03:17:44.092Z",
"date_modified": "2022-06-10T07:51:12.510Z"
}Path Parameters
Body
Product description
"Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day."
Response
Product created.
Product description
"Now, ensure the good health of your hair with Head & Shoulders Anti Hairfall Anti Dandruff Shampoo that strengthens hair from its roots and cures dandruff. Be it dry, frizzy, or damaged, this shampoo can bring back the younger days of your hair within just a few days. The shampoo is richly indulgent and improves the experience of washing your hair. It makes your hair dandruff-free up to 100%. Do not fret over chemicals as the product is gentle in use and can be used every day."
