# Cancel a Custom Payout Source: https://docs.winwinkit.com/api-reference/affiliate-payouts/cancel-custom-payout delete /affiliates/{affiliate_id}/payouts/{payout_id} Cancels one of the affiliate's custom payouts while it is still `pending`, so it is never sent. The payout is kept, as `cancelled`. Monthly `performance` payouts can't be cancelled. Note 1: custom payouts must be enabled for the project. Note 2: this endpoint is only accessible with a secret API key. # Create a Custom Payout Source: https://docs.winwinkit.com/api-reference/affiliate-payouts/create-custom-payout post /affiliates/{affiliate_id}/payouts Creates a custom payout for the affiliate — an amount of the project's own for the days it covers, outside the monthly payouts. It is `pending` right away and is never sent automatically: it must be sent from the dashboard. Note 1: custom payouts must be enabled for the project. Note 2: this endpoint is only accessible with a secret API key. # List Affiliate Payouts Source: https://docs.winwinkit.com/api-reference/affiliate-payouts/list-payouts get /affiliates/{affiliate_id}/payouts Returns the affiliate's payouts from the project — both the monthly `performance` payouts their codes earn and the `custom` ones the project created — latest period first. Note 1: this endpoint is only accessible with a secret API key. Note 2: up to 100 payouts are returned per request; page through the rest with `offset`. # Get Affiliate Analytics Source: https://docs.winwinkit.com/api-reference/affiliates/analytics get /affiliates/analytics Returns the project affiliates with their totals for a period, oldest joiner first. Affiliates with no activity in the period are omitted. Note 1: this endpoint is only accessible with a secret API key. Note 2: a period may span at most 90 days; request a longer window a period at a time. Note 3: up to 100 affiliates are returned per request; page through the rest with `offset`. # List Affiliates Source: https://docs.winwinkit.com/api-reference/affiliates/list-affiliates get /affiliates Returns the project approved affiliates with their group, all-time totals and connected platforms — the same data as the affiliates table in the dashboard. Newest joiner first unless `sort_by` names another field — then largest first, or A to Z for `name`. Note 1: this endpoint is only accessible with a secret API key. Note 2: up to 100 affiliates are returned per request; page through the rest with `offset`. # Claim Code Source: https://docs.winwinkit.com/api-reference/claim-actions/claim-code post /users/{app_user_id}/claim-code Claims a code for a user. Code can be affiliate, promo or referral code. The user is created if it does not exist yet, and any user properties given in the body are applied to it before the code is claimed. # Get Code Source: https://docs.winwinkit.com/api-reference/codes/get-code get /codes/{code} Resolves a code to its type (affiliate, promo or referral) and returns the relevant data for that type. Requires no app user id. # Grant a Reward Source: https://docs.winwinkit.com/api-reference/rewards-actions/grant-a-reward post /users/{app_user_id}/rewards/grant Grants a reward for a user. Note 1: currently only granting of credit rewards is supported. Note 2: this endpoint is only accessible with a secret API key. # Withdraw Credits Source: https://docs.winwinkit.com/api-reference/rewards-actions/withdraw-credits post /users/{app_user_id}/rewards/withdraw-credits Withdraws credits from a user. # Register App Store Transaction Source: https://docs.winwinkit.com/api-reference/transactions/app-store post /users/{app_user_id}/transactions/app-store Registers the mapping between a user and their Apple originalTransactionId. # Register Google Play Transaction Source: https://docs.winwinkit.com/api-reference/transactions/google-play post /users/{app_user_id}/transactions/google-play Registers the mapping between a user and their Google Play purchaseToken. # Create or Update User Source: https://docs.winwinkit.com/api-reference/users/create-or-update-user post /users Create or update a user if already exists. # Get User Source: https://docs.winwinkit.com/api-reference/users/get-user get /users/{app_user_id} Retrieves a user by their app user id.