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 Name | Description |
---|---|
Product | Simple product feed based on the predefined format |
Pricelist | Pricelist or multiple pricelists containing pricing data |
Inventory | Product inventory |
Related Items | Related products for the products |
Category | Category tree for the products |
Attribute Master | Different attributes to be setup in the system |
Attribute Master Option | Different options for specific attributes |
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
Name | Type | Description |
---|---|---|
stockCode | string | Unique alphanumeric StockCode of the product |
productCode | string | Product identifier |
productName | string | Name of the product |
shortDescription | string | Description of the product |
longDescription | string | Detailed description of the product |
brand | string | Name of the brand to be assigned to the product |
category | string | Name of the category to be assigned to the product |
parentCategory | string | Name of the parent category |
categoryId | string | Unique Guid of the category to be assigned to the product |
costPrice | decimal | Cost price for the product |
sellPrice | decimal | Sell price including tax |
listPrice | decimal | List price or RRP or MRP |
currency | string | Default currency of the domain for which the price is provided in import |
currentStock | integer | Available quantity of the product |
image1 | string | Image1 url of the product |
image2 | string | Image2 url of the product |
image3 | string | Image3 url of the product |
image4 | string | Image4 url of the product |
image5 | string | Image5 url of the product |
image6 | string | Image6 url of the product |
image7 | string | Image7 url of the product |
image8 | string | Image8 url of the product |
image9 | string | Image9 url of the product |
image510 | string | Image10 url of the product |
published | boolean | Flag to identify if product is published or not |
barCode | string | Barcode of the product |
uom | string | UOM of the product |
brandId | string | Unique Guid of the brand to be assigned to the product |
subBrandId | string | Unique Guid of the sub-brand to be assigned to the product |
subBrandName | string | Sub-brand name of the product |
size | string | Specific size of the product |
gender | string | Gender for which this product belongs to |
colorHex | string | HexCode of the Color to be assigned to the product |
colorText | string | Name of the color of the product |
length | integer | Length of the product |
width | integer | Width of the product |
height | integer | Height of the product |
weight | integer | Weight of the product |
customAttributes | List object | List of the custom attributes that are to be assigned to the product |
customAttributes.key | string | Name of the attribute to be assigned |
customAttributes.value | string | Value of the specific attribute to be assigned |
isTaxable | boolean | Whether the product is taxable or not |
visible | boolean | whether the product should be displayed or not in search result |
mpn | string | MPN of the product |
gtn | string | GTN of the product |
attributeSet | string | Attribute set to be aligned to the product |
Sample Request
Request
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"
}
Name | Type | Description |
---|
| 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 |
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
Name | Type | Description |
---|---|---|
priceListName | string | Name of the pricelist being uploaded |
stockCode | string | Unique alphanumeric StockCode of the product |
costPrice | decimal | Cost price for the product |
sellPrice | decimal | Sell price including tax |
listPrice | decimal | List price or RRP or MRP |
sellPriceExcVat | decimal | Sell price including tax excluding the vat |
Sample Request
Request
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"
}
Name | Type | Description |
---|
| 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 |
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
Name | Type | Description |
---|---|---|
warehouseCode | string | Warehouse code of the Product |
stockCode | string | Unique alphanumeric StockCode of the product |
currentStock | int | Number of products available in stock |
isActive | boolean | Whether this is active or not |
Sample Request
Request
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"
}
Name | Type | Description |
---|
| 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 |
Related Items
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:
RelationType | Description |
---|---|
GWP | Gifts with Purchase |
UPGRADE | Upgrade option |
ALSOLIKE | You may also like |
ALSONEED | You may also need |
BASKETGROUP | Displayed in basket when items are added |
ADDONS | Add on for the product |
ALTERNATIVE | Alternative for the product |
WORKSWITH | Works with the product |
Request Parameters
Name | Type | Description |
---|---|---|
masterStockId | string | Id of the Product for which related products need to be mapped |
childStockId | string | id of the related product to be mapped |
relationshipType | string | Relationship type |
label | string | Label for the relationship. useful when you setup different groups of relationships just using 'BasketGroup' or any specific relation type. |
displayOrder | integer | Display order in which the related products will be displayed |
Sample Request
Request
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"
}
Name | Type | Description |
---|
| 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 |
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:
InputType | Value | Description |
---|---|---|
Textbox | 1 | Attribute value will be taken in a text box |
Dropdown | 2 | Attribute value will be taken from a predefined list |
Checkbox | 3 | Attribute Value will be taken using a multi-select options from a pre-defined list |
Radiobutton | 4 | Attribute value will be taken using using a list of pre-defined options |
Textarea | 5 | Attribute value will be taken using in a textarea |
File | 6 | Attribute value can be a file like image..etc |
Editor | 7 | Attribute value will be taken using a text editor |
ColorPicker | 8 | Attribute value will be taken using a ColorPicker |
Request Parameters
Name | Type | Description |
---|---|---|
attributeCode | string | Unique alphanumeric identifier for custom attribute |
attributeName | string | Name of custom attribute |
inputType | string | Numeric enum value of the specific input type needs to be passed |
Sample Request
Request
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"
}
Name | Type | Description |
---|
| 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 |
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
Name | Type | Description |
---|---|---|
attributeCode | string | Unique identifier of custom attribute for which value options need to be uploaded |
optionText | string | Name of attribute value option |
optionValue | string | Actual value for the attribute option |
displayOrder | int | Order in which the attribute options need to be displayed |
Sample Request
Request
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"
}
Name | Type | Description |
---|
| 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 |
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
Name | Type | Description |
---|---|---|
parentCategoryCode | string | Unique Guid of the parent category code under which this category need to be created |
CategoryCode | string | Unique Guid of the category code in which this category need to be created |
CategoryName | string | Unique Guid of the category Name in which this category need to be created |
productFamilyId | integer | Unique integer value in which this category need to be created |
Sample Request
Request
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"
}
Name | Type | Description |
---|
| 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 |