Re: A few easy beginner questions...

Patrick_grinow
Level 1

A few easy beginner questions...

Hi all, I am new to the REST API development with Marketo and I was struggling with finding documentation regarding the following 4 (actually simple) points - I was hoping I can find help here.Thanks in advance and Merry Christmas!

  • What is the right endpoint/command to write activities to Marketo (via REST API)
  • What is the right endpoint/command to write custom activities to Marketo (via REST API)
  • GET LEAD only returns a few fields from Marketo (e.g. Lead ID, email, FName, LName) – how can I set up that Marketo returns more or all fields?
  • how can I create a static list via that API?

Thanks again!
Patrick

8 REPLIES 8
Grégoire_Miche2
Level 10

Re: A few easy beginner questions...

Hi Patrick,

Have you checked the doc here: http://developers.marketo.com/rest-api/

-Greg

Patrick_grinow
Level 1

Re: A few easy beginner questions...

Thanks for the quick reply, Greg!

I read through all the documentation on the page you provided, I also successfully set up the web service and API calls such as get lead, get activity, post lead etc. work fine.

actually everything works fine so far with calling the API except for

  • What is the right endpoint/command to write activities to Marketo (via REST API)
  • What is the right endpoint/command to write custom activities to Marketo (via REST API)
  • GET LEAD only returns a few fields from Marketo (e.g. Lead ID, email, FName, LName) – how can I set up that Marketo returns more or all fields?
  • how can I create a static list via that API?

I just did not find the part where they explain how to create an activity in Marketo via the API. I already set up custom activities as well, I can read them (get activity) but cannot write them - what is the right call?

I found the code below - that's it, nothing else so far. 😕

{

"input":[

{      

"leadId":34,

"activityDate":"2015-07-20T12:30:00-08:00",

"activityTypeId":100006,

"primaryAttributeValue":"SKU12345",

"attributes":[

{

"name": "productName",

"value": "iPhone"

},

{

"name": "productDescription",

"value": "iPhone 6s+"

}

]

},

SanfordWhiteman
Level 10 - Community Moderator

Re: A few easy beginner questions...

Patrick, just be aware of API limits when calling the Custom Activities API, as it may not be workable for single-row inserts in your environment.

In general, Marketo's APIs show their power when used for batch activities, where the multipliers (for example, 300 activity inserts per call) allow you to keep pace with business needs. They can be a danger zone w/individual activities.

Of course, if you enforce -- or at least can reasonably predict and document -- a limit of, say, 5000 activities per day, you'll be OK (as long as you don't need those 5000 calls for other integrations).

Emmanuelle_Biss
Level 5

Re: A few easy beginner questions...

Hi Patrick,

Also, if you need to sync specific fields between your CRM and Marketo, here are some docs that could be useful to you:

SFDC: SFDC Sync: Field Sync - Marketo Docs - Product Docs

MS Dynamics: Microsoft Dynamics Sync: Lead Sync - Marketo Docs - Product Docs

Hope this helps!

Emma

Patrick_grinow
Level 1

Re: A few easy beginner questions...

Thanks Emma - I appreciate it!

I am not working with SFDC or MSD... I am manually integrating a custom system. as said above, everything works well so far (read leads, read activities, create leads.....)  except for these specific points:

  • What is the right endpoint/command to write activities to Marketo (via REST API)
  • What is the right endpoint/command to write custom activities to Marketo (via REST API)
  • GET LEAD only returns a few fields from Marketo (e.g. Lead ID, email, FName, LName) – how can I set up that Marketo returns more or all fields?
  • how can I create a static list via that API?
Emmanuelle_Biss
Level 5

Re: A few easy beginner questions...

Ah my bad, I read your post too fast

Kenny_Elkington
Marketo Employee

Re: A few easy beginner questions...

1.  Only custom activities can be written directly with the REST API

2.  http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#/Activit...

3.  You need to specify the names of the fields in the 'fields' parameter, as a comma-separated list

4.  There is no method to do so at this time.

Patrick_grinow
Level 1

Re: A few easy beginner questions...

Thank you all! all questions answered... I appreciate it!