Save an address-change draft
PUT
/api/v1/address-change/drafts
const url = 'https://address-change-test.apps.gold.devops.gov.bc.ca/api/v1/address-change/drafts';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"idempotencyKey":"draft-7f3a","draft":{"step":2,"values":{"firstName":"Alex"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://address-change-test.apps.gold.devops.gov.bc.ca/api/v1/address-change/drafts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "idempotencyKey": "draft-7f3a", "draft": { "step": 2, "values": { "firstName": "Alex" } } }'Creates or updates the resident draft identified by the idempotency key. The draft content is opaque form state and is stored encrypted.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The address-change payload.
Media typeapplication/json
object
idempotencyKey
required
string
draft
required
object
step
required
integer
values
required
object
key
additional properties
any
Example
{ "idempotencyKey": "draft-7f3a", "draft": { "step": 2, "values": { "firstName": "Alex" } }}Responses
Section titled “Responses”The request completed successfully.
Media typeapplication/json
object
requestId
required
string format: uuid
Example
{ "requestId": "7c825573-3df5-4e63-b376-ef7a4057369d"}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 request conflicts with the current state of a resource.
Media typeapplication/json
object
statusCode
required
number
message
required
string
error
required
string
Example
{ "statusCode": 409, "message": "An address-change request is already active", "error": "Conflict"}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"}