Third-party integration FAQ
1. How do I obtain an Authorization Token?
- The Authorization Token will be provided by AiFi deployment engineer at the time of deployment.
2. Is Authorization Token global, per store, per vendor or per machine?
- it's per-store, per vendor. Meaning that if you deploy two coffee machines, they can share the token, but a tobacco machine from a different vendor will have a different authorization token.
3. what's the sourceId and how do I obtain it?
- The
sourceIdis a unique-per-store identifier of your machine. ThesourceIdneeds to be unique per store regardless of the vendor. We suggest simply using some GUID or prefixing it with the vendor name. Another ok example isbestcoffeevendor_machine_1. If you deploy two machines, you can deploy them asbestcoffeevendor_machine_1andbestcoffeevendor_machine_2. You can re-use this ID for multiple machines as long as all of them live in different stores.
4. what's the “id” of a product that we send?
- This ID is preferably the actual barcode of a product, if applicable. In general, this ID can be any string consisting of Latin letters, numbers, dashes, dots and underscores. Other patterns are also allowed but would need to be confirmed by AiFi. On AiFi side, it’s always mapped to the barcode of the product.
5. How do I input the product information into AiFi system?
- The list of “id”/”barcodes” (see point 4.) along with other required product info (thumbnail, name, price etc) should be inputted by the retailer through AiFi OASIS API or through Shopify. If the vendor wishes to upload and update the products with the prices automatically, right now it’s best to contact AiFi directly for further instructions.
6. What URL is your API?
- The URL of our API should be configurable as it's possible that it will change from store to store. While some deployments support DNS resolution, most of the time the communication will be through internal network and HTTP, for example http://192.168.1.1:30647/v1/events
7. Is the timestamp in seconds or in milliseconds?
- The timestamp should be provided in seconds (UNIX time).
8. How to configure the network on our machine?
- The network configuration is deployment dependent and should be discussed with the retailer and AiFi network engineers.
9. How do we synchronize the timestamps?
- The timestamps of the server and the machine should be configured by using a local NTP server. The details of the NTP server are deployment dependent and should be discussed with the retailer and AiFi network engineers.
10. In the event of receiving an HTTP error (either network error or from AiFi system), how should the machine behave?
- The error should be logged and the logs should be accessible by AiFi or provided to AiFi for further debugging.
11. Is creation of the event a synchronous operation? Is cancellation a synchronous operation?
- The creation of the event is an asynchronous operation - meaning that the event is dispatched into our system, but its processing isn't necessarily finished. Cancellation is a synchronous operation - meaning that when the HTTP request returns to you, the event has surely been cancelled. The cancellation of the event can fail if the event processing wasn’t yet finished, although it should be very rare.