0

I'm using this REST API JSON call to remove a subscriber from a journey:

[
{
"ContactKey": "0031xxxxxxxxxxxxxx",
"DefinitionKey": "cexxxxxx-b20f-74ea-c67a-xxxx7c53xxxx",
"Versions": [0,1,2,3]
}
]

It works like a charm, but I'm unsure on the use of the array for the versions of the journey.
The documentation for the /interaction/v1/interactions/contactexit API only states, that this needs to be an array.
As I have three versions of the journey today, my solution is [0,1,2,3], but in stead I'd like a more flexible solution that always removes contacts from every version of the journey.

What are my options when using the array for referencing versions of a journey?

Thank you

2 Answers 2

2

The versions array is optional. I you don't specify this property, the contact is removed from all versions of the journey concerned:

POST /interaction/v1/interactions/contactexit
[
    {
        "ContactKey": "0031xxxxxxxxxxxxxx",
        "DefinitionKey": "cexxxxxx-b20f-74ea-c67a-xxxx7c53xxxx"
    }
]
1

The cleanest solution that comes to mind - do an API call before your original call that would be asking in which journey version this contact is.

You can do that with the following endpoint:

POST /interaction/v1/interactions/contactMembership

1
  • Thank you Rafal. This is useful knowledge too :) Commented Sep 7, 2020 at 5:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .