Skip to main content

Pushing products

EVA is no product information management system. We tried, we weren't particularly good at it, and customers were using other systems as their golden record anyways. So, we stopped trying to be something we're not. Nowadays, we EXPECT our customers to use some other PIM system, and we just provide a neat little service to push all of your product information into EVA.

Single product

A simple, single product upload through ImportProducts would look something like this:

{
"SystemID": "InsomniaImport",
"Products": [
{
"ID": "0001",
"Name": "Unisex T-shirt",
"TaxCode": "High"
}
]
}

In the above example, we create a product called 'NewBorn T-shirt' with a BackendID (ID) and a TaxCode. We use SystemID to identify the system from which we are importing our products.

In addition to the BackendID we provide in the ID field, a product can have a CustomID. If you don't explicitly specify a CustomID, it will be the same as your BackendID.

Response

Your products will always have an EvaID assigned upon creation. Your response will include these EVA IDs, grouped by which products were updated or created. When products are created, they are also always updated. Additionally, we return a BackendID/EvaID mapping.

{
"UpdatedProductIDs": [
1
],
"CreatedProductIDs": [
1
],
"ProductMap": [
{
"BackendID": "0001",
"ID": 1
}
]
}
Notes

Products with different BackendIDs can have the same CustomID, for example when the latter replaces the first as a successor.

Product types

A product can have several types:

To describe your product as being one or more of these types, we use the Type object:

{
"SystemID": "PimCore",
"Products": [
{
"ID": "121",
"Name": "NewBorn T-Shirt",
"TaxCode": "High",
"Type": {
"Stock": true
}
}
]
}

Barcodes

To add a barcode to a product, use the Barcodes element. You can also specify a Barcode (and its Quantity) for an existing unit of measure in the call to allow for easy scanning.

{
"SystemID": "PimCore",
"Products": [
{
"ID": "121",
"Name": "NewBorn T-Shirt",
"TaxCode": "High",
"Barcodes": [
"978020137957"
]
}
]
}

Product hierarchy

Product hierarchy is defined by the Variations property. This in turn contains a new Products property where every product should contain a value for the variation. The following request contains a product with four sizes:

{
"SystemID": "PimCore",
"Products": [
{
"ID": "121",
"Name": "NewBorn T-shirt",
"TaxCode": "High",
"Variations": {
"Property": "size",
"LogicalLevel": "size",
"Products": [
{
"ID": "121-978020137957",
"Name": "NewBorn T-shirt",
"VariationValues": [
{
"Value": "3-6 months"
}
]
},
{
"ID": "121-978020137958",
"Name": "NewBorn T-shirt",
"VariationValues": [
{
"Value": "6-12 months"
}
]
},
{
"ID": "121-978020137959",
"Name": "NewBorn T-shirt",
"VariationValues": [
{
"Value": "12-18 months"
}
]
},
{
"ID": "121-978020137960",
"Name": "NewBorn T-shirt",
"VariationValues": [
{
"Value": "18-24 months"
}
]
}
]
}
}
]
}
Note

Both color and size are NOT native EVA product properties. These have to be created before they can be used. See Custom product properties.

Failure responses

Partial failure

Let's assume you made an API call to update 100 products but out of this only 90 products were updated. The remaining 10 failed to update in EVA. The response would then contain the parts of the call that failed, and the reason why they failed.

Unknown tax code

{
"Error": {
"Message": "Product 123 uses unknown TaxCode",
"Type": "ImportProducts:UnknownTaxCode",
"Code": "JMJVDCGE",
"RequestID": "1cc5912d5059455594a992d1c17c1a5b"
}
}

Validation failure

{
"Error": {
"Message": "The provided request did not pass validation. Failures: Reason: MissingField, ProductID: , Field: PrimitiveName, Message: \nReason: MissingField, ProductID: , Field: PrimitiveName, Message: \nReason: DuplicateBackendID, ProductID: , Field: BackendID, Message: 123",
"Type": "ImportProducts:ValidationFailures",
"Code": "BMIYFDBY",
"RequestID": "2161b89f451b4c47901c74f714c55280"
}
}

The message contains technical-human-readable text that can be used for debugging.

Editing products

To edit products, just use the same request and alter the information. EVA will know to update the product if the specified ID is already in use.

Deleting products

To delete products, use the same request, but add the "IsDeleted": true property on the products and set it to true. The products will then be deleted. It's good to know that the products actually remain in EVA, their status will just be: Deleted and they won't be visible on the front ends anymore.