Get a category by Id.
curl --request GET \
--url https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{id}import requests
url = "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{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}/categories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "623d3455ec3c4b3548eb4a322",
"name": "Shampoo",
"slug": "shampoo",
"description": "Hair categories",
"hide": false,
"displayOrder": 0,
"parentCategoryId": "6124bc492f3660f743776404",
"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"
}Category
Get a category by Id.
Returns a category.
GET
/
{storeId}
/
categories
/
{id}
Get a category by Id.
curl --request GET \
--url https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{id}import requests
url = "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{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}/categories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://partner-api.aasaan.shop/api/v1/partner-integrations/stores/{storeId}/categories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "623d3455ec3c4b3548eb4a322",
"name": "Shampoo",
"slug": "shampoo",
"description": "Hair categories",
"hide": false,
"displayOrder": 0,
"parentCategoryId": "6124bc492f3660f743776404",
"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"
}Response
Returns a category.
Unique identifier for the resource that was used to create this category
Example:
"623d3455ec3c4b3548eb4a322"
Name
Example:
"Shampoo"
Slug
Example:
"shampoo"
Shampoos and conditioners
Example:
"Hair categories"
Hide a category
Example:
false
Display order
Example:
0
Parent category id
Example:
"6124bc492f3660f743776404"
Category 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"
