API
Inventory

Inventory API

This API is used to fetch all the products for a given category that are present in our system.

ParameterValueDetails
URL/api/v1/brands/{brand_id}/categories/{category}/inventories
MethodPOST
URL Parameterbrand_idA unique brand id. Can be obtained from mirrAR POC
categoryA category in our system. Can be obtained from categories API.
Body DatalimitA number from 1 - 100. Defines the number of products that will be returned per page.
filter_field[key]Used to filter out the products on the basis of a key in the data. Eg. filter_field[disable]: 0
sort_fieldA key in the object on which sorting will happen. Eg. collection
sort_byA string "asc" or "desc". Defines the order of sorting.

Example Curl

curl 'https://m.mirrar.com/api/v1/brands/{brand_id}/categories/{category}/inventories' \
  -H 'accept: */*' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \
  -H 'pragma: no-cache' \
  -H 'priority: u=1, i' \
  -H 'sec-ch-ua: "Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  --data-raw 'limit=24&filter_field%5Bdisable%5D=0&filter_field%5BisSetOnly%5D=0&sort_field=order_key&sort_by=asc'

Response

{
    "data": [
        {
            "data": {
                "disable": 0,
                "image_url": "https://s3.ap-south-1.amazonaws.com/mirrar/meghnademo/Earrings/Earrings-44868.png",
                "location": "",
                "material_type": "",
                "picker_value": "View Details",
                "sub_category": "Bali",
                "total_price": "23863",
                "metal_purity_(in_kt)": "18",
                "metal_type": "Gold"
            },
            "height": 36.4,
            "inventory": [
                {
                    "product_code": "Earrings-44868",
                    "sub_category": "Short Earring",
                    "total_price": "238630",
                    "metal_purity_(in_kt)": "18",
                    "metal_type": "White Gold",
                    "metal_weight_(in_gms)": "7.44",
                    "diamond_type": "JK SI",
                    "gemstone_color": "Silver",
                    "gemstone_type": "Diamond",
                    "location": "Location_2",
                    "store_name": "Store 2",
                    "diamond_weight_(in_kt)": "0.64",
                    "gemstone_weight_(in_kt)": "4.56, 2.43"
                }
            ],
            "is_uploaded": true,
            "product_code": "Earrings-44868",
            "shine_count": "0",
            "size_multiplier": 1,
            "x_offset": 0.9,
            "y_offset": -3,
            "is_calibrated": true,
            "order_key": "2",
            "meta": {
                "model": "1"
            },
            "total_price": "23863",
            "collection": "",
            "brand_id": "",
            "disable": 0,
            "camera_mode_enabled": 1,
            "gallery_mode_enabled": 1,
            "studio_mode_enabled": 1,
            "isSetOnly": 0,
            "position": 0
        },
        {
            "data": {
                "disable": 0,
                "image_url": "https://s3.ap-south-1.amazonaws.com/mirrar/meghnademo/Earrings/Earrings-632.png",
                "location": "",
                "material_type": "",
                "picker_value": "View Details",
                "sub_category": "Studs",
                "total_price": "9800",
                "collection": "Fancy",
                "metal_purity_(in_kt)": "21",
                "metal_type": "Yellow, White Gold, Pink Gold",
                "dangle_points": [
                    {
                        "y": 1,
                        "intensity": 0
                    }
                ]
            },
            "height": 63,
            "inventory": [
                {
                    "product_code": "Earrings-632",
                    "sub_category": "Long Earring",
                    "collection": "Fancy",
                    "total_price": "198000",
                    "metal_purity_(in_kt)": "21",
                    "metal_type": "White Gold",
                    "metal_weight_(in_gms)": "4.684, 2.54, 0.05",
                    "diamond_type": "JK SI",
                    "location": "Location_2",
                    "store_name": "Store 3",
                    "diamond_weight_(in_kt)": "0.68"
                }
            ],
            "is_uploaded": true,
            "product_code": "Earrings-632",
            "shine_count": "3",
            "size_multiplier": 1,
            "x_offset": 0,
            "y_offset": -8,
            "is_calibrated": true,
            "order_key": "3",
            "meta": {
                "model": "1"
            },
            "total_price": "9800",
            "collection": "Fancy",
            "brand_id": "",
            "disable": 0,
            "camera_mode_enabled": 1,
            "gallery_mode_enabled": 1,
            "studio_mode_enabled": 1,
            "isSetOnly": 0,
            "position": 1
        }
    ],
    "meta": {
        "error_code": "",
        "message": "Success",
        "total": 1,
        "has_more_pages": false,
        "current_page": 1,
        "total_record": 16,
        "sets_info": [
            {
                "Sets": {
                    "category": "Sets",
                    "label": "Sets",
                    "type": "set",
                    "sets_info": [
                        {
                            "set_category": "Sets",
                            "category": "Earrings",
                            "type": "ear",
                            "category_singular": "earring",
                            "data_key": "earring_data",
                            "code_key": "earring"
                        },
                        {
                            "set_category": "Sets",
                            "category": "Necklaces",
                            "type": "neck",
                            "category_singular": "necklace",
                            "data_key": "necklace_data",
                            "code_key": "necklace"
                        }
                    ]
                }
            }
        ]
    }
}