Introduction
Use these endpoints to request a service cancellation.
Request Lifecycle
Cancelling an active service and managing the cancellation request can be done as below:
-
Create a service-cancellation-request resource by sending a POST request to
/api/connect/services/service-cancellations/request
with the body of the request containing the connect identifier of the service you would like to cancel and on which date you would like to cancel the service. The response’shttp status
will be201
with a blank response body. There will be aLocation
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’shttp status
will be202
. This means that the request has not finished yet, but will in a moment. If the request was successful a service-cancellation resource will be returned. If the request failed a422
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/service-cancellations/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 to be cancelled |
Required |
|
|
The desired date service to be cancelled |
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 |
404 |
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 |
Name | Description |
---|---|
|
The URL from where the outcome of the request can be obtained. Poll this URL until the request is complete |
GET Request
Note
|
The URI will be given to you in the Location header of the POST request. |
Verb |
GET |
URI |
/api/connect/services/service-cancellations/requests/{id} |
Path Variable |
Purpose |
|
The id of the service resource |
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-cancellation resource |
202 |
The request is in progress |
401 |
You are not authorized to make this request |
400 |
The request was bad. Check the response body to see what the issue(s) are |
404 |
You do not have permission to perform this task |
404 |
The id (of the service resource) provided does not exist |
422 |
The service-cancellation resource failed to be created. Check the response body to see why |
422 |
The service-cancellation request IN_ERROR. 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-cancellation resource |
|
|
The service cancelled or not |
|
|
Status of the cancellation request |
|
|
The requested date for the service to be cancelled |
|
|
The date/time, including UTC offset, when service cancellation request was made |
|
|
The Connect identifier of the user requesting the service cancellation |
|
|
The name of the user requesting the service cancellation |
|
|
The email of the user requesting the service cancellation |
|
|
Error details. If any |
|
|
The date/time, including UTC offset, when nbn cancelled the service |
|
|
The date/time, including UTC offset, when user aborts the cancellation request |
|
|
The Connect identifier of the user requesting the service cancellation request abort |
|
|
The name of the user requesting the service cancellation request abort |
|
|
The email of the user requesting the service cancellation request abort |
|
|
The service is eligible for service cancellation |
|
|
The service cancellation request is eligible for abort |
|
|
The service cancellation request is eligible for reschedule |
API Version 1, 2, 3, 4, 5, 6 and 7 - Examples
Successful Request
An service-cancellation-request resource is created by sending a POST request to /api/connect/services/service-cancellations/request.
POST /api/connect/services/service-cancellations/request HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer **token**
X-API-VERSION: 7
Content-Length: 62
Host: 360-api.superloop.com
{
"serviceId" : 12002,
"cancellationDate" : "2025-05-26"
}
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-cancellation resource.
HTTP/1.1 201 Created
Location: /api/connect/services/service-cancellations/requests/12002
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 cancelling
the active service 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
and the status will be COMPLETED
.If the request is rejected by nbn the GET request’s response will
have a http status
of 200 and the status will be REJECTED
.
Note
|
Please keep the polling to a sensible rate. |
GET /api/connect/services/service-cancellations/requests/12002 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: 515
{
"serviceId" : 12002,
"status" : "REQUESTED",
"requestDate" : "2025-05-26",
"requestedOn" : "2025-05-26T05:50:33Z",
"requestedById" : 11001,
"requestedByName" : "API User",
"requestedByEmail" : "api@aaa-industries.com.au",
"errorDetail" : null,
"cancelledOn" : null,
"abortedOn" : null,
"abortedById" : null,
"abortedByName" : null,
"abortedByEmail" : null,
"canRequestCancellation" : false,
"canAbortCancellation" : true,
"canRescheduleCancellation" : true,
"cancelled" : false
}
HTTP/1.1 202 Accepted
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
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: 534
{
"serviceId" : 12002,
"status" : "COMPLETED",
"requestDate" : "2025-05-26",
"requestedOn" : "2025-05-26T05:50:33Z",
"requestedById" : 11001,
"requestedByName" : "API User",
"requestedByEmail" : "api@aaa-industries.com.au",
"errorDetail" : null,
"cancelledOn" : "2025-05-26T05:50:33Z",
"abortedOn" : null,
"abortedById" : null,
"abortedByName" : null,
"abortedByEmail" : null,
"canRequestCancellation" : false,
"canAbortCancellation" : false,
"canRescheduleCancellation" : false,
"cancelled" : true
}
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: 516
{
"serviceId" : 12002,
"status" : "REJECTED",
"requestDate" : "2025-05-26",
"requestedOn" : "2025-05-26T05:50:27Z",
"requestedById" : 11001,
"requestedByName" : "API User",
"requestedByEmail" : "api@aaa-industries.com.au",
"errorDetail" : null,
"cancelledOn" : null,
"abortedOn" : null,
"abortedById" : null,
"abortedByName" : null,
"abortedByEmail" : null,
"canRequestCancellation" : false,
"canAbortCancellation" : false,
"canRescheduleCancellation" : false,
"cancelled" : false
}
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.
Mandatory field not provided
POST /api/connect/services/service-cancellations/request HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer **token**
X-API-VERSION: 7
Content-Length: 54
Host: 360-api.superloop.com
{
"serviceId" : 12005,
"cancellationDate" : null
}
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: 442
{
"httpStatusCode" : 422,
"type" : "client.validation",
"code" : "method.argument.not.valid",
"message" : "Validation error",
"apiSubErrors" : [ {
"code" : "constraints.local.date.future.or.present",
"message" : "must not be null or in the past",
"object" : "connectRequestServiceCancellationCommand",
"field" : "cancellationDate",
"rejectedValue" : null
} ],
"timestamp" : "2025-05-26T05:50:39.751534027Z"
}
Service not active
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: 596
{
"httpStatusCode" : 422,
"type" : "client.validation",
"code" : "validation",
"message" : "Validation error",
"apiSubErrors" : [ {
"code" : "constraints.service.not.eligible.for.cancellation",
"message" : "The Service is not eligible for cancellation",
"object" : "Service",
"field" : "serviceId",
"rejectedValue" : 12005
}, {
"code" : "constraints.service.not.active",
"message" : "The Service is not in active state",
"object" : "Service",
"field" : "status",
"rejectedValue" : false
} ],
"timestamp" : "2025-05-26T05:50:37.142508427Z"
}
Service has a cancellation already in progress
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: 596
{
"httpStatusCode" : 422,
"type" : "client.validation",
"code" : "validation",
"message" : "Validation error",
"apiSubErrors" : [ {
"code" : "constraints.service.not.eligible.for.cancellation",
"message" : "The Service is not eligible for cancellation",
"object" : "Service",
"field" : "serviceId",
"rejectedValue" : 12005
}, {
"code" : "constraints.service.not.active",
"message" : "The Service is not in active state",
"object" : "Service",
"field" : "status",
"rejectedValue" : false
} ],
"timestamp" : "2025-05-26T05:50:25.165047918Z"
}
Service in an invalid state
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: 624
{
"httpStatusCode" : 422,
"type" : "client.validation",
"code" : "validation",
"message" : "Validation error",
"apiSubErrors" : [ {
"code" : "constraints.service.not.eligible.for.cancellation",
"message" : "The Service is not eligible for cancellation",
"object" : "Service",
"field" : "serviceId",
"rejectedValue" : 12003
}, {
"code" : "constraints.service.not.eligible.for.cancellation",
"message" : "The Service is not eligible for cancellation",
"object" : "Service",
"field" : "status",
"rejectedValue" : true
} ],
"timestamp" : "2025-05-26T05:50:40.918668854Z"
}
Bad Request
GET /api/connect/services/service-cancellations/requests/AAA 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 400 Bad Request
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: 363
{
"httpStatusCode" : 400,
"type" : "client.validation",
"code" : "method.argument.type.mismatch",
"message" : "Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: \"AAA\"",
"apiSubErrors" : [ ],
"timestamp" : "2025-05-26T05:50:26.276795489Z"
}
Resource failed to be created
If the service-cancellation resource failed to be created, a http status
of 422
is returned and the body of the
response will list the reason why
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: 411
{
"httpStatusCode" : 422,
"type" : "client.validation",
"code" : "validation",
"message" : "Validation error",
"apiSubErrors" : [ {
"code" : "constraints.service-cancellation.in-error",
"message" : "Service not in a valid state to cancel.",
"object" : "ServiceCancellation",
"field" : "status",
"rejectedValue" : "IN_ERROR"
} ],
"timestamp" : "2025-05-26T05:50:31.054217956Z"
}