Raven Slingshot Integration with Leaf

16 Feb, 2022

Raven Slingshot Integration with Leaf

Raven Slingshot Integration with Leaf

In this post we are going to talk about integration with Raven Slingshot® starting from creating a developer account to registering the credentials to a user. All endpoints can be found in our docs and Postman collection.

Currently, the Raven Slingshot integration allows you to send prescriptions via Leaf. While there isn't a current integration for Raven field operations data through Leaf, it's a development we have our sights on for the future. If you have any questions or feedback, contact our team at help@withleaf.io.


Did you know the quickest and simplest way to enable provider authentication is through Magic Link or Leaf Link? Leaf provides pre-built widgets (Leaf Link) and shareable URLS (Magic Link) so you can save time on building UI. Talk to us to learn more about pricing.

Summary

  • Step 0: Create a Raven Slingshot developer account
  • Step 1: Get your Access Key
  • Step 2: Add Raven Slingshot credential to Leaf

Step 0: Create A Raven Slingshot Developer Account

(If you already have a developer account with Raven Slingshot, you can skip this step.)

First, create an account in the RavenSlingshot portal. It’s possible to submit a request to open an account (Request Account) at the login page, displayed below:

Leaf, data infrastructure for agriculture

Which takes you to this form:

Leaf, data infrastructure for agriculture

Important: After requesting the account, you’ll also need to sign an ISV agreement to be able to use their API. To do this, send an email to apisupport@ravenind.com, with the following information:

  • Company’s Legal Name
  • Company’s Address
  • Integration Goals - Utilize the Leaf and Slingshot Integration
  • Your account username and email

Once the agreement has been executed, Raven Slingshot will provide you with your API Key and Shared Secret through the registered email address.

Step 1: Get Your Access Key

Once you have your Raven Slingshot username and password you can authenticate to the Raven Slingshot portal through the previously mentioned login page.

After logging in, select “API and Data Access Control" on the “Share” dropdown menu as shown below:

Leaf, data infrastructure for agriculture

This section allows you to create and edit access keys, if you already have an existing registered key just copy the value for it from the Access Key column shown below:

Leaf, data infrastructure for agriculture

Step 2: Add Raven Slingshot Credential To A Leaf User

When you integrate with a provider via Leaf, you'll need to create something called a 'Leaf User', which is used to manage provider authentication and organize data for your end users. In most cases, the Leaf User will be the farmer or consultant that has access to the source data from the provider’s FMIS (e.g. Slingshot).

To send your credentials to Leaf, you will need your access token from Leaf, and have already created a Leaf User. If you don’t know how to do that,

  • Here is how you get your access token
  • Here is how you create a Leaf User

Now, attach your credentials to the Leaf User you created. Send a POST to:

https://api.withleaf.io/ services/usermanagement/ api/users/yourLeafUserId/ raven-slingshot-credentials

with the following Header:

Authorization: Bearer {{yourLeafToken}}

and the following JSON:

{
"apiKey": "your api key"
"sharedSecret": "your shared secret"
"accessKey": "your access key"
}

Excellent! Now you are connected to Raven Slingshot via Leaf. Head to our prescriptions section of the documentation next to start sending prescriptions.

Food and agriculture companies use Leaf’s API to build and scale a wide range of products including farm optimization tools, lending products, outcome-based financing, land and input marketplaces, agronomic recommendations, traceability applications, equipment maintenance forecasting, and more.

Ready to begin?

Get API Keys and Start Building Today!

Sign up for free account

Questions? Get in touch