Skip to main content

Data feeds

EVA currently provides the following data feeds:

  1. Stock by stock label
  2. Stock
  3. Prices
  4. Organization units
  5. Bundle products
  6. Configurable products
  7. Stock products

Creating the task​

Setting up a feed is easy as tying your shoelaces. We set up a task with all necessary settings and specify an interval for it to be updated. After setting this up, the feed can be fetched from a specific URL. Each feed in this document shows its specific URL format.

Each task comes with its own set of settings, which you can use or not - up to you. A task such as StockFeed2 for example, will allow you to choose what kind of stock to include. Most tasks however allow you to include an EmailAddress to be notified in case of failure, and the ability to (temporarily) Disable the task from running.

Fetching​

After you've created the feed, fetching it is easy: you can either simply copy the URL into your browser or use a simple GET request without a body to the feed URL. In this request however, the following headers are necessary and/or advised.

Authorization​

Most feeds require you to include an authorization token in your header. The feeds displayed on this page show the πŸ” icon to remind you of this.

To give you an example on how to format your URL when viewing your feed results in a browser, this is what the URL would look like for a stock feed:

[YourAPIEndpoint]/feed/stock_[OrganizationUnitID].json?authorization=[Authorizationcode]

Information on URL format and authorization

For more information on how your API endpoint is built, please see API endpoints.

For more information on your authorization code, see Request headers.

EVA-User-Agent​

Used to identify whoever is making the request.

Accept-Encoding​

Setting this to gzip will significantly reduce the response size.

Feeds​

StockByStockLabelFeed πŸ”β€‹

  • Task: EVA.Primer.Stock.StockByStockLabelFeed
  • URL: [YourAPIEndpoint]/feed/stock_by_label_[OrganizationUnitID].json

Example feed contents:

[
{
"ID": 3,
"BackendID": "101-111-978020137931",
"CustomID": "101-111-978020137931",
"StockLabels": [
{
"ID": 1,
"Name": "Sellable",
"Quantity": 49
},
{
"ID": 128,
"Name": "Transit",
"Quantity": 10
}
]
},
{
"ID": 4,
"BackendID": "101-111-978020137932",
"CustomID": "101-111-978020137932",
"StockLabels": [
{
"ID": 1,
"Name": "Sellable",
"Quantity": 13
},
{
"ID": 128,
"Name": "Transit",
"Quantity": 10
}
]
},
]

StockFeed (Deprecated) πŸ”β€‹

  • Task: EVA.Primer.Stock.StockFeed
  • URL: [YourAPIEndpoint]/feed/stock_[OrganizationUnitID].json

StockFeed2 πŸ”β€‹

  • Task: EVA.Primer.Stock.StockFeed2
  • URL: [YourAPIEndpoint]/feed/stock_[OrganizationUnitSetID].json
  • URL: [YourAPIEndpoint]/feed/stock_[OrganizationUnitSetID].diff

When setting up the StockFeed2 task, pay attention to the Name parameter, since it will overwrite the default naming of the task - which is just whichever OrganizationUnitSetID you specify. By using Name, you can make it easier to differentiate, but remember that it changes your feed's URL.

You will only see the stock for OUs which contain "stock feed products". This entails products in an assortment linked to those OUs and those products will need to be stock products. Child OUs are included in the feed as well.

This stock feed also holds an additional parameter called GenerateDiff. By enabling this option an additional (diff) file will be generated which contains all differences between the currently generated file and the file of the previous run, allowing for a more optimized processing of stock changes.

Notes to keep in mind when using diff files
- This diff file does not take your context or latest retrieval into account; it simply is the difference between the currently generated version and the one version generated before it.
- Generating a diff will overwrite the previous; there is only one full feed and one diff available at any one time.
- β€œMissing” one diff will cause discrepancies - make sure you attempt to import the diff file in a frequency higher than the configured cronjob interval for this stock feed, and when unable to process the diff before the next feed is generated, discard the diff and fall back to the full file.
- Try and process the full file, too, with a lower frequency (perhaps once a day, or once a week), in a timeframe that matches your system- and operation load.

Example feed contents:

[
{
"ID": 3,
"BackendID": "101-111-978020137931",
"CustomID": "101-111-978020137931",
"OrganizationUnit": {
"ID": 4,
"BackendID": "almere_store"
},
"Stock": {
"External": {
"OnHand": 100,
"Available": 100
}
}
},
{
"ID": 5,
"BackendID": "101-111-978020137933",
"CustomID": "101-111-978020137933",
"OrganizationUnit": {
"ID": 4,
"BackendID": "almere_store"
},
"Stock": {
"External": {
"OnHand": 110,
"Available": 110
}
}
},
]

