Panaya for Salesforce - Getting started with Panaya APIs
  • 2 Minutes to read
  • PDF

Panaya for Salesforce - Getting started with Panaya APIs

  • PDF

Article summary

Download an API Connection Software

We recommend using Postman as a tool for running the API connection. While there are many other tools available that will work for this purpose, in this guide, we will be demonstrating the use of Postman. If you are already using Postman, be sure to upgrade to the latest version before proceeding with the next steps.



Import a collection of Panaya ForeSight API calls 

After you have imported the collection into Panaya, you should see the "Shared Panaya ForeSight API examples" and an environment called "ForeSight Shared Environment" as highlighted below:




Postman api_token and URL 

Select the Foresight Shared Environment, and expand the environment variables view, by clicking on Variables:

Then click on the Environment link:

 

You should now see a list of predefined environment variables, notice the ones highlighted in red, these are the ones you will be updating in the “Current value” column:


Create and set the API Token - 

To create your Panaya Api token, see the steps in this article.

Set the api_token variable as shown above with the value you received. Ensure that your Panaya Username (Email address) is added in front of the token and separated by a colon.

Be sure to set the "Current value" column of each variable, as only this column is used.  After setting the api_token, it should look similar to this:

If you log into Panaya using emea.panaya.com, set the URL variable as follows:

If you log into Panaya using my.panaya.com, use the URL variable as follows:


Project ID

You can find the project ID in the browser URL when visiting a Panaya project.
Click here to learn how to locate the project ID

Get Projects IDs using API

Expand the collection and click on "Get Projects" API call.  Notice that the url and api_token values are dynamically passed.  

 

Click on Send.  You should receive a similar response, but with your projectId or several of them if you are connected to several projects.  In our example below, the projectId is 9930.

Now set the projectId of the Panaya project you would like to work with in the Foresight Shared Environment projectId variable.

You should now be able to try and experiment with the rest of the API calls, more information can be found here.
You may want to map the fields from your project to match the ones in the collection you have just imported, so please follow the steps in this article to do that.

Tip!   

You can easily display the full API request headers and body in many different code formats such as Python, C#, Ruby, curl, etc. by choosing the required one from the Code snippet window: