question

$$ANON_USER$$ avatar image
$$ANON_USER$$ asked

Filter Number Port by Phone Number

curl -X GET \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --header "Authorization: Bearer OBFUSCATED_KEY" \ --globoff "https://api.telnyx.com/v2/porting_phone_numbers?filter[phone_number]=+15552221234"

This attempt keeps returning: "{"errors":[{"detail":"Phone number must be in E.164 format","source":{"pointer":"/eq"},"title":"Invalid eq"}]}"

It will work with no filter however. Am I missing something or is this a bug or incorrect documentation?

porting
2 comments
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

klane@telnyx.com avatar image klane@telnyx.com ♦♦ commented ·

Hi. Good question, we want to make sure everything is working as it should. Can you test without the '+' in the phone number format and share the result please?

0 Likes 0 ·
klane@telnyx.com avatar image klane@telnyx.com ♦♦ klane@telnyx.com ♦♦ commented ·

Also, please email me the email address associated with your Telnyx account at klane@telnyx.com. Thank you.

0 Likes 0 ·

1 Answer

·
JCH avatar image
JCH answered

I'm the original poster now replying as a registered user.

I tried filtering by phone number with the plus, without it, and with and without the country code and in each case it returns the same thing, {"errors":[{"detail":"Phone number must be in E.164 format","source":{"pointer":"/eq"},"title":"Invalid eq"}]}

I tried filtering by phone number with the plus, without it, and with and without the country code and in each case it returns the same thing, {"errors":[{"detail":"Phone number must be in E.164 format","source":{"pointer":"/eq"},"title":"Invalid eq"}]} It's not an issue with escaping characters since I can use the plus in other API requests without any problems.

I also tried using ?filter[phone_number][in][+15555551234]" which gives {"errors":[{"detail":"The 'in' parameter must be valid.","source":{"pointer":"/in"},"title":"Invalid in"}]}.

I tried replacing filter with search, which is just ignored, and all records are returned for the first page. Please let me know if it's a bug or if I should try something else.

3 comments
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

JCH avatar image JCH commented ·

I also directly emailed you with this same info as requested.

0 Likes 0 ·
klane@telnyx.com avatar image klane@telnyx.com ♦♦ JCH commented ·

Thank you. I will have our dev team review.

0 Likes 0 ·
klane@telnyx.com avatar image klane@telnyx.com ♦♦ commented ·

Follow up question this user had -

Only the last two years' of port-in records are available via api. It's strange because all port-in history is available on the portal. Hopefully this can be addressed so it is available via API as well

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Manage Your Content