AbsoluteStockFeed πŸ”β€‹

  • Task: EVA.Core.IO.Output.ShopFeed
  • URL: [YourAPIEndpoint]/feed/absolutestock-[OrganizationUnitID].json

PriceFeed​

  • Task: EVA.Primer.Pricing.PriceFeed
  • URL: [YourAPIEndpoint]/feed/prices_[OrganizationUnitBackendID].json

Example feed contents:

{
"CurrencyID": "GBP",
"Prices": [
{
"ID": 3,
"BackendID": "101-111-978020137931",
"CustomID": "101-111-978020137931",
"UnitPrice": 75.0000,
"OriginalUnitPrice": null,
"CostPriceCurrencyID": "EUR",
"RecommendedRetailPrice": null,
"TaxRate": 1.0,
"TaxCodeName": "High",
"TaxCodeBackendID": null
},
{
"ID": 4,
"BackendID": "101-111-978020137932",
"CustomID": "101-111-978020137932",
"UnitPrice": 75.0000,
"OriginalUnitPrice": null,
"CostPriceCurrencyID": "EUR",
"RecommendedRetailPrice": null,
"TaxRate": 1.0,
"TaxCodeName": "High",
"TaxCodeBackendID": null
},
]
}

OrganizationUnitsBaseFeed πŸ”β€‹

  • Task: EVA.Primer.OrganizationUnits.OrganizationUnitsBaseFeed
  • URL: [YourAPIEndpoint]/feed/organizationunits.json

Example feed contents:

[
{
"id": -1,
"name": "EVA",
"backendId": null,
"address": {
"street": null,
"houseNumber": null,
"address1": null,
"address2": null,
"zipCode": null,
"city": null,
"countryId": null
},
"latitude": 0.0,
"longitude": 0.0
},
{
"id": 1,
"name": "Docs Incorporated",
"backendId": "docs_inc",
"address": {
"street": "P.J. Oudweg",
"houseNumber": "4",
"address1": null,
"address2": null,
"zipCode": "1314CH",
"city": "Almere",
"countryId": "NL"
},
"latitude": 52.37578286676707,
"longitude": 5.217187057385943
},
{
"id": 2,
"name": "BI",
"backendId": null,
"address": {
"street": null,
"houseNumber": null,
"address1": null,
"address2": null,
"zipCode": null,
"city": null,
"countryId": null
},
"latitude": null,
"longitude": null
},
]

BundleProductsFeed πŸ”β€‹

  • Task: EVA.Primer.Products.BundleProductsFeed
  • URL: [YourAPIEndpoint]/feed/bundleproducts.json

ConfigurableProductsFeed πŸ”β€‹

  • Task: EVA.Primer.Products.ConfigurableProductsFeed
  • URL: [YourAPIEndpoint]/feed/configurableproducts.json

StockProductsFeed πŸ”β€‹

  • Task: EVA.Primer.Stock.StockByStockLabelFeed
  • URL: [YourAPIEndpoint]/feed/stock_by_label_[OrganizationUnitID].json

ShopFeed πŸ”β€‹

  • Task: EVA.Core.IO.Output.ShopFeed
  • URL: [YourAPIEndpoint]/feed/shops.json
[
{
"ID": 4,
"BackendID": "almere_store",
"Name": "Almere Store",
"EmailAddress": null,
"PhoneNumber": null,
"Latitude": 52.375769767286,
"Longitude": 5.217192421803888,
"TimeZone": null,
"Properties": {
"HasPickup": true
},
"Address": {
"Address1": "P.J. Oudweg 4",
"Address2": null,
"ZipCode": "1314 CH",
"City": "Almere",
"Country": "NL"
},
"OpeningHours": [
{
"Open": "08:00:00",
"Close": "18:00:00",
"Day": 4
},
{
"Open": "08:00:00",
"Close": "18:00:00",
"Day": 5
},
{
"Open": "08:00:00",
"Close": "18:00:00",
"Day": 6
},
{
"Open": "00:00:00",
"Close": "00:00:00",
"Day": 0
},
{
"Open": "08:00:00",
"Close": "18:00:00",
"Day": 1
},
{
"Open": "08:00:00",
"Close": "18:00:00",
"Day": 2
},
{
"Open": "08:00:00",
"Close": "18:00:00",
"Day": 3
}
]
},
]