### Success Response Example Source: https://aff-api.uppromote.com/docs/v2/get-programs-28435009e0 Example JSON response body returned when the request to list programs is successful. ```json { "status": 200, "message": "success", "data": [ { "id": 46, "name": "Program Test", "is_default": "not_default", "status": "active", "rule": "advance", "description": "Description ...", "commission_type": "Percent of sale", "commission_amount": 20, "commission_advanced": [ { "level": 1, "condition": "0", "commission": "5" }, { "level": 2, "condition": "3000", "commission": "10" }, { "level": 3, "condition": "5000", "commission": "15" } ], "new_customer_commission": null, "lifetime_commission": { "disconnect_day": 12, "first_commission": { "type": "Flat rate per item", "amount": "6.00" } }, "special_coupon_commission": null, "exclude_product_tax": true, "exclude_shipping": false, "exclude_shipping_tax": false, "exclude_tip": true, "exclude_self_referral": false, "payment_methods": [ "paypal", "bank", "debit", "cheque", "store_credit" ], "payment_default": "debit", "created_at": "2021-10-05T04:43:34Z" } ] } ``` -------------------------------- ### Webhook Event Payload Examples Source: https://aff-api.uppromote.com/docs/v2/llms.txt Examples of webhook event payloads. ```APIDOC ## Webhook Event Payload: referral.new ### Description Occurs whenever there is a new referral in the store. ### Event Payload Example ```json { "event": "referral.new", "data": { "referral_id": "ref_123", "customer_id": "cust_456", "affiliate_id": "aff_789", "created_at": "2023-10-27T12:00:00Z" } } ``` ``` ```APIDOC ## Webhook Event Payload: referral.approved ### Description Occurs whenever a referral is approved. ### Event Payload Example ```json { "event": "referral.approved", "data": { "referral_id": "ref_123", "approved_at": "2023-10-27T13:00:00Z" } } ``` ``` ```APIDOC ## Webhook Event Payload: referral.denied ### Description Occurs whenever a referral is denied. ### Event Payload Example ```json { "event": "referral.denied", "data": { "referral_id": "ref_123", "denied_at": "2023-10-27T13:05:00Z", "reason": "Invalid referral" } } ``` ``` ```APIDOC ## Webhook Event Payload: referral.status_changed ### Description Occurs whenever the status of a referral is changed. ### Event Payload Example ```json { "event": "referral.status_changed", "data": { "referral_id": "ref_123", "old_status": "pending", "new_status": "approved", "changed_at": "2023-10-27T13:10:00Z" } } ``` ``` ```APIDOC ## Webhook Event Payload: affiliate.new ### Description Occurs when there is a new affiliate in the store (signup or create manual). ### Event Payload Example ```json { "event": "affiliate.new", "data": { "affiliate_id": "aff_789", "name": "Jane Smith", "created_at": "2023-10-27T14:00:00Z" } } ``` ``` ```APIDOC ## Webhook Event Payload: affiliate.approved ### Description Occurs whenever an affiliate is approved. ### Event Payload Example ```json { "event": "affiliate.approved", "data": { "affiliate_id": "aff_789", "approved_at": "2023-10-27T15:00:00Z" } } ``` ``` ```APIDOC ## Webhook Event Payload: affiliate.inactive ### Description Occurs whenever an affiliate is denied/deactivated. ### Event Payload Example ```json { "event": "affiliate.inactive", "data": { "affiliate_id": "aff_789", "inactive_at": "2023-10-27T15:05:00Z", "reason": "Deactivated by admin" } } ``` ``` ```APIDOC ## Webhook Event Payload: affiliate.status_changed ### Description Occurs whenever the status of an affiliate is changed. ### Event Payload Example ```json { "event": "affiliate.status_changed", "data": { "affiliate_id": "aff_789", "old_status": "active", "new_status": "inactive", "changed_at": "2023-10-27T15:10:00Z" } } ``` ``` ```APIDOC ## Webhook Event Payload: payment.paid ### Description Occurs whenever an affiliate payment is marked as paid or processed. ### Event Payload Example ```json { "event": "payment.paid", "data": { "payment_id": "pay_abc", "affiliate_id": "aff_789", "amount": 100.00, "paid_at": "2023-10-27T16:00:00Z" } } ``` ``` -------------------------------- ### Referral Denied Webhook Payload Example Source: https://aff-api.uppromote.com/docs/v2/referral-denied-21937424e0 This example shows the structure of the event payload when a referral is denied. It includes order details, customer information, commission details, and affiliate data. ```yaml openapi: 3.1.0 info: title: '' description: '' version: 1.0.0 paths: webhooks: referral.denied: post: summary: Referral denied deprecated: false description: Occurs whenever a referral is denied. The event payload shown below. tags: - Webhook Event Payload parameters: [] responses: '200': description: '' content: application/json: schema: type: object properties: {} example: id: 1781735 order_id: 6439197638978 order_number: 3832 customer_id: '8680135917890' quantity: 1 total_sales: '2679.95' commission_rule: program_id: 29486 commission_rate: '50.00' commission_type: Percent Of Sale commission_adjustment: '0.00' status: denied commission: '1339.98' refund_id: null tracking_type: Tracked by affiliate link affiliate: id: 2029214 email: test231@gmail.com first_name: Test last_name: '231' coupon_applied: null customer_email: hgasdf@gmail.com created_at: '2025-09-24T09:18:17Z' headers: {} x-apidog-name: Success security: [] x-apidog-folder: Webhook Event Payload x-apidog-status: released x-run-in-apidog: https://app.apidog.com/web/project/954846/apis/api-21937424-run components: schemas: {} securitySchemes: {} servers: - url: https://aff-api.uppromote.com description: Production Environment security: [] ``` -------------------------------- ### GET /api/v2/programs Source: https://aff-api.uppromote.com/docs/v2/get-programs-28435009e0 Retrieves a list of affiliate programs based on provided query parameters. ```APIDOC ## GET /api/v2/programs ### Description Retrieve a list of affiliate programs. Supports pagination and filtering by status and name. ### Method GET ### Endpoint https://aff-api.uppromote.com/api/v2/programs ### Parameters #### Query Parameters - **per_page** (integer) - Optional - Number of items per page - **page** (integer) - Optional - Page number - **status** (string) - Optional - Filter by status (e.g., active, inactive) - **program_name** (string) - Optional - Filter by program name ### Request Example curl --location --request GET 'https://aff-api.uppromote.com/api/v2/programs?per_page=10&page=1&status=active&program_name=Test Program' \ --header 'Authorization: ****************************' \ --header 'Accept: application/json' ### Response #### Success Response (200) - **status** (integer) - Status code - **message** (string) - Response message - **data** (array) - List of program objects #### Response Example { "status": 200, "message": "success", "data": [ { "id": 46, "name": "Program Test", "is_default": "not_default", "status": "active", "rule": "advance", "description": "Description ...", "commission_type": "Percent of sale", "commission_amount": 20, "created_at": "2021-10-05T04:43:34Z" } ] } ``` -------------------------------- ### GET /programs Source: https://aff-api.uppromote.com/docs/v2/get-a-program-by-id-28435010e0 Retrieves the details of an affiliate program, including commission structures and exclusion rules. ```APIDOC ## GET /programs ### Description Retrieves the configuration and settings for an affiliate program. ### Method GET ### Response #### Success Response (200) - **status** (string) - Status message - **message** (string) - Success message - **data** (object) - Program details object #### Response Example { "status": 200, "message": "success", "data": { "id": 46, "name": "Program Test", "is_default": "not_default", "status": "active", "rule": "advance", "description": "Description ...", "commission_type": "Percent of sale", "commission_amount": "20", "exclude_product_tax": true, "exclude_shipping": false, "exclude_shipping_tax": false, "exclude_tip": true, "exclude_self_referral": false, "payment_methods": ["paypal", "bank", "debit", "cheque"] } } ``` -------------------------------- ### Referral response structure Source: https://aff-api.uppromote.com/docs/v2/get-a-referral-by-id-21170076e0 Example of a successful 200 OK response containing referral metadata, commission details, and associated affiliate information. ```json { "status": 200, "message": "success", "data": { "id": 1781736, "order_id": 6439217201474, "order_number": 3833, "customer_id": "8680153416002", "quantity": 1, "total_sales": "1075.00", "commission_rule": { "program_id": 29486, "commission_rate": "50.00", "commission_type": "Percent Of Sale" }, "commission_adjustment": "0.00", "status": "approved", "commission": "537.50", "refund_id": null, "tracking_type": "Tracked by coupon", "affiliate": { "id": 2029214, "email": "example@gmail.com", "first_name": "Example", "last_name": "Test" }, "coupon_applied": "COUPON_NAME", "customer_email": "customer-name@gmail.com", "created_at": "2025-09-24T09:28:10Z" } } ``` -------------------------------- ### GET /api/v2/programs Source: https://aff-api.uppromote.com/docs/v2/get-programs-28435009e0 Retrieves a list of affiliate programs with support for pagination and filtering by status or name. ```APIDOC ## GET /api/v2/programs ### Description Retrieves a list of affiliate programs. ### Method GET ### Endpoint /api/v2/programs ### Parameters #### Query Parameters - **per_page** (integer) - Optional - Number of records to return per page (pagination). - **page** (integer) - Optional - The page number to retrieve, starting from 1. - **status** (string) - Optional - Filter by program status (allowed values: active, inactive). - **program_name** (string) - Optional - Program name. #### Header Parameters - **Authorization** (string) - Required - API authentication token. - **Accept** (string) - Required - Expected response format (application/json). - **Content-Type** (string) - Required - Request body format (application/json). ``` -------------------------------- ### GET /api/v2/affiliates Source: https://aff-api.uppromote.com/docs/v2/get-affiliates-21170049e0 Retrieves a list of affiliates with options for filtering and pagination. ```APIDOC ## GET /api/v2/affiliates ### Description Retrieves a list of affiliates. Supports filtering by email verification status, account status, affiliate name, affiliate email, and date ranges. Also includes pagination parameters. ### Method GET ### Endpoint /api/v2/affiliates ### Parameters #### Query Parameters - **per_page** (integer) - Optional - Number of records to return per page (pagination). - **page** (integer) - Optional - The page number to retrieve, starting from 1. - **email_verified** (string) - Optional - Filter by email verification status of the affiliate (allowed values: verified, unverified). - **status** (string) - Optional - Filter by affiliate account status (allowed values: active, inactive, pending). - **affiliate_name** (string) - Optional - Filter by affiliate name (supports relative match). - **affiliate_email** (string) - Optional - Filter by affiliate email address. - **from_date** (string) - Optional - Start date (ISO 8601 format - UTC timezone) to filter records by creation time. - **to_date** (string) - Optional - End date (ISO 8601 format - UTC timezone) to filter records by creation time. #### Headers - **Content-Type** (string) - Required - Example: application/json - **Accept** (string) - Required - Example: application/json - **Authorization** (string) - Required - Example: '****************************' ### Response #### Success Response (200) - **status** (integer) - HTTP status code. - **message** (string) - Response message. - **data** (array) - Array of affiliate objects. - **id** (integer) - ID of the affiliate - **email** (string) - Email of the affiliate - **first_name** (string) - First name of the affiliate - **last_name** (string) - Last name of the affiliate - **status** (string) - Affiliate account status (possible values: active, inactive, pending) - **company** (string) - Company name of the affiliate - **address** (string) - Address of the affiliate - **city** (string) - City of the affiliate - **state** (null) - State of the affiliate - **zipcode** (string) - Zip code of the affiliate - **country** (string) - Country of the affiliate - **phone** (string) - Phone number of the affiliate #### Response Example ```json { "status": 200, "message": "Affiliates retrieved successfully.", "data": [ { "id": 1, "email": "example@gmail.com", "first_name": "John", "last_name": "Doe", "status": "active", "company": "Example Corp", "address": "123 Main St", "city": "Anytown", "state": null, "zipcode": "12345", "country": "USA", "phone": "555-1234" } ] } ``` ``` -------------------------------- ### GET /referrals Source: https://aff-api.uppromote.com/docs/v2/get-list-referrals-21170075e0 Retrieves a list of affiliate referrals including order details, commission status, and affiliate information. ```APIDOC ## GET /referrals ### Description Retrieves a list of affiliate referrals including order details, commission status, and affiliate information. ### Method GET ### Endpoint /referrals ### Response #### Success Response (200) - **status** (integer) - Status code - **message** (string) - Success message - **data** (array) - List of referral records #### Response Example { "status": 200, "message": "success", "data": [ { "id": 1781736, "order_id": "6439217201474", "order_number": "3833", "customer_id": "8680153416002", "quantity": 1, "total_sales": "1075.00", "commission_rule": { "program_id": 29486, "commission_rate": "50.00", "commission_type": "Percent Of Sale" }, "commission_adjustment": "0.00", "status": "approved", "commission": "537.50", "refund_id": null, "tracking_type": "Tracked by coupon", "affiliate": { "id": 2029214, "email": "example@gmail.com", "first_name": "Example", "last_name": "Test" }, "coupon_applied": "COUPON_NAME", "customer_email": "customer-name@gmail.com", "created_at": "2025-09-24T09:28:10Z" } ] } ``` -------------------------------- ### GET /affiliate Source: https://aff-api.uppromote.com/docs/v2/get-affiliate-by-id-21170051e0 Retrieves detailed information about an affiliate, including their profile data, commission status, and payment details. ```APIDOC ## GET /affiliate ### Description Retrieves the profile and financial details for an affiliate, including social media links, program information, and current commission balances. ### Method GET ### Endpoint https://aff-api.uppromote.com/affiliate ### Response #### Success Response (200) - **country** (string) - Affiliate country code - **phone** (string) - Affiliate phone number - **facebook** (string) - Facebook profile URL - **twitter** (string) - Twitter handle - **w9_form** (string) - URL to W9 form document - **internal_note** (string) - Internal notes - **youtube** (string) - YouTube channel identifier - **instagram** (string) - Instagram handle - **website** (string) - Affiliate website URL - **tiktok** (string) - TikTok handle - **personal_detail** (string) - Biography or personal details - **created_at** (string) - ISO 8601 timestamp of creation - **default_affiliate_link** (string) - Default tracking link - **custom_affiliate_link** (string) - Custom tracking link - **program_id** (integer) - ID of the affiliate program - **program_name** (string) - Name of the affiliate program - **custom_fields** (array) - List of custom fields - **coupons** (array) - List of assigned coupon codes - **vat_number** (string) - VAT identification number - **tax_value** (number) - Tax value - **up_line_affiliate_id** (null) - ID of the upline affiliate - **up_line_affiliate_email** (null) - Email of the upline affiliate - **payment_method** (string) - Configured payment method - **payment_info** (object) - Payment details object - **paid_amount** (number) - Total amount paid - **approved_amount** (number) - Total approved commission - **pending_amount** (number) - Total pending commission - **denied_amount** (number) - Total denied commission #### Response Example { "country": "NL", "phone": "012345678", "facebook": "https://www.facebook.com/example", "twitter": "example123", "w9_form": "https://cdn.uppromote.com/storage/uploads/w9_form/shop/972a95409ae46f2e3dfaed31d3c280fa_1772436745.pdf", "internal_note": "Note...", "youtube": "example", "instagram": "example.ig", "website": "https://uppromote.com", "tiktok": "uppromote", "personal_detail": "Scale your business with UpPromote...", "created_at": "2025-07-11T11:05:26Z", "default_affiliate_link": "https://uppromote.myshopify.com?sca_ref=2011818.", "custom_affiliate_link": "https://uppromote.myshopify.com/up", "program_id": 28048, "program_name": "Standard Affiliate Commissionn", "custom_fields": [], "coupons": ["TEST123"], "vat_number": "1239081283", "tax_value": 0, "up_line_affiliate_id": null, "up_line_affiliate_email": null, "payment_method": "paytm", "payment_info": { "number": "2715500356" }, "paid_amount": 122.39, "approved_amount": 50, "pending_amount": 267.56, "denied_amount": 0 } ``` -------------------------------- ### Get Program by ID Source: https://aff-api.uppromote.com/docs/v2/get-a-program-by-id-28435010e0 Retrieves details of a specific affiliate program using its unique identifier. ```APIDOC ## GET /websites/aff-api_uppromote_v2 ### Description Retrieves details of a specific affiliate program using its unique identifier. ### Method GET ### Endpoint /websites/aff-api_uppromote_v2 ### Parameters #### Query Parameters - **id** (string) - Required - The unique identifier of the program to retrieve. ``` -------------------------------- ### GET /api/v2/programs/{id} Source: https://aff-api.uppromote.com/docs/v2/get-a-program-by-id-28435010e0 Retrieves details of a specific affiliate program using its unique identifier. ```APIDOC ## GET /api/v2/programs/{id} ### Description Retrieves details of a specific affiliate program using its unique identifier. ### Method GET ### Endpoint /api/v2/programs/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The program Id #### Header Parameters - **Authorization** (string) - Required - Authentication token - **Accept** (string) - Required - Specifies the desired response format, e.g., application/json - **Content-Type** (string) - Required - Specifies the request body format, e.g., application/json ### Response #### Success Response (200) - **status** (integer) - Indicates the status of the operation. - **message** (string) - A message describing the result of the operation. - **data** (object) - Contains the program details: - **id** (integer) - ID of the program - **name** (string) - Name of the program - **is_default** (string) - Whether this program is the default program. Allowed values: default, not_default - **status** (string) - Program status. Possible values: active, inactive - **rule** (string) - Rule type. Allowed values: simple, advance - **commission_type** (string) - Commission type of the program. Possible values: Flat Rate Per Order, Flat Rate Per Item, Percent Of Sale - **commission_amount** (string) - Commission amount value of the program - **commission_advance** (array) - Details for advanced commission tiers: - **level** (integer) - Level of the commission tier - **condition** (string) - Condition for this tier - **commission** (string) - Commission amount for this tier - **new_customer_commission** (object) - Commission details for new customers: - **type** (string) - Commission type for new customers. Possible values: Flat Rate Per Order, Flat Rate Per Item, Percent Of Sale - **amount** (integer) - Commission amount for new customers - **lifetime_commission** (object) - Details for lifetime commissions: - **disconnect_day** (integer) - Number of days after which the commission is disconnected - **first_commission** (object) - Details for the first commission in lifetime: - **type** (string) - Commission type for lifetime commission. Possible values: Flat Rate Per Order, Flat Rate Per Item, Percent Of Sale #### Response Example ```json { "status": 200, "message": "Program retrieved successfully", "data": { "id": 123, "name": "Example Program", "is_default": "default", "status": "active", "rule": "simple", "commission_type": "Percent Of Sale", "commission_amount": "10%", "commission_advance": [ { "level": 1, "condition": "100 sales", "commission": "12%" } ], "new_customer_commission": { "type": "Flat Rate Per Order", "amount": 5 }, "lifetime_commission": { "disconnect_day": 30, "first_commission": { "type": "Percent Of Sale", "amount": "15%" } } } } ``` ``` -------------------------------- ### GET /websites/aff-api_uppromote_v2 Source: https://aff-api.uppromote.com/docs/v2/get-affiliates-21170049e0 Retrieves a list of affiliates and their details. This endpoint provides comprehensive information about each affiliate, including their contact information, social media presence, financial status, and associated program details. ```APIDOC ## GET /websites/aff-api_uppromote_v2 ### Description Retrieves a list of affiliates and their details. This endpoint provides comprehensive information about each affiliate, including their contact information, social media presence, financial status, and associated program details. ### Method GET ### Endpoint /websites/aff-api_uppromote_v2 ### Parameters #### Query Parameters - **status** (string) - Optional - Filter affiliates by their status (e.g., 'active', 'inactive'). - **email** (string) - Optional - Filter affiliates by their email address. ### Request Example ```json { "headers": {} } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the affiliate. - **email** (string) - The email address of the affiliate. - **first_name** (string) - The first name of the affiliate. - **last_name** (string) - The last name of the affiliate. - **status** (string) - The current status of the affiliate (e.g., 'active', 'pending'). - **email_verified** (string) - Indicates if the affiliate's email has been verified ('verified' or 'unverified'). - **company** (string) - The company name associated with the affiliate. - **address** (string) - The street address of the affiliate. - **city** (string) - The city of the affiliate's address. - **state** (string) - The state or region of the affiliate's address (can be null). - **zipcode** (string) - The postal code of the affiliate's address. - **country** (string) - The country of the affiliate's address. - **phone** (string) - The phone number of the affiliate. - **facebook** (string) - The affiliate's Facebook profile URL or username. - **twitter** (string) - The affiliate's Twitter profile URL or username. - **youtube** (string) - The affiliate's YouTube channel URL or username. - **instagram** (string) - The affiliate's Instagram profile URL or username. - **website** (string) - The affiliate's website URL. - **tiktok** (string) - The affiliate's TikTok profile URL or username. - **w9_form** (string) - URL to the affiliate's W9 form if applicable. - **internal_note** (string) - Internal notes about the affiliate. - **personal_detail** (string) - A detailed description or personal information about the affiliate. - **created_at** (string) - The timestamp when the affiliate was created (ISO 8601 format). - **default_affiliate_link** (string) - The default affiliate link generated for the affiliate. - **custom_affiliate_link** (string) - A custom affiliate link set for the affiliate. - **program_id** (integer) - The ID of the affiliate program the affiliate is part of. - **program_name** (string) - The name of the affiliate program. - **custom_fields** (array) - An array of custom fields associated with the affiliate. - **coupons** (array) - An array of coupon codes available to the affiliate. - **vat_number** (string) - The VAT number of the affiliate, if applicable. - **tax_value** (number) - The tax value associated with the affiliate. - **up_line_affiliate_id** (integer) - The ID of the affiliate who referred this affiliate (can be null). - **up_line_affiliate_email** (string) - The email of the affiliate who referred this affiliate (can be null). - **payment_method** (string) - The preferred payment method for the affiliate. - **payment_info** (object) - Object containing payment details (e.g., account number). - **paid_amount** (number) - The total amount paid to the affiliate. - **approved_amount** (number) - The total amount of commissions approved for the affiliate. - **pending_amount** (number) - The total amount of commissions pending for the affiliate. - **denied_amount** (number) - The total amount of commissions denied for the affiliate. #### Response Example ```json { "status": 200, "message": "success", "data": [ { "id": 2011818, "email": "enactusneu@gmail.com", "first_name": "Johnny", "last_name": "Test", "status": "active", "email_verified": "verified", "company": "UpPromote", "address": "Han Hollanderlaan 1", "city": "Amsterdam", "state": null, "zipcode": "1067 BB", "country": "NL", "phone": "012345678", "facebook": "https://www.facebook.com/example", "twitter": "example123", "youtube": "example", "instagram": "example.ig", "website": "https://uppromote.com", "tiktok": "uppromote", "w9_form": "https://cdn.uppromote.com/storage/uploads/w9_form/shop/972a95409ae46f2e3dfaed31d3c280fa_1772436745.pdf", "internal_note": "Note...", "personal_detail": "Scale your business with UpPromote, the #1 Shopify affiliate marketing app & software. Build, track & manage affiliate programs easily. Try for free today!", "created_at": "2025-07-11T11:05:26Z", "default_affiliate_link": "https://uppromote.myshopify.com?sca_ref=2011818.FmZu3BoxQd", "custom_affiliate_link": "https://uppromote.myshopify.com/up", "program_id": 28048, "program_name": "Standard Affiliate Commissionn", "custom_fields": [], "coupons": [ "TEST123" ], "vat_number": "1239081283", "tax_value": 0, "up_line_affiliate_id": null, "up_line_affiliate_email": null, "payment_method": "paytm", "payment_info": { "number": "2715500356" }, "paid_amount": 122.39, "approved_amount": 50, "pending_amount": 267.56, "denied_amount": 0 } ] } ``` #### Error Response (401) - **message** (string) - Error message, typically 'Unauthorized'. - **status** (integer) - HTTP status code, 401. #### Error Response (422) - **message** (object) - Object containing validation errors. - **status** (integer) - HTTP status code, 422. #### Error Response (500) - **message** (string) - Internal server error message. - **status** (integer) - HTTP status code, 500. ``` -------------------------------- ### GET /api/v2/coupons Source: https://aff-api.uppromote.com/docs/v2/get-coupons-21170056e0 Retrieves a list of coupons associated with an affiliate. Supports filtering by email, coupon code, description, date range, and pagination. ```APIDOC ## GET /api/v2/coupons ### Description Retrieves a list of coupons associated with an affiliate. Supports filtering by email, coupon code, description, date range, and pagination. ### Method GET ### Endpoint /api/v2/coupons ### Parameters #### Query Parameters - **affiliate_email** (string) - Optional - The email address of the affiliate. - **coupon** (string) - Optional - The coupon code associated with the affiliate. - **description** (string) - Optional - A description of the coupon (discount details). - **per_page** (integer) - Optional - Number of records to return per page (pagination). - **page** (integer) - Optional - The page number to retrieve, starting from 1. - **from_date** (string) - Optional - Start date (ISO 8601 format - UTC timezone) to filter records by creation time. - **to_date** (string) - Optional - End date (ISO 8601 format - UTC timezone) to filter records by creation time. #### Header Parameters - **Content-Type** (string) - Required - Example: application/json - **Accept** (string) - Required - Example: application/json - **Authorization** (string) - Required - Example: **************************** ### Response #### Success Response (200) - **status** (integer) - Description of the status code. - **message** (string) - Description of the response message. - **data** (array) - An array of coupon objects. - **id** (integer) - ID of the affiliate coupon - **affiliate_id** (integer) - ID of the affiliate - **affiliate_email** (string) - Email of the affiliate - **coupon** (string) - Affiliate coupon name - **description** (string) - Affiliate coupon description - **created_at** (string) - Affiliate coupon assign date #### Response Example ```json { "status": 200, "message": "success", "data": [ { "id": 158201, "affiliate_id": 1970615, "affiliate_email": "example@gmail.com", "coupon": "TEST12", "description": "", "created_at": "2024-07-11T06:58:59Z" }, { "id": 163064, "affiliate_id": 1970615, "affiliate_email": "example@gmail.com", "coupon": "TESTJ", "description": null, "created_at": "2025-04-09T06:53:05Z" } ] } ``` ``` -------------------------------- ### POST /affiliates Source: https://aff-api.uppromote.com/docs/v2/create-an-affiliate-21170054e0 Creates a new affiliate account in the UpPromote system. ```APIDOC ## POST /affiliates ### Description Creates a new affiliate account with the provided details including contact information, social media links, and business profile. ### Method POST ### Endpoint https://aff-api.uppromote.com/affiliates ### Request Body - **email** (string) - Required - Email address of the affiliate - **first_name** (string) - Required - First name of the affiliate - **last_name** (string) - Required - Last name of the affiliate - **password** (string) - Required - Password for the account - **program_id** (integer) - Required - ID of the affiliate program - **status** (string) - Required - Account status (e.g., active) - **send_email** (boolean) - Optional - Whether to send a welcome email - **company** (string) - Optional - Company name - **address** (string) - Optional - Physical address - **country** (string) - Optional - Country code - **city** (string) - Optional - City name - **state** (string) - Optional - State or district - **phone** (string) - Optional - Phone number - **facebook** (string) - Optional - Facebook profile URL - **youtube** (string) - Optional - YouTube channel URL - **instagram** (string) - Optional - Instagram profile URL - **website** (string) - Optional - Personal website URL - **tiktok** (string) - Optional - TikTok username - **personal_detail** (string) - Optional - Description of the affiliate - **twitter** (string) - Optional - Twitter profile URL ### Request Example { "email": "example@gmail.com", "first_name": "First", "last_name": "Last", "password": "$#Abgf%^%$12", "program_id": 152, "status": "active", "send_email": true, "company": "Test Company", "address": "No 1, Example Street", "country": "vn", "city": "Ho Chi Minh", "state": "District 1", "phone": "0123456789", "facebook": "facebook.com/example", "youtube": "youtube.com/@example", "instagram": "instagram.com/example", "website": "https://uppromote.com", "tiktok": "uppromote", "personal_detail": "Scale your business with UpPromote...", "twitter": "twitter.com/example" } ### Response #### Success Response (200) - **status** (integer) - Status code - **message** (string) - Success message - **data** (object) - Affiliate details containing affiliate_id and affiliate_email #### Response Example { "status": 200, "message": "success", "data": { "affiliate_id": 2029462, "affiliate_email": "test_api@gmail.com" } } ``` -------------------------------- ### GET /api/v2/payments/total-paid Source: https://aff-api.uppromote.com/docs/v2/count-total-paid-payments-21170060e0 Retrieves the total count of paid payments from the system. ```APIDOC ## GET /api/v2/payments/total-paid ### Description Retrieves the total count of paid payments. ### Method GET ### Endpoint /api/v2/payments/total-paid ### Parameters #### Header Parameters - **Content-Type** (string) - Optional - application/json - **Accept** (string) - Required - application/json - **Authorization** (string) - Required - Bearer token for authentication ### Response #### Success Response (200) - **status** (integer) - Status code - **message** (string) - Success message - **data** (integer) - Total paid payments #### Response Example { "status": 200, "message": "success", "data": 21 } ``` -------------------------------- ### GET /api/v2/referrals/{id} Source: https://aff-api.uppromote.com/docs/v2/get-a-referral-by-id-21170076e0 Retrieves the details of a specific referral by its unique ID. ```APIDOC ## GET /api/v2/referrals/{id} ### Description Retrieves the details of a specific referral by its unique ID. ### Method GET ### Endpoint /api/v2/referrals/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The referral ID. #### Header Parameters - **Content-Type** (string) - Required - Example: application/json - **Accept** (string) - Required - Example: application/json - **Authorization** (string) - Required - Example: **************************** ### Response #### Success Response (200) - **status** (integer) - Status code - **message** (string) - Response message - **data** (object) - Referral lists & details #### Response Example { "status": 200, "message": "success", "data": { "id": 1781736, "order_id": 6439217201474, "order_number": 3833, "customer_id": "8680153416002", "quantity": 1, "total_sales": "1075.00", "commission_rule": { "program_id": 29486, "commission_rate": "50.00", "commission_type": "Percent Of Sale" }, "commission_adjustment": "0.00", "status": "approved", "commission": "537.50", "refund_id": null, "tracking_type": "Tracked by coupon", "affiliate": { "id": 2029214, "email": "example@gmail.com", "first_name": "Example", "last_name": "Test" }, "coupon_applied": "COUPON_NAME", "customer_email": "customer-name@gmail.com", "created_at": "2025-09-24T09:28:10Z" } } ``` -------------------------------- ### POST /api/v2/affiliate/set-upline Source: https://aff-api.uppromote.com/docs/v2/set-upline-for-an-affiliate-21170053e0 Sets the upline affiliate for a given affiliate. This is useful for establishing referral chains within the affiliate program. ```APIDOC ## POST /api/v2/affiliate/set-upline ### Description Sets the upline for an affiliate. ### Method POST ### Endpoint /api/v2/affiliate/set-upline ### Parameters #### Header Parameters - **Content-Type** (string) - Required - application/json - **Accept** (string) - Required - application/json - **Authorization** (string) - Required - Bearer token #### Request Body - **affiliate_email** (string) - Required - The email address of the (downline) affiliate. - **upline_affiliate_email** (string) - Required - The email address of the referring (upline) affiliate. ### Request Example ```json { "affiliate_email": "downline@example.com", "upline_affiliate_email": "upline@example.com" } ``` ### Response #### Success Response (200) - **status** (integer) - HTTP status code. - **message** (string) - A message indicating the result of the operation. - **data** (object) - Contains details about the updated affiliate relationship. - **affiliate_id** (integer) - Downline affiliate ID - **upline_affiliate_email** (string) - Upline affiliate email #### Response Example ```json { "status": 200, "message": "Success", "data": { "affiliate_id": 2029462, "upline_affiliate_email": "test232@gmail.com" } } ``` #### Error Responses - **401 Unauthorized**: Returned if the request is not authenticated. - **422 Unprocessable Entity**: Returned for validation errors in the request body. - **500 Internal Server Error**: Returned for server-side errors. ```