REST -ing with Marketing Cloud in 30 Minutes

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:

https://www.getpostman.com

Should be available for both Mac and Windows.

Screen Shot 2018-05-20 at 11.51.04 AM

Step 2:

Login to your Marketing Cloud Instance and click under your name and click on the Administration link.

 

Screen Shot 2018-05-20 at 11.35.05 AM

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.

Screen Shot 2018-05-20 at 11.36.03 AM

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.

PostMan_GetAccessToken

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.

POSTMAN_REST_GET

 

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:).

Author: sfdc4ever

www.linkedin.com/in/monomit

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: