Marketo REST API - CustomObjects filtering not working as expected

DavidK
Level 1

Marketo REST API - CustomObjects filtering not working as expected

Filtering CustomObjects with multiple values using the "input" parameter results in duplicate records.

Example:

Executing this request, where the value "myTestLC" is provided twice  results in 3 custom object results, 2 of which are duplicates.

 

{
  "fields": ["CreatedAt","MarketoGUID","UpdatedAt","Check123"],
  "filterType": "Check123",
  "input": [
    {
      "Check123": "myTestLC"
    },
    {
      "Check123": "myTestLC"
    },
    {
      "Check123": "myTestLC2"
    }
  ]
}

 

 Results:

 

{
	"requestId": "5ac3#19136337ab7",
	"result": [
		{
			"seq": 0,
			"marketoGUID": "f2b54589-f283-49cc-a891-e0324fc4ad65",
			"check123": "myTestLC",
			"createdAt": "2024-08-09T08:12:04Z",
			"updatedAt": "2024-08-09T08:12:04Z"
		},
		{
			"seq": 1,
			"marketoGUID": "f2b54589-f283-49cc-a891-e0324fc4ad65",
			"check123": "myTestLC",
			"createdAt": "2024-08-09T08:12:04Z",
			"updatedAt": "2024-08-09T08:12:04Z"
		},
		{
			"seq": 2,
			"marketoGUID": "f1f677bd-0960-4d12-a4e0-f418d4d71b6f",
			"check123": "myTestLC2",
			"createdAt": "2024-08-09T08:12:16Z",
			"updatedAt": "2024-08-09T08:12:16Z"
		}
	],
	"success": true
}

 

 

Is this expected behavior that we should consider, or a bug in the API?
Note: other endpoints behave properly when filtering with multiple values and do not return duplicate records.

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo REST API - CustomObjects filtering not working as expected

That's expected behavior. You didn't deduplicate first, so you shouldn't expect deduped results. Some endpoints behave differently from others, but the outcome is unknown if you don't dedupe.