completeRequirement([payload,])
Mark a program/campaign requirement as completed for the user
Last updated
Mark a program/campaign requirement as completed for the user
Last updated
This method allows you to mark a user's program requirement as completed.
On success, if the requirement belongs to a program/campaign objective, ChainVine will asynchronously check whether the user has completed enough requirements to mark an objective as completed.
Param | Required | Type | Description |
---|---|---|---|
These parameters can be passed in if you are sending custom data to ChainVine when completing a requirement programatically
In this approach, we complete a requirement ad-hoc for a user, by passing in a referrer_id if one has been captured by a referral link beforehand.
If the referrer id is passed into the request, and no referral has ever been made between this user and any referrer, then a Referral will be created.
Param | Required | Type | Description |
---|---|---|---|
Field | Type | Description |
---|---|---|
campaign.id
required
string
the id of the program/campaign requirement belongs to Note: this campaign/program must belong to your account
id
required
string
the requirement id to complete
amount
optional
number
an amount to associate with the completion
fee
optional
number
an optional fee to pass into the SDK
transaction_hash
optional
string
The hash of the transaction that this completion should be linked to
token_address
optional
string
a token address (token, NFT, smart contract) that should be associated with this completion
external_identifier
optional
string
a user identifier known to your system, if passed in, ChainVine will associate this with the wallet address if none has been associated yet, this value will be returned to you if present
message
String
Ok status message on success