Introduction
Use these endpoints to perform a service reclaim.
Request Lifecycle
Making a service’s reclaim is a two step process as follows:
-
Create a service-reclaim-request resource, by sending a POST request to
/api/connect/services/reclaims/request
with the body of the request containing the service id. The response’s http status will be 201 with a blank response body. There will be a Location response header with a URL. This URL is where the request outcome can be obtained. -
Make a GET request to the URL returned in 1. to retrieve the outcome of the request. While the request is in progress, the response’s http status will be 202. This means that the request has not finished yet, but will in a moment. If the request was successful a service-reclaim resource will be returned. If the request failed a 422 will be returned with the body containing details on why it failed in the standard error format.
Request Specifications
Version | Header | Changes |
---|---|---|
1 (Deprecated) |
X-API-VERSION=1 |
Initial Version |
2 (Deprecated) |
X-API-VERSION=2 |
No change |
3 |
X-API-VERSION=3 |
No change |
4 |
X-API-VERSION=4 |
No change |
5 |
X-API-VERSION=5 |
No change |
6 |
X-API-VERSION=6 |
No Change |
7 |
X-API-VERSION=7 |
No Change |
API Version 1, 2, 3, 4, 5, 6 and 7
POST Request
Verb |
POST |
URI |
/api/connect/services/reclaims/request |
Name | Description |
---|---|
|
The OAuth bearer access token |
|
The version of the endpoint you are accessing |
Path | Type | Description | Required |
---|---|---|---|
|
|
The id of the service. |
Required |
POST Response
Status Code | Meaning |
---|---|
201 |
The request was created successfully |
401 |
Bearer token is missing or invalid |
404 |
You do not have permission to perform this task or The id (of the service resource) provided does not exist |
422 |
There are validation errors on the request you made. Check the response body to see what fields had issues. |
500 |
There was an unexpected error processing the request |
502 |
There was an unexpected error with one or more of the upstream services |
Name | Description |
---|---|
|
The URL of the service-reclaim-request resource |
GET Request
Note
|
The URI will be given to you in the Location header of the POST request of the Service Reclaims request. |
Verb |
GET |
URI |
/api/connect/services/reclaims/requests/{id} |
Path Variable |
Purpose |
|
The id of the service-reclaim-request resource to poll for completion status |
Name | Description |
---|---|
|
The OAuth bearer access token |
|
The version of the endpoint you are accessing |
GET Response
Status Code | Meaning |
---|---|
200 |
The request is complete. The body contains the service-reclaim resource |
202 |
The request is in progress |
401 |
Bearer token is missing or invalid |
404 |
You are not authorised or The id (of the service-reclaim-request resource) provided does not exist |
422 |
The service-reclaim resource failed to be created. Check the response body to see why |
500 |
There was an unexpected error processing the request |
Path | Type | Description |
---|---|---|
|
|
The Connect identifier of the service-reclaim-request resource. |
|
|
The Connect identifier of the service resource. |
|
|
The date/time, including UTC offset, when service reclaim requested. |
|
|
The status. |
Webhook - ServiceReclaimActivated
The ServiceReclaimActivated
notification is sent when a service reclaim you have requested has been accepted by
the nbn, to find more information click here
API Version 1, 2, 3, 4, 5, 6 and 7 - Examples
Successful Request
A service-reclaim-request resource is created by sending a POST request to /api/connect/services/reclaims/request.
POST /api/connect/services/reclaims/request HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer **token**
X-API-VERSION: 7
Content-Length: 21
Host: 360-api.superloop.com
{
"serviceId" : 5
}
If all required fields were given, then the response to the request will have:
-
a http status of 201
-
a
Location
header with the URI of the service-reclaim-request resource.
HTTP/1.1 201 Created
Location: /api/connect/services/reclaims/requests/8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Once you have the URI from the Location
header, poll that URI every so often by making a GET request. While the service reclaim is in progress, the GET request’s response will have a http status
of 202
. Keep polling the URL until it finishes,
once the request is completed successfully the GET request’s response will have a http status
of 200
.
Note
|
Please keep the polling to a sensible rate. |
GET /api/connect/services/reclaims/requests/4 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer **token**
X-API-VERSION: 7
Host: 360-api.superloop.com
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 101
{
"id" : 4,
"serviceId" : 6,
"requestedOn" : "2020-07-01T04:32:58Z",
"status" : "COMPLETED"
}
Invalid Request
If the request is invalid for any reason, a http status
of 422
is returned and the body of the
response will list the problems with the request.
This example is of submitting a service reclaim request where the disconnection is not reversible.
POST /api/connect/services/reclaims/request HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer **token**
X-API-VERSION: 7
Content-Length: 21
Host: 360-api.superloop.com
{
"serviceId" : 7
}
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 412
{
"httpStatusCode" : 422,
"type" : "client.validation",
"code" : "validation",
"message" : "Validation error",
"apiSubErrors" : [ {
"code" : "constraints.service.not.eligible.for.reclaims",
"message" : "Service disconnection is not reversible.",
"object" : "ServiceReclaimRequest",
"field" : "serviceId",
"rejectedValue" : 7
} ],
"timestamp" : "2025-03-11T22:28:43.466181884Z"
}
Resource failed to be created
If the service-reclaim resource failed to be created, a http status
of 422
is returned and the body of the
response will list the reason why
GET /api/connect/services/reclaims/requests/3 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer **token**
X-API-VERSION: 7
Host: 360-api.superloop.com
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 434
{
"httpStatusCode" : 422,
"type" : "client.validation",
"code" : "validation",
"message" : "Validation error",
"apiSubErrors" : [ {
"code" : "constraints.service.reclaim.request.status.in.error",
"message" : "failed: Operation timed out (Connection timed out)",
"object" : "ServiceReclaimRequest",
"field" : "status",
"rejectedValue" : "IN_ERROR"
} ],
"timestamp" : "2025-03-11T22:28:44.642659052Z"
}
Upstream Service Unavailable
If one of the services that Connect API uses for service reclaim request is down or unreachable, Connect API will send a 502 status.
HTTP/1.1 502 Bad Gateway
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 248
{
"httpStatusCode" : 502,
"type" : "remote.call",
"code" : "remote.call.error",
"message" : "There was an unexpected error with one or more of the upstream services",
"apiSubErrors" : [ ],
"timestamp" : "2025-03-11T22:28:46.90377053Z"
}