Create Order
Description
Creates a DID Order.
Request
HTTP Method: POST
URI Path: /v3/orders
Body:
Name |
Type |
Is Required? |
Description |
---|---|---|---|
allow_back_ordering |
|
Optional |
Allowing back ordering. |
items |
|
Yes |
Order items array. |
callback_url |
|
Optional |
The HTTP or HTTPS endpoint to where events related to order will be delivered. |
callback_method |
|
Optional |
The HTTP Method used for order events. POST, GET are supported methods. |
See Callback details for information about callback_url and callback_method.
Order Item:
Name |
Type |
Is Required? |
Description |
||
---|---|---|---|---|---|
type |
|
Optional |
Item object type: |
||
attributes |
One of DID Order Item Attributes, Capacity Order Item Attributes |
br |
Optional |
Order Item Attributes object. |
Order Item Attributes:
Name |
Type |
Is Required? |
Description |
---|---|---|---|
sku_id |
|
Yes |
Stock Keeping Unit ID. Should be used with one of optional parameters |
qty |
|
Yes |
Quantity of DIDs. |
did_reservation_id |
|
Optional |
Specific DID Reservation ID. |
billing_cycles_count |
|
Optional |
The number of Billing Cycles that this DID Number will renew until expiration. |
available_did_id |
|
Optional |
Specific Available DID ID. |
prorate_days_qty |
|
Optional |
Amount of service time (days). |
Name |
Type |
Is Required? |
Description |
---|---|---|---|
qty |
|
Optional |
Quantity of Channels. |
capacity_pool_id |
|
Yes |
Capacity Pool ID. |
Attention
Please note that “prorate_days_qty” attribute will be ignored if Prorate billing is not enabled per your DIDWW account. To enabled this billing option please contact Sales department via email sales@didww.com
Examples
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": true,
"items": [
{
"type": "did_order_items",
"attributes": {
"qty": 15,
"sku_id": "a78bb6d8-b05e-4e12-afe6-ad84ac979088"
}
}
]
}
}
}
curl -i -X POST https://api.didww.com/v3/orders -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allow_back_ordering": true, "items": [{"type": "did_order_items", "attributes": {"qty": 15, "sku_id": "a78bb6d8-b05e-4e12-afe6-ad84ac979088"}}]}, "type": "orders"}}'
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": true,
"items": [
{
"type": "did_order_items",
"attributes": {
"qty": 15,
"sku_id": "a78bb6d8-b05e-4e12-afe6-ad84ac979088"
}
}
]
}
}
}
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": false,
"items": [
{
"type": "did_order_items",
"attributes": {
"qty": 15,
"sku_id": "b6d9d793-578d-42d3-bc33-73dd8155e615"
}
}
]
}
}
}
curl -i -X POST https://api.didww.com/v3/orders -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allow_back_ordering": false, "items": [{"type": "did_order_items", "attributes": {"qty": 15, "sku_id": "b6d9d793-578d-42d3-bc33-73dd8155e615"}}]}, "type": "orders"}}'
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": false,
"items": [
{
"type": "did_order_items",
"attributes": {
"qty": 15,
"sku_id": "b6d9d793-578d-42d3-bc33-73dd8155e615"
}
}
]
}
}
}
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": false,
"items": [
{
"type": "did_order_items",
"attributes": {
"available_did_id": "7f44285d-20ef-4773-953f-ba012adafed3",
"sku_id": "b6d9d793-578d-42d3-bc33-73dd8155e615"
}
}
]
}
}
}
curl -i -X POST https://api.didww.com/v3/orders -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allow_back_ordering": false, "items": [{"type": "did_order_items", "attributes": {"available_did_id": "7f44285d-20ef-4773-953f-ba012adafed3", "sku_id": "b6d9d793-578d-42d3-bc33-73dd8155e615"}}]}, "type": "orders"}}'
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": false,
"items": [
{
"type": "did_order_items",
"attributes": {
"available_did_id": "7f44285d-20ef-4773-953f-ba012adafed3",
"sku_id": "b6d9d793-578d-42d3-bc33-73dd8155e615"
}
}
]
}
}
}
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": false,
"items": [
{
"type": "did_order_items",
"attributes": {
"did_reservation_id": "2a1d98d2-eafd-4332-80d5-5ecd36411eb3",
"sku_id": "b6d9d793-578d-42d3-bc33-73dd8155e615"
}
}
]
}
}
}
curl -i -X POST https://api.didww.com/v3/orders -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allow_back_ordering": false, "items": [{"type": "did_order_items", "attributes": {"did_reservation_id": "2a1d98d2-eafd-4332-80d5-5ecd36411eb3", "sku_id": "b6d9d793-578d-42d3-bc33-73dd8155e615"}}]}, "type": "orders"}}'
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": false,
"items": [
{
"type": "did_order_items",
"attributes": {
"did_reservation_id": "2a1d98d2-eafd-4332-80d5-5ecd36411eb3",
"sku_id": "b6d9d793-578d-42d3-bc33-73dd8155e615"
}
}
]
}
}
}
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": true,
"callback_url": "http://example.com",
"callback_method": "GET",
"items": [
{
"type": "did_order_items",
"attributes": {
"qty": 1,
"sku_id": "a7a7ffae-14cc-4e24-8682-6083a050fae7"
}
}
]
}
}
}
curl -i -X POST https://api.didww.com/v3/orders -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allow_back_ordering": true, "callback_method": "GET", "callback_url": "http://example.com", "items": [{"type": "did_order_items", "attributes": {"qty": 1, "sku_id": "a7a7ffae-14cc-4e24-8682-6083a050fae7"}}]}, "type": "orders"}}'
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": true,
"callback_url": "http://example.com",
"callback_method": "GET",
"items": [
{
"type": "did_order_items",
"attributes": {
"qty": 1,
"sku_id": "a7a7ffae-14cc-4e24-8682-6083a050fae7"
}
}
]
}
}
}
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"items": [
{
"type": "capacity_order_items",
"attributes": {
"capacity_pool_id": "c5f87307-7c80-417c-9ec3-18e0241c4228"
}
}
]
}
}
}
curl -i -X POST https://api.didww.com/v3/orders -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"items": [{"type": "capacity_order_items", "attributes": {"capacity_pool_id": "c5f87307-7c80-417c-9ec3-18e0241c4228"}}]}, "type": "orders"}}'
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"items": [
{
"type": "capacity_order_items",
"attributes": {
"capacity_pool_id": "c5f87307-7c80-417c-9ec3-18e0241c4228"
}
}
]
}
}
}
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": false,
"items": [
{
"type": "did_order_items",
"attributes": {
"available_did_id": "6c82282c-8193-43ca-9876-8ddef1ade253",
"sku_id": "644c2449-0e23-4a67-9f81-565ad5137bb6",
"prorate_days_qty": 10
}
}
]
}
}
}
curl -i -X POST https://api.didww.com/v3/orders -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"allow_back_ordering": false, "items": [{"type": "did_order_items", "attributes": {"available_did_id": "6c82282c-8193-43ca-9876-8ddef1ade253", "sku_id": "644c2449-0e23-4a67-9f81-565ad5137bb6", "prorate_days_qty": 10}}]}, "type": "orders"}}'
POST /v3/orders HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]
{
"data": {
"type": "orders",
"attributes": {
"allow_back_ordering": false,
"items": [
{
"type": "did_order_items",
"attributes": {
"available_did_id": "6c82282c-8193-43ca-9876-8ddef1ade253",
"sku_id": "644c2449-0e23-4a67-9f81-565ad5137bb6",
"prorate_days_qty": 10
}
}
]
}
}
}
Other Responses
Code |
Success |
Description |
---|---|---|
404 |
No |
|
401 |
No |