Expand my Community achievements bar.

SOLVED

Segments API updates

Avatar

Former Community Member

First, thanks for providing the segments API-- lots of great functionality that have made my life a lot easier.

One remaining challenge on my end is parsing the return when I request the definition field, particularly when a segment uses a time-within operator. I noticed that the API seems to now handle within operators, but still fails for after. For the latter, I still receive definition of:

failed converting segment definition: failed converting restriction id

This is in contrast to within, where I now receive e.g.:

name element operator value within.id within.value

1 some_prop [p2]   prop2   equals    x   minutes            1

2 some_prop [p2]   prop2   equals   x2      <NA>           NA

Two main questions:

  1. Is the functionality of the Segments 1.4 API still a work-in-progress?
  2. Is there any (ideally regularly updated) documentation that lists the current known limitations/changelog?

Also, is there any way to edit only segment metadata, i.e. an edit method/workaround? It seems that to edit a segment, one must use the Save method-- which means I need to pass in a full body. This can be challenging when the definition is particularly complex, and impossible in the aforementioned scenario when the definition cannot be parsed.

There are times when I have a handful of segments where I simply want to change the name, or perhaps append a description. I can always do this manually, but it'd be convenient to do so programatically, since we've built out quite a bit of plumbing to leverage the API.

1 Accepted Solution

Avatar

Correct answer by
Employee

Any time there is added functionality to segments, the API gets updated. As far as I am aware, there are no limitations. If you find something that doesn't work, call customer care so we can get the details and get a fix created.

When you get that error, are you making a Segments.Get request? Could you share the request body?

As for another way to update a segment, Segments.Save is the only way. It was designed to work with the output of Segments.Get, so you could get a segment, change a bit, then save the whole thing. You may want to suggest that as an idea.

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

Any time there is added functionality to segments, the API gets updated. As far as I am aware, there are no limitations. If you find something that doesn't work, call customer care so we can get the details and get a fix created.

When you get that error, are you making a Segments.Get request? Could you share the request body?

As for another way to update a segment, Segments.Save is the only way. It was designed to work with the output of Segments.Get, so you could get a segment, change a bit, then save the whole thing. You may want to suggest that as an idea.