Referrals

Create referral

Create an application snapshot with a code that can be redeemed by another organisation to create a new application with the same data.

post/v1/applications/{applicationId}/referrals

Request

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

Path parameters

applicationIdstring required
Example:application_tz4a98xxat96iws9zmbrgj3a

Request body

referencestring

Optional default reference to use for applications created from this referral. Defaults to the source application reference.

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.