Which fields do I use in teh API to track country, state and inviter_email? | Community
Skip to main content
Dianna_Sadler
Level 2
March 4, 2019
Question

Which fields do I use in teh API to track country, state and inviter_email?

  • March 4, 2019
  • 1 reply
  • 3064 views

Hello,

We were able to integrate our Trial with Marketo program status via custom API calls and update the program status. I'm hoping someone in this community can help with providing insight into what fields I need to use in the API to track `inviter_email`, `country` & `state`? ( for the inviter_email field, our reps send out personal invites to prospects and we want to track who sent the invite out - is this a new custom field we'd create?)

Here's what we're using now:

```leadSource: LEAD_SOURCE,

email: opts.email,

firstName: opts.given_name,

lastName: opts.family_name,

company: opts.company```

where LEAD_SOURCE is 'Safely'

Thanks,

Dianna

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
March 4, 2019

Please move the thread to Products​ (Move link at the right). This isn't a support space.

After moving, please highlight your code using the Advanced Editor's syntax highlighter. Your code doesn't have any context, however. I have no idea what language it's supposed to be in, nor why you wouldn't know the API names of those 3 fields already (all the API names are available from the Describe Leads API endpoint).

https://s3.amazonaws.com/blog-images-teknkl-com/syntax_highlighter.gif

Dianna_Sadler
Level 2
March 4, 2019

Sanford Whiteman​ please bare with me as I'm working with a developer who does not have access to Marketo, so I'm being a messenger and don't know what context I need to provide. Your kindness and understanding is greatly appreciated.

Please find below the code.

The API used in node.js (javascript) and it looks like this.

request({

method: 'POST',

url: `${this.restUrl}/v1/leads/push.json`,

qs: { access_token: qr.access_token },

json: {

programName: PROGRAM_NAME,

lookupField: 'email',

input: [{

leadSource: LEAD_SOURCE,

email: opts.email,

firstName: opts.given_name,

lastName: opts.family_name,

company: opts.company

}]

}

});

SanfordWhiteman
Level 10
March 4, 2019

Can you please highlight that code, as in the brief video above, so it's readable?

I'm working with a developer who does not have access to Marketo, so I'm being a messenger and don't know what context I need to provide.

Pretty sure the developer has access to the Describe Lead REST API endpoint, which is where all the REST names like firstName and lastName come from.

You can also go to Field Management, export the field names to XLS, then send them the downloaded sheet. But it would make more sense for them to get the fields directly from the API itself to avoid mistakes.

Also, as I'm sure you're aware, a developer who doesn't have access to Marketo is going to make mistakes...