Get regulatory requirements

Changed on

Get the regulatory information needed to buy a phone number, for one specific number or for a country and number type. Prefer phoneNumber: the response is then exactly the list the purchase of that number validates against. Pass each requirementTypes[].id back as requirementType in regulatoryRequirements on POST /v1/phone-numbers.

For phoneNumber, the requirements of that exact number are returned. When they cannot be resolved for the number itself, the list for its country and type is returned instead, and the purchase uses the same list. An empty items array means the number needs no regulatory information. If the requirements cannot be retrieved at all, the response is 502 requirements_unavailable, never an empty list.

URL-encode the + of phoneNumber as %2B. An unencoded + is also accepted.

get/v1/phone-numbers/requirements

Request

  • Base URL
    https://api.zavu.dev
  • URL
    https://api.zavu.dev/v1/phone-numbers/requirements
  • Auth
    HTTP bearer

Query parameters

countryCodestring

Two-letter ISO country code. Required unless phoneNumber is given.

type'local' | 'national' | 'tollFree' | 'mobile'

Type of phone number. mobile is stocked in countries where no geographic (local) or non-geographic (national) inventory exists, and in several markets it is the only type that can receive SMS.

Type of phone number (local, national, mobile, tollFree). Defaults to local. With phoneNumber, used only when the number's own requirements cannot be resolved and the country list is returned.

phoneNumberstring

E.164 number from GET /v1/phone-numbers/available, with + encoded as %2B. Returns the requirements the purchase of that number checks. Takes precedence over countryCode.

Response

Requirements for the number, or for the country and type.

Example response

{
  "items": [
    {
      "countryCode": "DE",
      "phoneNumberType": "local",
      "action": "ordering"
    }
  ]
}

Changes

    • info

      added the new enum value mobile to the query request parameter type

    • breaking

      removed the enum value mobile from the query request parameter type

    • info

      added the new enum value national to the query request parameter type