Products


Get Product Count

Method URL
POST /products/count

Body Params (formData)

Field Name Required / Optional
channel required

Sample Request

var form = new FormData();
form.append("channel", "2");
form.append("rec_limit", "1");
form.append("page", "1");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "http://client.flexipim.com/api/v2/products/count",
  "method": "POST",
  "headers": {
    "token": "your-flexiPIM-API-token",
    "cache-control": "no-cache",
    "postman-token": "38986293-b354-4b15-eeda-c52f90a01b80"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

{success} Success Response

{
    "success": true,
    "data": {
        "total_count": 3,
        "total_page": 3,
        "record_limit": "1"
    },
    "message": "Products retrieved successfully."
}

{danger} Error Response

{
    "success": false,
    "message": "Error",
    "data": "token required"
}

Get Product List

Method URL
POST /products

Body Params (formData)

Field Name Required / Optional
language optional
channel required
page optional
rec_limit optional

Sample Request

var form = new FormData();
form.append("channel", "2");
form.append("rec_limit", "1");
form.append("page", "1");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "http://client.flexipim.com/api/v2/products",
  "method": "POST",
  "headers": {
    "token": "your-flexiPIM-API-token",
    "cache-control": "no-cache",
    "postman-token": "26489c54-ff70-5e51-4da5-8b2acf14fa8e"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

{success} Success Response

{
    "success": true,
    "data": [
        {
            "id": 2842,
            "sku": "sample_product_one",
            "name": "Sample Product One",
            "decsription": "
<p>sample product one description</p>",
            "status": 1,
            "family_info": [
                {
                    "id": 1,
                    "code": "amazon_hobbies_family",
                    "name": "Amazon Hobbies Family Sets"
                }
            ],
            "category_info": [
                {
                    "id": 49,
                    "code": "code",
                    "name": "code"
                }
            ],
            "manufacturer": "Hornby",
            "average_review_rating": "3",
            "visibility": null,
            "multiselect": "Green",
            "description": "sample product one description",
            "big_commerce_weight": "10.00",
            "bigcommerce_price": "10.00",
            "qty": "20.00",
            "is_in_stock": "1.00",
            "quantity_and_stock_status": "3.00",
            "price": "300.0000 USD",
            "magento_price": "1.0000 1"
        }
    ],
    "count": {
        "total_count": 3,
        "total_page": 3
    },
    "message": "Products retrieved successfully."
}

{danger} Error Response

{
    "success": false,
    "message": "Error",
    "data": "token required"
}

Get Related Product Asset

Method URL
POST /productsAssests

Body Params (formData)

Field Name Required / Optional
id optional
channel required
language optional

Sample Request

var form = new FormData();
form.append("channel", "3");
form.append("rec_limit", "1");
form.append("page", "1");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "http://client.flexipim.com/api/v2/productsAssests",
  "method": "POST",
  "headers": {
    "token": "your-flexiPIM-API-token",
    "cache-control": "no-cache",
    "postman-token": "db7ae40b-58c3-6efd-b269-2786d06ed56b"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

{success} Success Response

{
    "success": true,
    "data": [
        {
            "sku": "mass1",
            "assets": [
                {
                    "url": "http://client.flexipim.com/storage/product_assets/media/1578951716_4CPSS_0_5.jpg",
                    "default": 0,
                    "meta_title": ""
                },
                {
                    "url": "http://client.flexipim.com/storage/product_assets/media/1578951718_84RASS_0_36.jpg",
                    "default": 0,
                    "meta_title": ""
                },
                {
                    "url": "http://client.flexipim.com/storage/product_assets/media/1578951718_8PHSS_0_12.jpg",
                    "default": 0,
                    "meta_title": ""
                }
            ]
        }
    ],
    "count": {
        "total_count": 1,
        "total_page": 1
    },
    "message": "Products retrieved successfully."
}

{danger} Error Response

{
    "success": false,
    "message": "Error",
    "data": "token required"
}

Get Related Product List

Method URL
POST /products/relatedProducts

Body Params (formData)

Field Name Required / Optional
id required
language optional

Sample Request

var form = new FormData();
form.append("id", "");

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "http://client.flexipim.com/api/v2/products/getRelatedProducts",
  "method": "POST",
  "headers": {
    "token": "your-flexiPIM-API-token",
    "cache-control": "no-cache",
    "postman-token": "5bba2dec-9ee1-1bd2-c7d0-e48e430f75c8"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

{success} Success Response

{
    "success": true,
    "data": {
        "relations": [
            {
                "id": 1,
                "code": "US",
                "created_at": "2019-09-06 16:36:43",
                "updated_at": "2019-09-06 16:36:43",
                "name": "Up Sell"
            },
            {
                "id": 4,
                "code": "relatedproducts",
                "created_at": "2019-09-27 10:35:06",
                "updated_at": "2019-09-27 10:35:06",
                "name": "Related Products"
            },
            {
                "id": 5,
                "code": "CS",
                "created_at": "2019-12-06 09:35:18",
                "updated_at": "2019-12-06 09:35:18",
                "name": "Cross Sell"
            },
            {
                "id": 6,
                "code": "Substitute",
                "created_at": "2020-02-18 13:24:36",
                "updated_at": "2020-02-18 13:24:36",
                "name": "Substitute"
            },
            {
                "id": 7,
                "code": "fdbfsbdsfbs",
                "created_at": "2020-02-21 13:48:07",
                "updated_at": "2020-02-21 13:48:07",
                "name": null
            }
        ],
        "related_products": {
            "US": [],
            "relatedproducts": [],
            "CS": [],
            "Substitute": [],
            "fdbfsbdsfbs": []
        }
    },
    "message": "Related Products retrieved successfully."
}

{danger} Error Response

{
    "success": false,
    "message": "Error.",
    "data": "id field (product id) is required"
}

Get Deleted Product List

Method URL
POST /products/deletedProducts

Sample Request

var form = new FormData();

var settings = {
  "async": true,
  "crossDomain": true,
  "url": "http://demo.flexipim.com/api/v2/products/deletedProducts",
  "method": "POST",
  "headers": {
    "token": "your-flexiPIM-API-token",
    "cache-control": "no-cache",
    "postman-token": "3b9241a9-eb30-a25d-531f-52fce080118f"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

{success} Success Response

{
    "success": true,
    "data": [
        {
            "sku": "DCKAP143244"
        },
        {
            "sku": "DCKAP143245"
        },
        {
            "sku": "DCKAP143246"
        },
        {
            "sku": "DCKAP143247"
        }
    ],
    "message": "Deleted products retrieved successfully."
}

{danger} Error Response

{
    "success": false,
    "message": "Error",
    "data": "Undefined index: token"
}