Delete an address-change draft
DELETE
/api/v1/address-change/drafts/{requestId}
const url = 'https://address-change-test.apps.gold.devops.gov.bc.ca/api/v1/address-change/drafts/7c825573-3df5-4e63-b376-ef7a4057369d';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://address-change-test.apps.gold.devops.gov.bc.ca/api/v1/address-change/drafts/7c825573-3df5-4e63-b376-ef7a4057369d \ --header 'Authorization: Bearer <token>'Permanently deletes a draft address-change request owned by the authenticated resident. Submitted requests and drafts owned by other residents are reported as not found.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”requestId
required
string format: uuid
Example
7c825573-3df5-4e63-b376-ef7a4057369dIdentifier of the address-change request, as returned on creation.
Responses
Section titled “Responses”The request completed successfully and there is no content to return.
The request is malformed or fails validation. The body is an RFC 9457 problem details object; errors lists the invalid fields without echoing their values.
Media typeapplication/json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
errors
required
Array<object>
object
type
required
string
code
required
string
message
required
string
location
required
string
Example
{ "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Invalid request body", "errors": [ { "type": "validation", "code": "invalid_string", "message": "Invalid value at /person/dateOfBirth", "location": "body" } ]}A valid bearer access token is required.
Media typeapplication/json
object
statusCode
required
number
message
required
string
error
required
string
Example
{ "statusCode": 401, "message": "A bearer access token is required", "error": "Unauthorized"}The access token does not include the required scope.
Media typeapplication/json
object
statusCode
required
number
message
required
string
error
required
string
Example
{ "statusCode": 403, "message": "Missing address-change submission permission", "error": "Forbidden"}The requested resource was not found for this resident.
Media typeapplication/json
object
statusCode
required
number
message
required
string
error
required
string
Example
{ "statusCode": 404, "message": "Draft not found", "error": "Not Found"}The service or a downstream partner is temporarily unavailable.
Media typeapplication/json
object
statusCode
required
number
message
required
string
error
required
string
Example
{ "statusCode": 503, "message": "Request could not be saved", "error": "Service Unavailable"}