Import

This section of the PIM API endpoints are used to import products and different product related datasets into the system.

The difference between Import and Bulk-Update is that Import has predefined format and would be typically used for pushing the standardized CSV / JSON files from your ERP (or other systems) into the PIM. The typical use case (not restricted to these though) for import would be to schedule the cron jobs to push the data to PIM on regular intervals - pushing inventory from your WMS, or basic product / pricelist every day in the morning.

Different dataset imports that are supported are as below:

Dataset NameDescription
ProductSimple product feed based on the predefined format
PricelistPricelist or multiple pricelists containing pricing data
InventoryProduct inventory
Related ItemsRelated products for the products
CategoryCategory tree for the products
Attribute MasterDifferent attributes to be setup in the system
Attribute Master OptionDifferent options for specific attributes


POST/api/v1/import/product

Product

This endpoint is used to Import multiple products and product specific data into the system. An array of products along with their basic information is taken as input and the products are imported into the system and are processed into the index.

Request Parameters

NameTypeDescription
stockCodestringUnique alphanumeric StockCode of the product
productCodestringProduct identifier
productNamestringName of the product
shortDescriptionstringDescription of the product
longDescriptionstringDetailed description of the product
brandstringName of the brand to be assigned to the product
categorystringName of the category to be assigned to the product
parentCategorystringName of the parent category
categoryIdstringUnique Guid of the category to be assigned to the product
costPricedecimalCost price for the product
sellPricedecimalSell price including tax
listPricedecimalList price or RRP or MRP
currencystringDefault currency of the domain for which the price is provided in import
currentStockintegerAvailable quantity of the product
image1stringImage1 url of the product
image2stringImage2 url of the product
image3stringImage3 url of the product
image4stringImage4 url of the product
image5stringImage5 url of the product
image6stringImage6 url of the product
image7stringImage7 url of the product
image8stringImage8 url of the product
image9stringImage9 url of the product
image510stringImage10 url of the product
publishedbooleanFlag to identify if product is published or not
barCodestringBarcode of the product
uomstringUOM of the product
brandIdstringUnique Guid of the brand to be assigned to the product
subBrandIdstringUnique Guid of the sub-brand to be assigned to the product
subBrandNamestringSub-brand name of the product
sizestringSpecific size of the product
genderstringGender for which this product belongs to
colorHexstringHexCode of the Color to be assigned to the product
colorTextstringName of the color of the product
lengthintegerLength of the product
widthintegerWidth of the product
heightintegerHeight of the product
weightintegerWeight of the product
customAttributesList objectList of the custom attributes that are to be assigned to the product
customAttributes.keystringName of the attribute to be assigned
customAttributes.valuestringValue of the specific attribute to be assigned
isTaxablebooleanWhether the product is taxable or not
visiblebooleanwhether the product should be displayed or not in search result
mpnstringMPN of the product
gtnstringGTN of the product
attributeSetstringAttribute set to be aligned to the product

Sample Request

Request

POST
/api/v1/import/product
curl --location '<api_url>/api/v1/import/product' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: {{apiKey}}'
--data '[
{
"stockCode": "string",
"productCode": "string",
"productName": "string",
"shortDescription": "string",
"longDescription": "string",
"brand": "string",
"category": "string",
"parentCategory": "string",
"categoryId": "string",
"costPrice": 0,
"sellPrice": 0,
"listPrice": 0,
"currency": "string",
"currentStock": 0,
"image1": "string",
"image2": "string",
"image3": "string",
"image4": "string",
"image5": "string",
"image6": "string",
"image7": "string",
"image8": "string",
"image9": "string",
"image10": "string",
"published": true,
"barCode": "string",
"uom": "string",
"brandId": "string",
"subBrandId": "string",
"subBrandName": "string",
"size": "string",
"gender": "string",
"colorHex": "string",
"colorText": "string",
"length": 0,
"width": 0,
"height": 0,
"weight": 0,
"customAttributes": [
  {
    "key": "string",
    "value": "string"
  }
],
"isTaxable": true,
"visible": true,
"mpn": "string",
"gtn": "string",
"attributeSet": "string"
}
]'    

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription

| isValid | boolean | Whether the transaction was successful or failure, true - success, false - Failure | | message | string | Message to display on front end (if any) in case of errors/success | | errors | array | List of error messages, if any. | | messageCode | string | Response message code | | recordId | string | Record ID of the object updated / created |



POST/api/v1/import/pricelist

Pricelist

A price list allows you to populate different versions of catalog pricing and assign them to different Customer Groups. This endpoint is used to Import pricelist for products. An array of products along with their price information is taken as input and the data is imported into the system and are processed into the index.

Request Parameters

NameTypeDescription
priceListNamestringName of the pricelist being uploaded
stockCodestringUnique alphanumeric StockCode of the product
costPricedecimalCost price for the product
sellPricedecimalSell price including tax
listPricedecimalList price or RRP or MRP
sellPriceExcVatdecimalSell price including tax excluding the vat

Sample Request

Request

POST
/api/v1/import/pricelist
curl --location '<api_url>/api/v1/import/pricelist' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: {{apiKey}}'
--data '[
{
"priceListName": "string",
"stockCode": "string",
"costPrice": 0,
"listPrice": 0,
"sellPrice": 0,
"sellPriceExcVat": 0
}
]'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
 "string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription

| isValid | boolean | Whether the transaction was successful or failure, true - success, false - Failure | | message | string | Message to display on front end (if any) in case of errors/success | | errors | array | List of error messages, if any. | | messageCode | string | Response message code | | recordId | string | Record ID of the object updated / created |



POST/api/v1/import/inventory

Inventory

This endpoint is used to Import inventory adjustments and physical counts for quantities of products. An array of products along with their inventory information is taken as input and the data is imported into the system and are indexed.

Request Parameters

NameTypeDescription
warehouseCodestringWarehouse code of the Product
stockCodestringUnique alphanumeric StockCode of the product
currentStockintNumber of products available in stock
isActivebooleanWhether this is active or not

Sample Request

Request

POST
/api/v1/import/inventory
curl --location '<api_url>/api/v1/import/inventory' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: {{apiKey}}'
--data '[
{
"warehouseCode": "string",
"stockCode": "string",
"currentStock": 0,
"isActive": true
}
]'    

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
 "string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription

| isValid | boolean | Whether the transaction was successful or failure, true - success, false - Failure | | message | string | Message to display on front end (if any) in case of errors/success | | errors | array | List of error messages, if any. | | messageCode | string | Response message code | | recordId | string | Record ID of the object updated / created |



POST/api/v1/import/related

This endpoint is used to Import related products for a specific product. An array of products and against them all the products that are related to it are taken as input and the data is imported into the system and indexed.

Below are the options that can be used for relationType:

RelationTypeDescription
GWPGifts with Purchase
UPGRADEUpgrade option
ALSOLIKEYou may also like
ALSONEEDYou may also need
BASKETGROUPDisplayed in basket when items are added
ADDONSAdd on for the product
ALTERNATIVEAlternative for the product
WORKSWITHWorks with the product

Request Parameters

NameTypeDescription
masterStockIdstringId of the Product for which related products need to be mapped
childStockIdstringid of the related product to be mapped
relationshipTypestringRelationship type
labelstringLabel for the relationship. useful when you setup different groups of relationships just using 'BasketGroup' or any specific relation type.
displayOrderintegerDisplay order in which the related products will be displayed

Sample Request

Request

POST
/api/v1/import/related
curl --location '<api_url>/api/v1/import/related' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: {{apiKey}}'
--data '[
{
"masterStockId": "string",
"childStockId": "string",
"relationshipType": "string",
"label": "string",
"displayOrder": 0
}
]'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
 "string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription

| isValid | boolean | Whether the transaction was successful or failure, true - success, false - Failure | | message | string | Message to display on front end (if any) in case of errors/success | | errors | array | List of error messages, if any. | | messageCode | string | Response message code | | recordId | string | Record ID of the object updated / created |



POST/api/v1/import/attribute-master

Attribute Master

This endpoint is used to Import Product Custom Attributes into the system. An array of attributes are taken as input and the data is imported into the system.

User can specify specific how data for these attributes can be collected by defining specific input types for the Attributes, different input types that are allowed for attributes are listed below:

InputTypeValueDescription
Textbox1Attribute value will be taken in a text box
Dropdown2Attribute value will be taken from a predefined list
Checkbox3Attribute Value will be taken using a multi-select options from a pre-defined list
Radiobutton4Attribute value will be taken using using a list of pre-defined options
Textarea5Attribute value will be taken using in a textarea
File6Attribute value can be a file like image..etc
Editor7Attribute value will be taken using a text editor
ColorPicker8Attribute value will be taken using a ColorPicker

Request Parameters

NameTypeDescription
attributeCodestringUnique alphanumeric identifier for custom attribute
attributeNamestringName of custom attribute
inputTypestringNumeric enum value of the specific input type needs to be passed

Sample Request

Request

POST
/api/v1/import/attribute-master
curl --location '<api_url>/api/v1/import/attribute-master' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: {{apiKey}}'
--data '[
{
"attributeCode": "string",
"attributeName": "string",
"inputType": "int"
}
]'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
 "string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription

| isValid | boolean | Whether the transaction was successful or failure, true - success, false - Failure | | message | string | Message to display on front end (if any) in case of errors/success | | errors | array | List of error messages, if any. | | messageCode | string | Response message code | | recordId | string | Record ID of the object updated / created |



POST/api/v1/import/attribute-master-option

Attribute Master Options

This endpoint is used to Import Attribute value options for the Custom Attributes available in the system.. An array of attribute value option name and specific values are taken as input and the data is imported into the system.

Request Parameters

NameTypeDescription
attributeCodestringUnique identifier of custom attribute for which value options need to be uploaded
optionTextstringName of attribute value option
optionValuestringActual value for the attribute option
displayOrderintOrder in which the attribute options need to be displayed

Sample Request

Request

POST
/api/v1/import/attribute-master-option
curl --location '<api_url>/api/v1/import/attribute-master-option' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: {{apiKey}}'
--data '[
{
"attributeCode": "string",
"optionValue": "string",
"optionText": "string",
"displayOrder": "string"
}
]'

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription

| isValid | boolean | Whether the transaction was successful or failure, true - success, false - Failure | | message | string | Message to display on front end (if any) in case of errors/success | | errors | array | List of error messages, if any. | | messageCode | string | Response message code | | recordId | string | Record ID of the object updated / created |



POST/api/v1/import/category

Category

This endpoint is used to Import Category data into the system. An array of Category names and its parent category Id are taken as input and the data is imported into the system.

If the category is a top level category then the ParentCategory Id will be an empty Guid.

Request Parameters

NameTypeDescription
parentCategoryCodestringUnique Guid of the parent category code under which this category need to be created
CategoryCodestringUnique Guid of the category code in which this category need to be created
CategoryNamestringUnique Guid of the category Name in which this category need to be created
productFamilyIdintegerUnique integer value in which this category need to be created

Sample Request

Request

POST
/api/v1/import/category
curl --location '<api_url>/api/v1/import/category' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: {{apiKey}}'
--data '[
{
"parentCategoryCode": "string",
"categoryCode": "string",
"categoryName": "string",
"productFamilyId": 0
}
]'    

Response Model

Response

{

"isValid": true,
"message": "Data Imported successfully.",
"errors": [
"string"
],
"messageCode": "",
"recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
NameTypeDescription

| isValid | boolean | Whether the transaction was successful or failure, true - success, false - Failure | | message | string | Message to display on front end (if any) in case of errors/success | | errors | array | List of error messages, if any. | | messageCode | string | Response message code | | recordId | string | Record ID of the object updated / created |