Search phone prefix
POSThttps://api.foxentry.com/phone/search
Foxentry will list all phone prefixes matching your query. This can be used to implement a simple autocomplete.
Pay attention to the client section in the request body. You can specify the user's location in order to receive more relevant suggestions.
Headers
Api-VersionstringAuthorizationstringrequiredBody params
requestobjectrequiredCustom ID assigned by you if you need so.
queryobjectrequiredParameters you want to validate or search for.
optionsobjectOptions that change how the endpoint behaves.
Limits number of results returned by the endpoint.
List of allowed prefixes. If not provided, all prefixes are allowed.
clientobjectInformation about your user, to make results more relevant.
Country code in ISO-3166-1 alpha-2 format.
Client's latitude
Client's longitude
Empty fields use the example value shown in grey. Everything you type here is written into the request on the right, and the other way round.
Responses
Response body · application/json
statusintegerStatus of API response.
requestobjectendpointstringcodestringCode of request.
customIdstring | nullCustom ID assigned by you if you need so.
queryobjectvaluestringoptionsobjectQuery options.
resultsLimitnumberLimits number of results returned by the endpoint.
allowedPrefixesarray[string]List of allowed prefixes. If not provided, all prefixes are allowed.
clientobjectAdditional information about your user (from whom you've obtained the data sent in query) to increase relevance of the results. If you do not wish to provide this information, you can limit results to relevant countries using the dataSource parameter present in some modules.
ipstringcountrystringCountry code in ISO-3166-1 alpha-2 format.
locationobjectLatitude & longitude of the client's approximate location.
latnumberClient's latitude
lonnumberClient's longitude
responseobjectresultsCountnumberNumber of results
resultsarray[object]dataobjectcountrystringprefixstringiconstringerrorsarray[string]List of errors related to the request. Should be empty if the request finished successfully.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.
Response body · application/json
statusintegerHTTP status of the response.
errorsarray[object]What went wrong.
groupstringError group.
REQUESTAUTHVALUESERVERtypestringError type.
subtypestring | nullMore specific error type.
severitystringHow serious the error is.
criticalwarninginforelatedToarray[string]Query parameters the error relates to.
descriptionstringHuman readable description.