Numbers & Inventory

Purchase numbers

Purchase one or more DID numbers with identity document association.

Important notes:

  • Can purchase multiple numbers in a single request
  • Identities must contain required documents for the number's country

When to use:

  • Purchasing numbers with document verification
  • Bulk number purchase with identity association

purchase.purchases[].id feeds numbers_purchase_update and numbers_purchase_destroy (id, id_in[]). purchase.purchases[].id feeds purchases_destinations_index and purchases_destinations_create (purchase_id). purchase.purchases[].number feeds numbers_purchase_destroy (did_numbers[]). See also: numbers_index.

post/api/v2/numbers/purchase

Request

  • Base URL: https://app.didlogic.com
  • URL: https://app.didlogic.com/api/v2/numbers/purchase
  • Auth: HTTP bearer

Request body

id_ininteger[]

Array of DID IDs to purchase, from numbers_countries_cities_dids_index, numbers_search_show

did_numbersstring[]

Array of DID numbers to purchase, from numbers_countries_cities_dids_index, numbers_search_show

identitiesobject[]

Array of identity objects with document associations

Example request

{
  "id_in": [],
  "did_numbers": [
    "1111111111",
    "2222222222",
    "3333333333"
  ],
  "identities": [
    {
      "id": 101,
      "did_ids": [
        21869
      ]
    },
    {
      "id": 102,
      "did_numbers": [
        "43800327988"
      ]
    }
  ]
}

Response

purchase DIDs and link documents attached to identity

Example response

{
  "purchase": {
    "purchases": [
      {
        "id": 292,
        "number": "1111111111",
        "channels": 1,
        "country": "c1",
        "area": "Fake city for 1111111111",
        "require_docs": "1,2,3",
        "commitment_months": 12,
        "never_sold": 1,
        "activation": 1.17,
        "monthly_fee": 0.585,
        "per_minute": 0.117
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.