Phone Numbers API - Cancel a Direct Order

If you have created a direct order with TeleSign, but decide that you no longer want to continue with that order, you may be able to use this method to cancel it.

Reference Page

DELETE /v1/phone_numbers/direct_orders/{order_id}

Request

DELETE /v1/phone_numbers/direct_orders/632a70h3-u893-48e2-jjl2-ou83k278yi28 HTTP/1.1
Authorization: Basic 12345678-9ABC-DEF0-1234-56789ABCDEF0:vjE/ZDfPvDkuGNsuqCFFO4neYIs=
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Host: rest-ww.telesign.com

Response

{
  "data": [
    {
      "order_id": "632a70h3-u893-48e2-jjl2-ou83k278yi28",
      "order_accepted_date": "2019-10-21T17:33:22.000Z",
      "status": "cancelled",
      "last_date_modified": "2019-10-21T17:40:22.000Z",
      "country_iso2": "BE",
      "quantity": 4,
      "capabilities": {
        "sms": true,
        "voice": true
      },
      "numbers": [
        "32460213960",
        "32460200563",
        "32460200562",
        "32460200561"
      ],
      "number_type": "mobile",
      "number_pattern": "324",
      "pattern_method": "prefix",
      "email": "[email protected]",
      "contact_name": "Ms Health Center Manager",
      "use_case": "Business notifications and reminders",
      "description": "Continuous numbers array preferred",
      "city": [
        "Antwerp",
        "Brussels"
      ],
      "partial_order_match": true
    }
  ]
}

Which Direct Orders Can be Cancelled?

A direct order can be cancelled only while it is still in the 'accepted' status. From the moment a direct order enters 'in progress' status onwards, the direct order can no longer be canceled.

Keep in mind though that even after the direct order has completed processing, you can still cancel the lease on the individual phone numbers obtained through the order using the Cancel a Lease method.

Billing and Pricing

After successfully cancelling a direct order using this method, you will not be billed at the end of your current billing period for this direct order, and then not for any future periods.


Did this page help you?