For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update Affiliate Terms

Update existing affiliate contract terms

POST https://platform.shoffi.app/API/affiliate/updateAffiliateTerms

Request Body

Name
Type
Description

apiKey*

String

Your Shoffi API Key (Integrations → API Key)

appId*

Integer

Your app ID

email*

String

The affiliate email address

groupId

Integer

Affiliate group ID. If sent, Shoffi applies the group terms.

affiliateTerms

Object

New affiliate contract terms. Used when groupId is not sent.

Send either groupId or affiliateTerms.

  • If groupId is sent, Shoffi applies the group's terms.

  • If only affiliateTerms is sent, Shoffi applies those terms and sets the affiliate group to custom.

{
    "affiliateNewTerms": {
        "revenueShare": 50,
        "cpi": 10,
        "limitPeriod": 24,
        "minWithdrawal": 50,
        "recurringChargeOnly": false,
        "isNetAmount": false,
        "disableManualReferrals": false
    }
}
{
    "status": 400,
    "message": "Error details"
}

Example request with custom terms

Example request with group terms

Parameter breakdown

groupId

  • groupId: The ID of the affiliate group to assign to the affiliate. When this value is sent, Shoffi uses the group's terms.

You can find the group ID under Groups → click the group name → Group ID field.

affiliateTerms

  • revenueShare: The percentage you are willing to pay the affiliate for every transaction made by a store they referred (1–100). When cpi is greater than 0, you may also set revenueShare to 0. You can read more about the affiliate commission.

  • cpi: Cost per install. The amount the affiliate will be rewarded for each successful app install. You can set the amount to 0 if you do not want to pay per install.

  • limitPeriod: The period in which the affiliate will earn commissions from transactions made by the referred store, in months. If not limited, the affiliate will earn commissions as long as the referral is active.

  • minWithdrawal: The minimum amount an affiliate must earn before they can request a withdrawal. This amount is in USD.

  • recurringChargeOnly: Apply affiliate earnings from recurring charges only, excluding one-time fees charged by the app.

  • isNetAmount: Calculate revenue share from the net amount. Default is false.

  • disableManualReferrals: When true, the affiliate cannot submit manual referrals for this connection. Default is false. Owner and API addReferral are not blocked.

Response example

Last updated