Referrals

Revoke referral

Revoke a referral so that its code can no longer be redeemed. Revocation is permanent.

Organisations that have previously redeemed the referral keep their copies of the application data.

put/v1/applications/{applicationId}/referrals/{referralId}/revoke

Request

  • Base URL
    https://api.apply.akahu.nz
  • URL
    https://api.apply.akahu.nz/v1/applications/{applicationId}/referrals/{referralId}/revoke
  • Auth
    HTTP bearer

Path parameters

applicationIdstring required
Example:application_tz4a98xxat96iws9zmbrgj3a
referralIdstring required
Example:referral_tz4a98xxat96iws9zmbrgj3a

Response

Success

_idstring required

The unique ID of the referral.

codestring required

A referral code using the format AK_ followed by 10 uppercase alphanumeric characters.

status'active' | 'expired' | 'revoked' required

The status of a referral:

  • active The referral code can be redeemed.

  • expired The referral has passed its expiry and can no longer be redeemed.

  • revoked The referral has been revoked and can no longer be redeemed.

referencestring required

The default reference that applications created from this referral will use.

expires_atstring date-time required

The time after which the referral code can no longer be redeemed.

revoked_atstring date-time

The time at which the referral was revoked. Only present when status is revoked.

created_atstring date-time required
updated_atstring date-time required

Example response

{
  "_id": "referral_tz4a98xxat96iws9zmbrgj3a",
  "code": "AK_23456789BC"
}

Changes

No recorded changes to this operation across all 1 revision of this API.