Create Capacity order
POST https://{{host}}/v3/orders
Request Body Scheme
{
data (object, required)
{
type (string, required): orders
attributes (object, required)
{
allowbackordering (boolean, optional)
Allowing back ordering.items (Array[CreateOrderItem], required)
[
Order items array.
{
type (string): capacityorderitems
attributes (object)
{
capacitypoolid (string, required)
Capacity Pool Object ID.qty (integer, optional)
Quantity of Channels.
}
}
]
}
}
}
Request Body Example:
Purchasing Capacity
{
"data": {
"type": "orders",
"attributes": {
"items": [
{
"type": "capacity_order_items",
"attributes": {
"capacity_pool_id": "c5f87307-7c80-417c-9ec3-18e0241c4228",
"qty" : 1
}
}
]
}
}
}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string | ||
Content-Type | string | ||
Api-Key | string |
RESPONSES
status: Created
{"data":{"id":"75dae051-7508-4a9b-ab1b-9bbd75de18c5","type":"orders","attributes":{"amount":"21.33","status":"Completed","created_at":"2017-06-25T14:56:31.513Z","description":"Capacity","reference":"NXH-560588","items":[{"type":"capacity_order_items","attributes":{"qty":1,"nrc":"20.0","mrc":"1.33","prorated_mrc":true,"billed_from":"2018-08-15","billed_to":"2018-09-15","capacity_pool_id":"c5f87307-7c80-417c-9ec3-18e0241c4228"}}]}},"meta":{"api_version":"2017-09-18"}}