Request Provision Records
A provision record represents a single number or unit resource that is processed by the request.
These records may be removed or added over the lifetime of the request and may be replaced upon reset of their parent request.
You are not expected to ever keep a reference to a provision record as it may be removed without notice.
Schema
A Request's Provision Record represents a single number or unit of work that a request will process.
Provision records will reflect the status of a single number in that request.
Provision records may be replaced if a request is reset by a operational personnel to diagnose issues or to resolve an error.
Type Object
| Name | Type | Description |
|---|---|---|
error_code |
RequestProvisionRecordErrorCode | |
id |
String(format:ulid) | Desc. id |
inserted_at |
String(format:date-time) | An ISO8601 formatted timestamp |
number |
String | |
status |
RequestProvisionRecordStatus | |
updated_at |
String(format:date-time) | An ISO8601 formatted timestamp |
Desc. id
Another format for UUID, used primarily for tasks, requests and messages.
Example
{
"error_code": "OK",
"id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
"inserted_at": "2021-08-13T04:08:44.762841Z",
"number": "12003004000",
"status": "NONE",
"updated_at": "2021-08-13T04:08:44.762841Z"
}
API
List Existing Request's Provision Records
GET /api/v1/requests/{request_id}/provision_records HTTP/1.1
Retrieve the provision records associated with the parent request.
Note that for requests that have a number or numbers field, this mapping tends to be 1:1.
Query Parameters
| Name | Type | Description |
|---|---|---|
| first | Integer | Query Desc. first |
| last | Integer | Query Desc. last |
| after | String | Query Desc. after |
| before | String | Query Desc. before |
Query Desc. first
The number of items to return starting from the 'after' cursor
Query Desc. last
The number of items to return behind the 'before' cursor
Query Desc. after
The cursor representing the starting point of a 'first' based paging
Query Desc. before
The cursor representing the starting point of a 'last' based paging
Request
GET /api/v1/requests/{request_id}/provision_records HTTP/1.1
Accept: application/json
Response 200
application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 475
{
"count": 1,
"page_info": {
"first": "string",
"has_next_page": true,
"has_previous_page": true,
"last": "string"
},
"results": [
{
"data": {
"error_code": "OK",
"id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
"inserted_at": "2021-08-13T04:08:44.762841Z",
"number": "12003004000",
"status": "NONE",
"updated_at": "2021-08-13T04:08:44.762841Z"
},
"type": "request_provision_record"
}
]
}
Response 403
application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
"errors": [
{
"code": "access_denied.no_scope",
"detail": "No scope available to user role",
"params": {
"action": "index",
"level": "guest",
"resource": "resource"
},
"sub_code": "none",
"title": "Access Denied, no scope available"
}
]
}
Response 404
application/json
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
{
"errors": [
{
"code": "not_found",
"detail": "The specified resource could not be found",
"params": {
"resource": {
"id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
"type": "user"
}
},
"sub_code": "none",
"title": "Not Found"
}
]
}
List Existing Request Provision Records
GET /api/v1/provision_records HTTP/1.1
Retrieve Provision Records allocated for this account.
Query Parameters
| Name | Type | Description |
|---|---|---|
| first | Integer | Query Desc. first |
| last | Integer | Query Desc. last |
| after | String | Query Desc. after |
| before | String | Query Desc. before |
Query Desc. first
The number of items to return starting from the 'after' cursor
Query Desc. last
The number of items to return behind the 'before' cursor
Query Desc. after
The cursor representing the starting point of a 'first' based paging
Query Desc. before
The cursor representing the starting point of a 'last' based paging
Request
GET /api/v1/provision_records HTTP/1.1
Accept: application/json
Response 200
application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 475
{
"count": 1,
"page_info": {
"first": "string",
"has_next_page": true,
"has_previous_page": true,
"last": "string"
},
"results": [
{
"data": {
"error_code": "OK",
"id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
"inserted_at": "2021-08-13T04:08:44.762841Z",
"number": "12003004000",
"status": "NONE",
"updated_at": "2021-08-13T04:08:44.762841Z"
},
"type": "request_provision_record"
}
]
}
Response 403
application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
"errors": [
{
"code": "access_denied.no_scope",
"detail": "No scope available to user role",
"params": {
"action": "index",
"level": "guest",
"resource": "resource"
},
"sub_code": "none",
"title": "Access Denied, no scope available"
}
]
}
Get Request Provision Record
GET /api/v1/provision_records/{id} HTTP/1.1
Lookup an Provision Record by its ID
Path Parameters
| Name | Type | Description |
|---|---|---|
| id | String(format:ulid)! | Provision Record ID |
Request
GET /api/v1/provision_records/{id} HTTP/1.1
Accept: application/json
Response 200
application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 270
{
"data": {
"error_code": "OK",
"id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
"inserted_at": "2021-08-13T04:08:44.762841Z",
"number": "12003004000",
"status": "NONE",
"updated_at": "2021-08-13T04:08:44.762841Z"
},
"type": "request_provision_record"
}
Response 403
application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
"errors": [
{
"code": "access_denied.no_scope",
"detail": "No scope available to user role",
"params": {
"action": "index",
"level": "guest",
"resource": "resource"
},
"sub_code": "none",
"title": "Access Denied, no scope available"
}
]
}
Response 404
application/json
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
{
"errors": [
{
"code": "not_found",
"detail": "The specified resource could not be found",
"params": {
"resource": {
"id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
"type": "user"
}
},
"sub_code": "none",
"title": "Not Found"
}
]
}