Rev 0.1 - 19.06.2020
The import widget works for integrating the Bring! import on a Website. For other integrations like App-to-App integrations Bring! supports the import via a deep link link. This link can be created using an API provide by Bring! and triggered by the App to start the import.
Note: The App-to-App integration points to a webpage (or json file - not recommended) that contains the ingredient information to be imported in a structured format. More on this here
To get an import link, send a request to the following Bring! Rest API:
Payload:
{ "url" :"{recipeUrl}", "baseQuantity": "{baseQuantity}", "requestedQuantity": "{requestedQuantity}" "sha1GoogleAdId" : "{sha1 hashed Google AdId}" "sha1AppleIdfa" : "{sha1 hashed Apple IDFA}" }url: the Url to a page containing the engredients to be imported. REQUIREDbaseQuantity: the quantity of the source. If the site contains the information for recipeYield there is no need to deliver baseQuantity.requestedQuantity: the quantity to be imported.sha1GoogleAdId: The advertisement id of the device (Android only)sha1AppleIdfa: The idfa of the device (iOS only)Response (HTTP 200):
{ "deeplink" : "{deeplink}"}This deeplink in the result can be triggered by the App to import the recipe into Bring!
This results in the following POST body:
{ "url" :"https://qblog.qoqa.ch/de/posts/3147", "baseQuantity": "4", "requestedQuantity": "6" "sha1GoogleAdId" : "{sha1 hashed Google AdId}" "sha1AppleIdfa" : "{sha1 hashed Apple IDFA}" }Result: