Fetch SKUs


This API gives all the SKUs details present in sales channel catalogue(i.e. Sales channel listing).

Basic Information

  • Method: GET
  • URI: /skus
  • Response Format: JSON

Headers

The following headers should be sent along with the request

  • Accept: application/json
  • Authorization: Your API Key

Request

Below table list the request parameters which can be sent to Fetch SKUs API to filter records.

{info} The request parameters should be sent as query parameters in the URL.

Parameter Type Required Description
per_page Number No How many records you want at a time
page Number No Page number used for pagination
sku_codes[] Array of Strings No SKU codes to fetch. Only the matched items will be returned in the response


Sample Request

https://dev-fc-api.aymakan.net/api/v1/skus?per_page=10&page=1&sku_codes[]=SKU-TV-123451&sku_codes[]=SKU-MOB-789

Response

Sample response is added here:

{
    "success": true,
    "message": "",
    "data": [
        {
            "sku_code": "SKU-MOB-789",
            "name": "Smartphone",
            "description": "High-performance smartphone with advanced features.",
            "cost": 200,
            "retail_price": 499,
            "selling_price": 399,
            "display_selling_price": "399.00 SAR",
            "display_retail_price": "499.00 SAR",
            "category": [
                {
                    "name": "Electronics"
                },
                {
                    "name": "Mobile Phones"
                }
            ],
            "product": {
                "name": "",
                "handling_type": "",
                "unit": "",
                "type": "",
                "description": ""
            },
            "dimensions": {
                "length": {
                    "length": 15,
                    "unit": "cm"
                },
                "breadth": {
                    "breadth": 7,
                    "unit": "cm"
                },
                "height": {
                    "height": 0.8,
                    "unit": "cm"
                }
            },
            "barcodes": [
                "7654321098765",
                "2109876543210"
            ],
            "images": [
                {
                    "default": "https://images.unsplash.com/photo-1585060544812-6b45742d762f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8OHx8bW9iaWxlfGVufDB8fDB8fHww&auto=format&fit=crop&w=800&q=60",
                    "thumbnail": "https://images.unsplash.com/photo-1585060544812-6b45742d762f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8OHx8bW9iaWxlfGVufDB8fDB8fHww&auto=format&fit=crop&w=800&q=60",
                    "medium": "https://example.com/images/mobile/medium.jpg",
                    "large": "https://example.com/images/mobile/large.jpg",
                    "type": "image",
                    "description": "Smartphone image"
                }
            ],
            "attributes": [
                {
                    "name": "Storage Capacity",
                    "sku_attribute_variation": {
                        "name": "Variation 3"
                    }
                }
            ],
            "handling_type": "hot",
            "type": "simple",
            "status": "live",
            "unit": "",
            "is_perishable": false,
            "country_of_origin": "CountryZ",
            "is_weighted": false,
            "configuration": {
                "weight": {
                    "min": "0.2 kg",
                    "max": "0.3 kg",
                    "type": "fixed"
                }
            },
            "custom_attribute": [
                {
                    "key": "RAM",
                    "value": "8 GB"
                },
                {
                    "key": "Storage",
                    "value": "128 GB"
                }
            ],
            "created_by": "410",
            "updated_by": "",
            "created_at": "2023-08-21T09:59:47.349Z",
            "updated_at": "0001-01-01T00:00:00Z"
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 1,
        "total": 1
    }
}