One of the great features of the Salesforce platform is most of the objects and capabilities are accessible through API, namely REST and SOAP. SalesForce Marketing Cloud is no exception, But though we know it supports API ,How do we do some quick checks to connect with REST, maybe get some details through GET or add some data through POST My hope is you should be all set to submit GET and POST requests and get yourself familiar with the basic structure within 30 minutes if you follow this article.
Now let’s get cooking !!
Ingredients:
- POSTMAN: A tool through which we will submit REST requests.
- Marketing Cloud Account: You will need Administrative access
Step 1:
Should be available for both Mac and Windows.
Step 2:
Login to your Marketing Cloud Instance and click under your name and click on the Administration link.
Step 3:
You need to create a newly installed package or add the component to an existing package. Assuming you are creating a new package, Once you create the package you will see an option to add component.
Step 4 :
Once the component is created as API integration, You should get two strings known as ClientID and ClientSecret, Let’s hold on to them as we will use them later in our mix.
Step 5 :
Assuming you have installed POSTMAN, Let’s open it up. The first step in establishing a REST connection is to tell Marketing Cloud that you have the clientid and client secret and access a token which should be valid for 60 minutes.
In the POST URL provide the below URL and in the Body text put the text within {} and click Send. Don’t forget to select JSON.
You should get a value in quotes for an access token.
Step 6:
Now with known endpoints you can submit POST and GET, Change the dropdown to select POST and REST as desired, provide the URL and provide the access token as Type Bearer Token in the Token Text box without quotes, The result should show up in the box below.
You can import files to set up collection and environments and do a lot more, Hopefully these 6 steps would help you towards that Journey:).