api marketing
May 16, 2023
Importing Products
If you're looking for an easy way to embed your store’s product data in your campaigns, you'll need to create a catalogue in E-goi. You can then import the products you want to use into the catalogue. This can either be done via API or using E-goi’s interface.
Requirements
- E-goi Account
- E-goi API Key
Scenario
You want your online store products to be available in E-goi, so you can easily add them to your campaigns.
1. Creating a Catalogue
E-goi accounts include a ready-to-use contact list, but you can create extra lists if needed. Each list can have their own settings.
To create a catalogue via API, let’s use the Create Catalogue method.
E-goi Public API Server -> https://api.egoiapp.com/catalogs
Payload Example:
{
"title": "Catalog title",
"language": "en",
"currency": "eur"
}
Answer Payload Example:
{
"catalog_id": 1,
"title": "Catalog title",
"language": "en",
"currency": "eur",
"created": "YYYY-MM-DD hh:mm:ss",
"updated": "YYYY-MM-DD hh:mm:ss"
}
2. Importing products
Once you’ve created the catalogue for your products, you can go ahead and import them. When Import Products, you’ll have the following options.
“mode”:
- ‘rewrite’ - erases the catalogue content and then adds the imported products.
- ‘add’ - adds the imported products to the catalogue without replacing any content (duplicates won’t be added).
- ‘update’ - adds the imported products to the catalogue and updates any duplicates.
E-goi Public API Server -> https://api.egoiapp.com/catalogs/{catalog_id}/products/actions/import
Payload Example:
{
"products": [
{
"categories": [
"Clothing>Women>Blue Jeans"
],
"related_products": [
"string"
],
"custom_attributes": [
{
"alias": "sale_price_5",
"value": "15.45"
}
],
"product_identifier": "string",
"name": "Product name",
"description": "Product description",
"sku": "string",
"upc": "string",
"ean": "string",
"gtin": "string",
"mpn": "string",
"link": "string",
"image_link": "string",
"price": 10,
"sale_price": 10,
"brand": "string"
}
],
"mode": "rewrite"
}
Answer Payload Example:
{
"result": "success"
}