Products
Endpoint: <https://api.omnisend.com/v3/products
>
Product or variant statuses
Value | Description |
---|---|
inStock | Product can be used in product recommender |
outOfStock | Product won't be used in product recommender |
notAvailable | Product won't be used in product recommender |
Custom fields
To use customFields
, first you need to create them in the Omnisend app
customFields
data types can be:
- integer
- float
- boolean
- string
- url
- date - format: YYYY-MM-DD
- datetime - ISO 8601 format. Example: 2017-05-30T14:11:12Z
Example:
"customFields":{
"size":"M",
"inStore":true,
"minPrice": 12.99,
"manualUrl":"http://www.example.com/manuals/prod123.pdf"
}
CategoryIDs
The categoryIDs
- array of strings. It should containt all categories ID's to which product belongs, including parent categories ID's.
Remember to pass all categories using categories endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
productID | string | Product ID in your system |
title | string | Product title |
status | string | Values: inStock, outOfStock, notAvailable |
description | string | Product description. We'll limit it to 30 words. |
currency | string | Currency ISO 4217 code |
productUrl | string | Link to product page |
vendor | string | Product vendor |
type | string | A categorization that a product can be tagged with, commonly used for filtering and searching. For example: book, virtual good, music. This is not a product category. |
createdAt | string (format: date-time) | Product creation date. Use the ISO 8601 format. Example: 2017-06-30T17:00:00Z |
updatedAt | string (format: date-time) | Product update date. Use the ISO 8601 format. Example: 2017-06-30T17:00:00Z |
tags | array of strings | Array of product tags. |
categoryIDs | array of strings | Array of categories ID's. Pass all categories ID's, including all parent categories ID's, to which product belongs. |
images | array of objects | Product images. Max 20. |
images.imageID | string | Unique image ID |
images.url | string | Link to product image |
images.isDefault | boolean | True if this is default product image |
images.variantIDs | array of strings | Array of variants ID's that the images belong to |
variants | array of objects | Array with product variants. Product must have at least one variant. If your product doesn't have variants, use the product's info as the variant (example: variantID = productID, title=variants.title, etc.) |
variants.variantID | string | Product variant identificator |
variants.title | string | Variant title |
variants.sku | string | Variant's stock keeping unit |
variants.status | string | Values: inStock, outOfStock, notAvailable |
variants.price | integer | Product price in cents |
variants.oldPrice | integer | Product old price in cents |
variants.productUrl | string | Link to variant's page |
variants.imageID | string | Default variant image ID (imageID ), defined in products.images array. |
variants.customFields | object | You need to first create custom fields in the Omnisend app by defining their types. Example: customFields {"color":"red", "sime":"M", "inStore": true}. See available data types above. |
Categories
Endpoint: <https://api.omnisend.com/v3/categories
>
Parameters
Parameter | Type | Description |
---|---|---|
categoryID | string | Category ID in your system |
title | string | Category title |
createdAt | string (format: date-time) | Category creation date. Use the ISO 8601 format. Example: 2017-06-30T17:00:00Z |
updatedAt | string (format: date-time) | Category update date. Use the ISO 8601 format. Example: 2017-06-30T17:00:00Z |