Return transactions based on External ID

3833710 Posts: 1
edited Mar 28, 2019 6:47PM in Developer Tools


I am trying to do a query to return transactions based on External ID with postman using GET Method

GET (URL)/api/rest/2.0/data/customObject/xx/instances?='UniqueCode=External ID 123

In this case, my unique code is a specific external ID (External ID 123), but the responses give me the WHOLE DATA in the CDO including External ID 123.

So I get External ID 456

             External ID 789


Any ideas of how can I just capture data information for External ID 123 only?

Thank you

Post edited by Unknown User on


  • RichardGar
    RichardGar United KingdonPosts: 16 Blue Ribbon
    edited Feb 19, 2019 5:17AM


    Here's an example of how to search on custom fields in custom objects using the REST API. It requires a change to your search parameter and also using "internalID" rather than the field name.

    I want to find all contacts in a custom object (11) that have a country field that is "Italy".


    POD = 4

    Custom Object ID = 11

    Custom Object Field Name = "Country" but the internal code is "Country1". More info below on this

    Search for country = "Italy"

    Count = 10. Give me the first 10 records

    The internal code of the fields comes from running this API call



    Country in my example is a text value rather than a key value pair. So it is Italy and not the reference code for Italy such as "16"


    Hope that helps

  • Lou Patrick
    Lou Patrick Principal Product Manager, Eloqua APIs & App Developer Framework Portland, ORPosts: 174 Bronze Trophy
    edited Mar 28, 2019 6:46PM

    Assuming the value stored in the unique code field is exactly "External ID 123", this request will retrieve this record:

    GET /api/REST/2.0/data/customObject/<customObjectId>/instances?search=uniqueCode='External ID 123'

    If the value stored in the unique code field is "123", then this request will retrieve the record:

    GET /api/REST/2.0/data/customObject/<customObjectId>/instances?search=uniqueCode=123

    The single quotes are needed around the value if there are spaces in the value.

    To read more about using the search URL parameter see Using the search URL parameter tutorial, including a List of terms supported with search.