Introduction

Use these endpoints to perform a service reclaim.

Request Lifecycle

Making a service’s reclaim is a two step process as follows:

  1. 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.

  2. 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

Table 1. API Versions
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

Table 2. POST Request

Verb

POST

URI

/api/connect/services/reclaims/request

Table 3. POST HTTP Request Headers
Name Description

Authorization

The OAuth bearer access token

X-API-VERSION

The version of the endpoint you are accessing

Table 4. POST Request Body Fields
Path Type Description Required

serviceId

Number

The id of the service.

Required

POST Response

Table 5. POST HTTP Status Codes
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

Table 6. POST HTTP Response Headers
Name Description

Location

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.
Table 7. GET Request

Verb

GET

URI

/api/connect/services/reclaims/requests/{id}

Table 8. GET Request Path Variables

Path Variable

Purpose

id

The id of the service-reclaim-request resource to poll for completion status

Table 9. GET HTTP Request Headers
Name Description

Authorization

The OAuth bearer access token

X-API-VERSION

The version of the endpoint you are accessing

GET Response

Table 10. GET HTTP Status Codes
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

Table 11. GET Response Body Fields
Path Type Description

id

Number

The Connect identifier of the service-reclaim-request resource.

serviceId

Number

The Connect identifier of the service resource.

requestedOn

String

The date/time, including UTC offset, when service reclaim requested.

status

String

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 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:

  1. a http status of 201

  2. a Location header with the URI of the service-reclaim-request resource.

Successful POST Response
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 Request
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
Successful GET Response
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 Request- Service Reclaims
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
}
POST Response with request validation errors
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 Request
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
GET Response service-reclaim resource failed to be created
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.

POST Response with Gateway Error
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"
}