'How can add latitude and longitude in onesignal segment editor

I need help regarding one signal REST API, I am not able to access location in curl in command and I do not know how to put multiple locations through code.

Please let me know if you have any answers. segment editor look



Solution 1:[1]

fill filters parameter with location data see this

curl --include --request POST  \
--header "Content-Type: application/json; charset=utf-8"  \
--header "Authorization: Basic YOUR_REST_API_KEY"  \
--data-binary "{\"name\": \"SEGMENT_NAME\", \"filters\": [{\"field\": \"session_count\", \"relation\": \">\", \"value\": \"1\"},{\"operator\": \"OR\"},{\"field\": \"tag\", \"key\": \"TAG_KEY\", \"relation\": \"exists\"},{\"operator\": \"OR\"},{\"field\": \"last_session\", \"relation\": \"<\", \"value\": \"1\"}]}" \
https://onesignal.com/api/v1/apps/YOUR_APP_ID/segments

see also these examples

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jabbar