v1

latestOpenAPI 3.0.12026-08-062532117.6 KB

Update a referral

Updates a referral identified by referralId, and fires the referral.updated webhook.

Use subscriptionStatus to change whether a referral counts as active. Any field you send is applied directly to the referral, so sending a field that is not listed below will fail the request.

put/referrals

Request body

referralIdstring uuid required

The referral to update

namestring

Name of the referred user

emailstring email

Email of the referred user. Lowercased before saving.

referredUserExternalIdstring

The ID you maintain for this user in your own system.

planstring

Plan the referred user is on

subscriptionStatus'ACTIVE' | 'SUBMITTED' | 'DECLINED'

Status of the referral

notesstring

Free-text notes on the referral

metadataobject

Arbitrary JSON to attach to the referral

Response

The updated referral.

idstring uuid

The referral ID

affiliateIdstring uuid nullable

The affiliate credited with this referral

affiliateProgramIdstring uuid nullable

The affiliate program this referral belongs to

affiliateLinkIdstring uuid nullable

The affiliate link the referral came through

commissionPlanIdstring uuid nullable

The commission plan applied to this referral

namestring nullable

Name of the referred user

emailstring email nullable

Email of the referred user

referredUserExternalIdstring

The ID you maintain for this user in your own system — for example your database user ID or a Stripe customer ID.

planstring nullable

Plan the referred user is on. Defaults to N/A when not supplied.

subscriptionStatus'ACTIVE' | 'SUBMITTED' | 'DECLINED' nullable

Status of the referral. Referrals created through this API are always ACTIVE.

submissionType'MANUAL' | 'AUTOMATIC' nullable

Whether the referral was submitted by hand or captured automatically

referralMedium'COUPON' | 'LINK' nullable

How the referral was tracked

source'UNKNOWN' | 'API' | 'INTEGRATION' | 'MANUAL' | 'IMPORTED' | 'AFFILIATE_SUBMITTED'

Where the referral came from. Referrals created through this API have API.

totalRevenuenumber float

Total revenue attributed to this referral

totalCommissionnumber float

Total commission generated by this referral

initialLandingPagestring nullable

The first page the referred user landed on

notesstring nullable

Free-text notes on the referral

metadataobject nullable

Arbitrary JSON you can attach to the referral

createdAtstring date-time

When the referral was created