Create a new brand.
curl --request POST \
--url https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/brands/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Head & Shoulders",
"slug": "head_shoulders",
"description": "Head & Shoulders",
"hide": false,
"displayOrder": 0,
"active": "true",
"image": {
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
}
'import requests
url = "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/brands/{id}"
payload = {
"name": "Head & Shoulders",
"slug": "head_shoulders",
"description": "Head & Shoulders",
"hide": False,
"displayOrder": 0,
"active": "true",
"image": {
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
}
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',
slug: 'head_shoulders',
description: 'Head & Shoulders',
hide: false,
displayOrder: 0,
active: 'true',
image: {id: 0, url: 'https://images.aasaan.app/123412421', type: 'image/png'}
})
};
fetch('https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/brands/{id}', 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}/brands/{id}",
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',
'slug' => 'head_shoulders',
'description' => 'Head & Shoulders',
'hide' => false,
'displayOrder' => 0,
'active' => 'true',
'image' => [
'id' => 0,
'url' => 'https://images.aasaan.app/123412421',
'type' => 'image/png'
]
]),
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}/brands/{id}"
payload := strings.NewReader("{\n \"name\": \"Head & Shoulders\",\n \"slug\": \"head_shoulders\",\n \"description\": \"Head & Shoulders\",\n \"hide\": false,\n \"displayOrder\": 0,\n \"active\": \"true\",\n \"image\": {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\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}/brands/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Head & Shoulders\",\n \"slug\": \"head_shoulders\",\n \"description\": \"Head & Shoulders\",\n \"hide\": false,\n \"displayOrder\": 0,\n \"active\": \"true\",\n \"image\": {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/brands/{id}")
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\",\n \"slug\": \"head_shoulders\",\n \"description\": \"Head & Shoulders\",\n \"hide\": false,\n \"displayOrder\": 0,\n \"active\": \"true\",\n \"image\": {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "external-brand-id-1",
"name": "Head & Shoulders",
"slug": "head_shoulders",
"description": "Head & Shoulders",
"hide": false,
"displayOrder": 0,
"active": "true",
"image": {
"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"
}Brand
Create a new brand.
Create a new brand.
POST
/
{storeId}
/
brands
/
{id}
Create a new brand.
curl --request POST \
--url https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/brands/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "Head & Shoulders",
"slug": "head_shoulders",
"description": "Head & Shoulders",
"hide": false,
"displayOrder": 0,
"active": "true",
"image": {
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
}
'import requests
url = "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/brands/{id}"
payload = {
"name": "Head & Shoulders",
"slug": "head_shoulders",
"description": "Head & Shoulders",
"hide": False,
"displayOrder": 0,
"active": "true",
"image": {
"id": 0,
"url": "https://images.aasaan.app/123412421",
"type": "image/png"
}
}
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',
slug: 'head_shoulders',
description: 'Head & Shoulders',
hide: false,
displayOrder: 0,
active: 'true',
image: {id: 0, url: 'https://images.aasaan.app/123412421', type: 'image/png'}
})
};
fetch('https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/brands/{id}', 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}/brands/{id}",
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',
'slug' => 'head_shoulders',
'description' => 'Head & Shoulders',
'hide' => false,
'displayOrder' => 0,
'active' => 'true',
'image' => [
'id' => 0,
'url' => 'https://images.aasaan.app/123412421',
'type' => 'image/png'
]
]),
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}/brands/{id}"
payload := strings.NewReader("{\n \"name\": \"Head & Shoulders\",\n \"slug\": \"head_shoulders\",\n \"description\": \"Head & Shoulders\",\n \"hide\": false,\n \"displayOrder\": 0,\n \"active\": \"true\",\n \"image\": {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\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}/brands/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Head & Shoulders\",\n \"slug\": \"head_shoulders\",\n \"description\": \"Head & Shoulders\",\n \"hide\": false,\n \"displayOrder\": 0,\n \"active\": \"true\",\n \"image\": {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/brands/{id}")
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\",\n \"slug\": \"head_shoulders\",\n \"description\": \"Head & Shoulders\",\n \"hide\": false,\n \"displayOrder\": 0,\n \"active\": \"true\",\n \"image\": {\n \"id\": 0,\n \"url\": \"https://images.aasaan.app/123412421\",\n \"type\": \"image/png\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "external-brand-id-1",
"name": "Head & Shoulders",
"slug": "head_shoulders",
"description": "Head & Shoulders",
"hide": false,
"displayOrder": 0,
"active": "true",
"image": {
"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"
}Body
application/json
Name
Example:
"Head & Shoulders"
Slug
Example:
"head_shoulders"
Head & Shoulders brand
Example:
"Head & Shoulders"
Hide a brand
Example:
false
Display order
Example:
0
Activate the brand
Example:
"true"
Brand image
Show child attributes
Show child attributes
Response
Brand created.
Unique identifier for the resource that was used to create this brand
Example:
"external-brand-id-1"
Name
Example:
"Head & Shoulders"
Slug
Example:
"head_shoulders"
Head & Shoulders brand
Example:
"Head & Shoulders"
Hide a brand
Example:
false
Display order
Example:
0
Activate the brand
Example:
"true"
Brand image
Show child attributes
Show child attributes
Created date
Example:
"2022-03-25T03:17:44.092Z"
Modified date
Example:
"2022-06-10T07:51:12.510Z"
⌘I
