openapi: 3.1.0 info: title: Keap Affiliate API description: Keap Public API Documentation termsOfService: https://www.thryv.com/terms-of-use contact: name: Keap url: https://developer.keap.com/get-support email: api.keap@thryv.com license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 version: v2 servers: - url: https://api.infusionsoft.com/crm tags: - name: Affiliate paths: /rest/v2/affiliates: get: tags: - Affiliate summary: List Affiliates description: Retrieves a list of Affiliates operationId: listAffiliate parameters: - name: filter in: query description: 'Filter to apply, allowed fields are: - (String) `id` - Allowable operators: "==","<=", "<", ">=", ">", "!=" - (String) `name` - Wildcard matching allowed - (String) `contact_id` - (String) `referral_contact_id` - (String) `status` - (String) `code` - (Custom) Custom field names - Reference by field name (e.g., `tier`, `region`) You will need to apply the `==` operator to check the equality of one of the filters with the value you want to match, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=id%3C123` - `filter=id%3D%3D123` - `filter=name%3D%3DBob` - `filter=contact_id%3D%3D567` - `filter=contact_id%3D%3D123%3Bcode%3D%3D567` For fields which allow wildcard matching, you may use the * wildcard character (or its encoded form %2A) for case-insensitive partial matching on text fields. Example of a valid pattern of wildcard usage: - `field==foo*` finds anything in `field` that begins with `foo` Custom Field Filtering: Custom fields are referenced by their field name as configured in the system. Standard field names take precedence over custom field names. Supported operators by field type: - Text fields and single-value choice fields with text options (dropdown, radio, state): ==, and wildcard support (e.g., `value*`) - Numeric fields (including user, month, day of week): ==, <, <=, >, >= - Date fields: ==, <, <=, >, >= (ISO 8601 format) - Yes/No and drilldown fields: == - Multi-select fields: == (matches if value is present) Examples of custom field filtering: - `filter=tier%3D%3DPlatinum` - Text field exact match - `filter=region%3D%3DWest%2A` - Text field with wildcard (starts with "West") - `filter=revenue%3E100000` - Numeric field greater than 100000 - `filter=join_date%3E%3D2024-01-01` - Date field on or after Jan 1, 2024 - `filter=name%3D%3DBob%3Btier%3D%3DGold` - Combine standard and custom fields Note: Leading wildcards (e.g., `*value`) are not supported for performance reasons. Only prefix wildcards (e.g., `value*`) are allowed. ' required: false schema: type: string - name: page_token in: query description: Page token required: false schema: type: string - name: order_by in: query description: 'Attribute and direction to order items. One of the following fields: - `id` - `date_created` - `name` - `status` - `code` One of the following directions: - `asc` - `desc` ' required: false schema: type: string - name: page_size in: query description: Total number of items to return per page required: false schema: type: integer format: int32 maximum: 1000 minimum: 0 example: 0 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListAffiliatesResponse' post: tags: - Affiliate summary: Create an Affiliate description: Creates a single Affiliate operationId: addAffiliate requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateAffiliateRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/RestAffiliate' /rest/v2/affiliates/{id}:removeFromProgram: post: tags: - Affiliate summary: Remove an Affiliate from a Commission Program description: Removes an Affiliate from a Commission Program operationId: removeAffiliateFromProgram parameters: - name: id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AffiliateRemoveFromProgramRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK /rest/v2/affiliates/{id}:assignToProgram: post: tags: - Affiliate summary: Assign Affiliate to Commission program description: Assigns an Affiliate to Commission Program operationId: addAffiliateToProgram parameters: - name: id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/AffiliateAddToProgramRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK /rest/v2/affiliates/redirects: get: tags: - Affiliate summary: List Affiliate Links description: Retrieves a list of Affiliate Links operationId: listAffiliateLinks parameters: - name: filter in: query description: 'Filter to apply, allowed fields are: - (String) `name` - (String) `affiliate_id` ' required: false schema: type: string - name: page_token in: query description: Page token required: false schema: type: string - name: order_by in: query description: 'Attribute and direction to order items. One of the following fields: - `name` - `date_created` One of the following directions: - `asc` - `desc`' required: false schema: type: string - name: page_size in: query description: Total number of items to return per page required: false schema: type: integer format: int32 maximum: 1000 minimum: 0 example: 0 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListAffiliateLinksResponse' post: tags: - Affiliate summary: Create an Affiliate Link description: Creates a single Affiliate Link operationId: createRedirectLink requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateOrUpdateAffiliateLinkRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/AffiliateLink' /rest/v2/affiliates/model/customFields: post: tags: - Affiliate summary: Create an Affiliate Custom Field description: Creates a single Affiliate Custom Field operationId: createAffiliateCustomField requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCustomFieldRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/CustomFieldMetaData' /rest/v2/affiliates/model/customFields/tabs: get: tags: - Affiliate summary: List Affiliate Custom Field Tabs description: Retrieves a list of custom field tabs for the Affiliate record type. operationId: listAffiliateCustomFieldTabs responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListCustomFieldTabsResponse' post: tags: - Affiliate summary: Create an Affiliate Custom Field Tab description: Creates a new custom field tab for the Affiliate record type. operationId: createAffiliateCustomFieldTab requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCustomFieldTabRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/CustomFieldTab' /rest/v2/affiliates/model/customFields/groups: get: tags: - Affiliate summary: List Affiliate Custom Field Groups description: Retrieves a list of custom field groups for the Affiliate record type. Optionally filter by tab_id to scope to a specific tab. operationId: listAffiliateCustomFieldGroups parameters: - name: tab_id in: query description: Optional tab id to scope groups to a single tab required: false schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListCustomFieldGroupsResponse' post: tags: - Affiliate summary: Create an Affiliate Custom Field Group description: Creates a new custom field group for the Affiliate record type. If `tab_id` is omitted, the group is added to the default 'Custom Fields' tab. operationId: createAffiliateCustomFieldGroup requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCustomFieldGroupRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/CustomFieldGroup' /rest/v2/affiliates/commissionPrograms: get: tags: - Affiliate summary: List Affiliate Commission Programs description: Retrieves a list of Affiliate Commission Programs operationId: listAffiliateCommissionPrograms parameters: - name: filter in: query description: 'Filter to apply, allowed fields are: - (String) `name` - (String) `affiliate_id` ' required: false schema: type: string - name: page_token in: query description: Page token required: false schema: type: string - name: order_by in: query description: 'Attribute and direction to order items. One of the following fields: - `name` - `date_created` One of the following directions: - `asc` - `desc`' required: false schema: type: string - name: page_size in: query description: Total number of items to return per page required: false schema: type: integer format: int32 maximum: 1000 minimum: 0 example: 0 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListAffiliateCommissionProgramsResponse' post: tags: - Affiliate summary: Create an Affiliate Commission Program description: Creates an Affiliate Commission Program operationId: addCommissionProgram requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCommissionProgramRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/AffiliateCommissionProgramResponse' /rest/v2/affiliates/commissionPrograms/{commission_id}:removeSubscriptionCommission: post: tags: - Affiliate summary: Remove a Subscription from a Commission Program description: Removes a Subscription from a Commission Program operationId: removeSubscriptionPlanCommissionFromCommissions parameters: - name: commission_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/DeleteSubscriptionPlanCommissionRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK /rest/v2/affiliates/commissionPrograms/{commission_id}:removeProductCommission: post: tags: - Affiliate summary: Remove a Product from a Commission Program description: Removes a Product from a Commission Program operationId: removeProductCommissionFromCommissions parameters: - name: commission_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/DeleteProgramCommissionRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK /rest/v2/affiliates/commissionPrograms/subscriptionCommissionPrograms/{commission_program_id}: post: tags: - Affiliate summary: Assign a Subscription Commission Program description: Assigns a Subscription Commission Program to a Subscription operationId: assignSubscriptionCommissionProgram parameters: - name: commission_program_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateSubscriptionCommissionProgramRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/GetRestCommissionProgram' patch: tags: - Affiliate summary: Update a Subscription Commission Program description: Updates a Subscription Commission Program operationId: updateSubscriptionCommissionProgram parameters: - name: commission_program_id in: path required: true schema: type: string - name: update_mask in: query description: An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. required: false schema: type: array items: type: string enum: - percentage - dollar_amount - payout_type - level_1 - level_2 - unused uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateSubscriptionCommissionProgramRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GetRestCommissionProgram' /rest/v2/affiliates/commissionPrograms/resources: post: tags: - Affiliate summary: Create Commission Program Resource description: Creates a resource for a commission program operationId: addCommissionProgramResource requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateProgramResourceRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/AffiliateProgramResource' /rest/v2/affiliates/commissionPrograms/productCommissionPrograms/{commission_program_id}: post: tags: - Affiliate summary: Assign a Product Commission Program description: Assigns a Product Commission Program to a Product operationId: assignProductCommissionProgram parameters: - name: commission_program_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateProductCommissionProgramRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/GetRestCommissionProgram' patch: tags: - Affiliate summary: Update a Product Commission Program description: Updates a Product Commission Program operationId: updateProductCommissionProgram parameters: - name: commission_program_id in: path required: true schema: type: string - name: update_mask in: query description: An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. required: false schema: type: array items: type: string enum: - percentage - dollar_amount - payout_type - level_1 - level_2 - unused uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateProductCommissionProgramRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GetRestCommissionProgram' /rest/v2/affiliates/commissionPrograms/defaultCommissionPrograms/{commission_program_id}: post: tags: - Affiliate summary: Create a Default Commission Program description: Creates a Default Commission Program operationId: createDefaultCommissionProgram parameters: - name: commission_program_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateDefaultCommissionProgramRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/GetRestCommissionProgram' patch: tags: - Affiliate summary: Update a Default Commission Program description: Updates a Default Commission Program operationId: updateDefaultCommissionProgram parameters: - name: commission_program_id in: path required: true schema: type: string - name: update_mask in: query description: An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. required: false schema: type: array items: type: string enum: - percentage - dollar_amount - payout_type - level_1 - level_2 - unused uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateDefaultCommissionProgramRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GetRestCommissionProgram' /rest/v2/affiliates/{id}: get: tags: - Affiliate summary: Retrieve an Affiliate description: Retrieves a single Affiliate operationId: getAffiliate parameters: - name: id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RestAffiliate' delete: tags: - Affiliate summary: Delete Affiliate description: Deletes the specified Affiliate operationId: deleteAffiliate parameters: - name: id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Affiliate summary: Update an Affiliate description: Updates a single Affiliate operationId: updateAffiliate parameters: - name: id in: path required: true schema: type: string - name: update_mask in: query description: An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. required: false schema: type: array items: type: string enum: - contact_id - code - name - status - parent_affiliate_id - notify_on_sale - notify_on_lead - track_leads_days - password - custom_fields uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateAffiliateRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RestAffiliate' /rest/v2/affiliates/redirects/{redirect_id}: get: tags: - Affiliate summary: Retrieve an Affiliate Link description: Retrieves information about a single Affiliate Link operationId: getRedirectLink parameters: - name: redirect_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AffiliateLink' delete: tags: - Affiliate summary: Delete an Affiliate Link description: Deletes an Affiliate Link operationId: deleteRedirectLink parameters: - name: redirect_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Affiliate summary: Update an Affiliate Link description: Updates an Affiliate Link operationId: updateRedirectLink parameters: - name: redirect_id in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateOrUpdateAffiliateLinkRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AffiliateLink' /rest/v2/affiliates/model/customFields/{custom_field_id}: delete: tags: - Affiliate summary: Delete a Custom Field description: Deletes a Custom Field from Affiliate. operationId: deleteAffiliateCustomField parameters: - name: custom_field_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Affiliate summary: Update a Custom Field description: Updates a custom field of the specified type and options to the Affiliate object. operationId: updateAffiliateCustomField parameters: - name: custom_field_id in: path required: true schema: type: string - name: update_mask in: query description: An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. required: false schema: type: array items: type: string enum: - group_id - label - options uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCustomFieldMetaDataRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CustomFieldMetaData' /rest/v2/affiliates/model/customFields/tabs/{tab_id}: get: tags: - Affiliate summary: Retrieve an Affiliate Custom Field Tab description: Retrieves a single custom field tab by id for the Affiliate record type. operationId: getAffiliateCustomFieldTab parameters: - name: tab_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CustomFieldTab' delete: tags: - Affiliate summary: Delete an Affiliate Custom Field Tab description: Deletes a custom field tab. Returns 409 Conflict if the tab still contains groups. operationId: deleteAffiliateCustomFieldTab parameters: - name: tab_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Affiliate summary: Update an Affiliate Custom Field Tab description: Updates an existing custom field tab. Only fields listed in `update_mask` are applied. operationId: updateAffiliateCustomFieldTab parameters: - name: tab_id in: path required: true schema: type: string - name: update_mask in: query description: Comma-separated list of fields to update required: true schema: type: array items: type: string enum: - name - order uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCustomFieldTabRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CustomFieldTab' /rest/v2/affiliates/model/customFields/groups/{group_id}: get: tags: - Affiliate summary: Retrieve an Affiliate Custom Field Group description: Retrieves a single custom field group by id for the Affiliate record type. operationId: getAffiliateCustomFieldGroup parameters: - name: group_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CustomFieldGroup' delete: tags: - Affiliate summary: Delete an Affiliate Custom Field Group description: Deletes a custom field group. Returns 409 Conflict if the group still contains custom fields. operationId: deleteAffiliateCustomFieldGroup parameters: - name: group_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Affiliate summary: Update an Affiliate Custom Field Group description: Updates an existing custom field group. Only fields listed in `update_mask` are applied. operationId: updateAffiliateCustomFieldGroup parameters: - name: group_id in: path required: true schema: type: string - name: update_mask in: query description: Comma-separated list of fields to update required: true schema: type: array items: type: string enum: - name - tab_id - order uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCustomFieldGroupRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CustomFieldGroup' /rest/v2/affiliates/commissionPrograms/{commission_program_id}: get: tags: - Affiliate summary: Retrieve a Commission Program description: Retrieves a single Commission Program operationId: getCommissionProgram parameters: - name: commission_program_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GetRestCommissionProgram' delete: tags: - Affiliate summary: Delete a Commission Program description: Deletes a Commission Program operationId: deleteAffiliateCommissionProgram parameters: - name: commission_program_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Affiliate summary: Update an Affiliate Commission Program description: Updates the properties of an Affiliate Commission Program operationId: updateCommissionProgram parameters: - name: commission_program_id in: path required: true schema: type: string - name: update_mask in: query description: An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. required: false schema: type: array items: type: string enum: - name - notes - priority uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCommissionProgramRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AffiliateCommissionProgramResponse' /rest/v2/affiliates/commissionPrograms/resources/{resource_id}: delete: tags: - Affiliate summary: Remove Commission Program Resource description: Removes a resource from a commission program operationId: deleteCommissionProgramResource parameters: - name: resource_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '204': description: No Content patch: tags: - Affiliate summary: Update Commission Program Resource description: Updates a resource for a commission program operationId: updateCommissionProgramResource parameters: - name: resource_id in: path required: true schema: type: string - name: update_mask in: query description: An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. required: false schema: type: array items: type: string enum: - title - notes - url - order - content_html - page_width - page_height - commission_program_ids uniqueItems: true requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateProgramResourceRequest' required: true responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AffiliateProgramResource' /rest/v2/affiliates/{affiliate_id}:commissions: get: tags: - Affiliate summary: Retrieve Affiliate Commissions description: Retrieve a list of Affiliate's Commissions operationId: getAffiliateCommissions parameters: - name: affiliate_id in: path required: true schema: type: string - name: filter in: query description: 'Filter to apply, allowed fields are: - (String) `since_time` - (String) `until_time` You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=since_time%3D%3D2024-05-21T23:00:00Z%3Buntil_time%3D%3D2025-05-21T23:00:00Z` - `filter=until_time%3D%3D2025-05-21T23:00:00Z` ' required: false schema: type: string - name: page_token in: query description: Page token required: false schema: type: string - name: order_by in: query description: 'Attribute and direction to order items. One of the following fields: - `invoice_id` - `time_earned` One of the following directions: - `asc` - `desc`' required: false schema: type: string - name: page_size in: query description: Total number of items to return per page required: false schema: type: integer format: int32 maximum: 1000 minimum: 0 example: 0 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListAffiliateCommissionsResponse' /rest/v2/affiliates/{affiliate_id}/referrals: get: tags: - Affiliate summary: Retrieve Affiliate Referrals description: Retrieves all referrals belonging to the given affiliate operationId: getReferralsByAffiliateId parameters: - name: affiliate_id in: path required: true schema: type: string - name: filter in: query description: 'Filter to apply, allowed fields are: - (String) `source` - Wildcard matching allowed You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For fields which allow wildcard matching, you may use the * wildcard character (or its encoded form %2A) for case-insensitive partial matching on text fields. Example of a valid pattern of wildcard usage: - `field==foo*` finds anything in `field` that begins with `foo` For the filters listed above, here are some examples: - `filter=source%3D%3DEmail Marketing` - `filter=source%3D%3DEmail*` (starts with "Email") ' required: false schema: type: string - name: page_token in: query description: Page token required: false schema: type: string - name: order_by in: query description: 'Attribute and direction to order items. One of the following fields: - `id` - `referral_time` One of the following directions: - `asc` - `desc`' required: false schema: type: string - name: page_size in: query description: Total number of items to return per page required: false schema: type: integer format: int32 maximum: 1000 minimum: 0 example: 0 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListAffiliateReferralsResponse' /rest/v2/affiliates/{affiliate_id}/payments: get: tags: - Affiliate summary: List Affiliate Payments description: Retrieves a list of affiliate payments operationId: listAffiliatePayments parameters: - name: affiliate_id in: path required: true schema: type: string - name: filter in: query description: 'Filter to apply, allowed fields are: - (String) `since_time` - (String) `until_time` You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=since_time%3D%3D2024-09-17T-15:50+00` - `filter=until_time%3D%3D2024-09-17T-15:50+00` ' required: false schema: type: string - name: page_token in: query description: Page token required: false schema: type: string - name: order_by in: query description: 'Attribute and direction to order items. One of the following fields: - `create_time` - `pay_date` - `pay_amount` One of the following directions: - `asc` - `desc` ' required: false schema: type: string - name: page_size in: query description: Total number of items to return per page required: false schema: type: integer format: int32 maximum: 1000 minimum: 0 example: 0 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListAffiliatePaymentsResponse' /rest/v2/affiliates/{affiliate_id}/commissionTotal: get: tags: - Affiliate summary: Retrieve Affiliate Commission Earned and View LedgerURl for portal description: Get the Affiliate Commission Earned and View LedgerURl for portal operationId: getAffiliateCommissionTotal parameters: - name: affiliate_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AffiliateCommissionEarned' /rest/v2/affiliates/summaries: get: tags: - Affiliate summary: List Affiliate Summaries description: Retrieves a list of Affiliate Summaries operationId: listSummaries parameters: - name: filter in: query description: "Filter to apply, allowed fields are:\n- (List[String]) `affiliate_ids`\n- (String)\ \ `since_time`\n- (String) `until_time`\n\nYou will need to apply the `==` operator to check\ \ the equality of one of the filters with your searched\n word, in the encoded form `%3D%3D`.\ \ For the filters listed above, here are some examples:\n - `filter=since_time%3D%3D2024-09-17T-15:50+00`\n\ \ - `filter=until_time%3D%3D2024-09-17T-15:50+00`\n - `filter=affiliate_ids%3D%3D123,456,789`\n" required: false schema: type: string - name: page_token in: query description: Page token required: false schema: type: string - name: order_by in: query description: 'Attribute and direction to order items. One of the following fields: - `affiliate_id` - `amount_earned` - `balance` - `clawbacks` One of the following directions: - `asc` - `desc`' required: false schema: type: string - name: page_size in: query description: Total number of items to return per page required: false schema: type: integer format: int32 maximum: 1000 minimum: 0 example: 0 responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListAffiliateSummariesResponse' /rest/v2/affiliates/model: get: tags: - Affiliate summary: Retrieve Affiliate Model description: Get the custom fields and optional properties for the Affiliate object operationId: getAffiliateCustomFields responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ObjectModel' /rest/v2/affiliates/commissionPrograms/{commission_program_id}/resources: get: tags: - Affiliate summary: Retrieve Commission Program Resources description: Retrieves resources for a commission program operationId: listCommissionProgramResources parameters: - name: commission_program_id in: path required: true schema: type: string responses: '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' '501': description: Method Not Implemented content: application/json: schema: $ref: '#/components/schemas/Error' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/Error' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ListProgramResourcesResponse' components: schemas: AffiliateAddToProgramRequest: type: object properties: affiliate_program_id: type: string AffiliateCommission: type: object properties: description: type: string description: Description of the product or line item associated with this commission example: Commission for product sale amount_earned: type: number format: double description: Amount earned for this commission example: 25.0 contact_first_name: type: string description: First name of the contact associated with this commission example: John contact_last_name: type: string description: Last name of the contact associated with this commission example: Doe invoice_id: type: string description: ID of the invoice associated with this commission example: 1001 time_earned: type: string description: When the commission was earned. In ISO-8601 format example: '2024-06-15T14:30:00Z' contact_id: type: string description: ID of the contact associated with this commission example: 1001 sales_affiliate_id: type: string description: ID of the sales affiliate example: 123 sales_affiliate_name: type: string description: The name of the sales affiliate example: Jane Smith product_name: type: string description: Name of the product or line item associated with this commission example: Premium Membership AffiliateCommissionEarned: type: object properties: affiliate_commission_total: type: number format: double description: Total commission earned by affiliate example: 1250.5 view_ledger_url: type: string description: URL to view affiliate ledger example: https://app.thryv.com/affiliate/ledger?affiliateId=123 AffiliateCommissionProgramResponse: type: object properties: id: type: string description: Commission program ID example: 100 name: type: string description: Program name example: Gold Partner Program notes: type: string description: Program notes example: 20% commission on all sales priority: type: integer format: int32 description: Program priority example: 1 AffiliateLink: type: object properties: id: type: string description: Affiliate link ID example: 789 name: type: string description: Link name example: Fitness Program code: type: string description: URL code for tracking example: fP100 affiliate_id: type: string description: Associated affiliate ID example: 123 local_url_code: type: string deprecated: true description: 'URL code for tracking. Deprecated: use ''code'' instead.' example: fP100 redirect_url: type: string deprecated: true description: Destination URL. This field is deprecated. Use 'website_address' instead. example: https://thryv.com/fitness website_address: type: string description: Destination URL example: https://thryv.com/fitness program_ids: type: array description: Associated program IDs example: - '1' - '2' items: type: string date_created: type: string description: Date link was created (ISO-8601) example: '2024-03-15T10:30:00Z' AffiliateProgramResource: type: object properties: id: type: string description: The program resource identifier example: 101 title: type: string description: The program resource title example: Summer Sale Banner type: type: string description: The type of resource enum: - EMAIL - BANNER - PAGE example: BANNER notes: type: string description: The resource notes. example: Use this banner for summer promotions url: type: string description: The URL to the resource. example: https://thryv.com/banners/summer-sale.jpg order: type: integer format: int32 description: The order which the resource to be displayed. Minimum value is 0. Lower values indicate higher priority. example: 1 content_html: type: string description: The contents of the PAGE or EMAIL. In HTML format. example:
Get 20% off!
page_width: type: integer format: int32 description: The width of the page for PAGE types, in pixels. example: 728 page_height: type: integer format: int32 description: The height of the page for PAGE types, in pixels. example: 90 commission_programs: type: array description: A list of commission programs using this resource. items: $ref: '#/components/schemas/ResourceCommissionProgram' AffiliateProgramV2: type: object properties: id: type: string description: Commission program ID example: 1 name: type: string description: The affiliate commission program name example: commission program priority: type: string description: The Affiliate commission program priority example: 0 notes: type: string description: The affiliate commission program notes example: notes for the commission program create_time: type: string description: The created time of affiliate commission program example: '2019-08-24T14:15:22Z' affiliate_ids: type: array description: The list of affiliate_ids using this commission program example: - 123 - 124 items: type: string AffiliateRemoveFromProgramRequest: type: object properties: affiliate_program_id: type: string AffiliateSummaryRecord: type: object properties: affiliateId: type: integer format: int64 clawbacks: type: number format: double balance: type: number format: double amountEarned: type: number format: double CommissionItem: type: object properties: sale_percent: type: number format: double description: The percentage to be paid for Sale. example: 10.5 sale_amount: type: number format: double description: The fixed dollar amount to be paid for Sale. example: 25.0 lead_percent: type: number format: double description: The percentage to be paid for Lead. example: 10.5 lead_amount: type: number format: double description: The fixed dollar amount to be paid for Lead. example: 25.0 CommissionItemRequest: type: object properties: sale_percent: type: string description: The percentage to be paid for Sale. example: 10.5 sale_amount: type: string description: The fixed dollar amount to be paid for Sale. example: 25.0 lead_percent: type: string description: The percentage to be paid for Lead. example: 10.5 lead_amount: type: string description: The fixed dollar amount to be paid for Lead. example: 25.0 CreateAffiliateRequest: type: object properties: code: type: string description: 'The Affiliate code which have some validations. 1. The code should not have white spaces 2. The code should starts with letters 3. The code minimum 4 characters length' example: M123 status: type: string default: INACTIVE description: The Affiliate Status enum: - ACTIVE - INACTIVE example: ACTIVE name: type: string description: 'The Affiliate name will be derived from the Contact, when not explicitly provided' example: John Smith contact_id: type: string description: The contactId identifier , Must be a positive number example: 1 parent_affiliate_id: type: string description: The Parent Affiliate Id example: 0 notify_on_sale: type: boolean description: Whether to notify on sale events example: true notify_on_lead: type: boolean description: Whether to notify on lead events example: true track_leads_days: type: integer format: int32 description: Number of days to track leads example: 30 password: type: string description: Affiliate portal password custom_fields: type: array description: List of custom field values to apply to this affiliate example: - id: '1' content: VIP - id: '2' content: Preferred items: $ref: '#/components/schemas/CustomFieldValue' required: - code - contact_id CreateCommissionProgramRequest: type: object properties: name: type: string description: The name of the Commission Program example: Fitness program notes: type: string description: The notes of the Commission Program example: 20% default commission priority: type: integer format: int32 description: The priority of the Commission Program example: 1 required: - name - priority CreateCustomFieldGroupRequest: type: object properties: name: type: string tab_id: type: string CreateCustomFieldOptionRequest: type: object properties: label: type: string CreateCustomFieldRequest: type: object properties: label: type: string options: type: array items: $ref: '#/components/schemas/CreateCustomFieldOptionRequest' field_type: type: string enum: - CURRENCY - DATE - DATE_TIME - DAY_OF_WEEK - DECIMAL_NUMBER - DRILLDOWN - DROPDOWN - EMAIL - LIST_BOX - MONTH - NAME - PERCENT - PHONE_NUMBER - RADIO - SOCIAL_SECURITY_NUMBER - STATE - TEXT - TEXT_AREA - USER - USER_LIST_BOX - WEBSITE - WHOLE_NUMBER - YEAR - YES_NO group_id: type: string description: An optional tab group to place the field under in the interface. If not specified, will default to the 'Custom Fields' tab. user_group_id: type: string description: An optional user group to choose from when selecting values for User or UserListBox fields. required: - field_type - label CreateCustomFieldTabRequest: type: object properties: name: type: string CreateDefaultCommissionProgramRequest: type: object properties: percentage: type: string deprecated: true description: Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1` example: 10.5 unused: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for any unused commissions. dollar_amount: type: string deprecated: true description: Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1` example: 25.0 level_1: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 1 recipients of the commission. level_2: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 2 recipients of the commission. payout_type: type: string default: UPFRONT description: The payout type for this commission. enum: - UPFRONT - PAYMENT_RECEIVED example: UPFRONT CreateOrUpdateAffiliateLinkRequest: type: object properties: name: type: string description: The Affiliate Link Name example: Fitness Program code: type: string description: Code example: fP100 affiliate_id: type: string description: The AffiliateId example: 1 website_address: type: string description: Website Address example: https://thryv.com/promo program_ids: type: array description: Program IDs to associate example: - '1' - '2' items: type: string required: - code - name - website_address CreateProductCommissionProgramRequest: type: object properties: percentage: type: string deprecated: true description: Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1` example: 10.5 unused: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for any unused commissions. dollar_amount: type: string deprecated: true description: Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1` example: 25.0 level_1: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 1 recipients of the commission. level_2: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 2 recipients of the commission. payout_type: type: string default: UPFRONT description: The payout type for this commission. enum: - UPFRONT - PAYMENT_RECEIVED example: UPFRONT product_id: type: string description: Product ID to assign commission example: 123 CreateProgramResourceRequest: type: object properties: title: type: string description: The program resource title example: Summer Sale Banner type: type: string description: The type of resource enum: - EMAIL - BANNER - PAGE example: BANNER notes: type: string description: The resource notes. example: Use this banner for summer promotions url: type: string description: The URL to the resource. example: https://thryv.com/banners/summer-sale.jpg order: type: integer format: int32 description: The order in which the resource is displayed. Minimum value is 0. Defaults to 0. Lower values indicate higher priority. example: 1 content_html: type: string description: The contents of the PAGE or EMAIL. In HTML format. example:Get 20% off!
page_width: type: integer format: int32 description: The width of the page for PAGE types, in pixels. Minimum value is 0. Defaults to 0 example: 728 page_height: type: integer format: int32 description: The height of the page for PAGE types, in pixels. Minimum value is 0. Defaults to 0 example: 90 commission_program_ids: type: array description: A list of commission program ids that will use this resource. example: - '123' - '456' items: type: string required: - commission_program_ids - title - type CreateSubscriptionCommissionProgramRequest: type: object properties: percentage: type: string deprecated: true description: Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1` example: 10.5 unused: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for any unused commissions. dollar_amount: type: string deprecated: true description: Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1` example: 25.0 level_1: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 1 recipients of the commission. level_2: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 2 recipients of the commission. payout_type: type: string default: UPFRONT description: The payout type for this commission. enum: - UPFRONT - PAYMENT_RECEIVED example: UPFRONT subscription_id: type: string description: Subscription ID to assign commission example: 456 CustomFieldGroup: type: object properties: id: type: string name: type: string order: type: integer format: int32 tab_id: type: string record_type: type: string enum: - CONTACT - REFERRAL_PARTNER - OPPORTUNITY - TASK_NOTE_APPOINTMENT - COMPANY - ORDER - SUBSCRIPTION CustomFieldMetaData: type: object description: Metadata describing a custom field, including its type and options properties: id: type: string description: The unique identifier of the custom field example: 123 label: type: string description: The display label of the custom field example: Favorite Color options: type: array description: The list of available options for select/radio/multiselect/drilldown field types items: $ref: '#/components/schemas/CustomFieldOption' record_type: type: string description: The entity type this custom field belongs to (e.g. CONTACT, COMPANY) enum: - CONTACT - REFERRAL_PARTNER - OPPORTUNITY - TASK_NOTE_APPOINTMENT - COMPANY - ORDER - SUBSCRIPTION field_type: type: string description: The data type of the custom field (e.g. Text, Number, Date, Select) enum: - CURRENCY - DATE - DATE_TIME - DAY_OF_WEEK - DECIMAL_NUMBER - DRILLDOWN - DROPDOWN - EMAIL - LIST_BOX - MONTH - NAME - PERCENT - PHONE_NUMBER - RADIO - SOCIAL_SECURITY_NUMBER - STATE - TEXT - TEXT_AREA - USER - USER_LIST_BOX - WEBSITE - WHOLE_NUMBER - YEAR - YES_NO default_value: type: string description: The default value for this custom field, if any group_id: type: string description: The ID of the group this custom field belongs to example: 45 group_name: type: string description: The name of the group this custom field belongs to example: Personal Info field_name: type: string description: The database column name for this custom field. Use this value when filtering contacts (e.g. for field_name 'firstName1', filter with 'firstName1==John'). example: firstName1 CustomFieldOption: type: object properties: id: type: string label: type: string CustomFieldTab: type: object properties: id: type: string description: The unique identifier of the custom field tab example: 123 name: type: string description: The name of the custom field tab example: Personal Info order: type: integer format: int32 description: The display order of the tab example: 1 record_type: type: string description: The record type this tab belongs to (e.g., CONTACT, COMPANY, OPPORTUNITY, REFERRAL_PARTNER, ORDER, SUBSCRIPTION, TASK_NOTE_APPOINTMENT) enum: - CONTACT - REFERRAL_PARTNER - OPPORTUNITY - TASK_NOTE_APPOINTMENT - COMPANY - ORDER - SUBSCRIPTION example: CONTACT CustomFieldValue: type: object properties: id: type: string content: description: The value of the custom field. Text custom field values have a maximum length of 65535 characters. DefaultCommission: type: object properties: payout_type: type: string default: UPFRONT description: The payout type for this commission. enum: - UPFRONT - PAYMENT_RECEIVED example: UPFRONT dollar_amount: type: number format: double description: Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1` example: 10.5 percentage: type: number format: double description: Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1` example: 25.0 unused: $ref: '#/components/schemas/CommissionItem' description: Payout rules for any unused commissions. level_1: $ref: '#/components/schemas/CommissionItem' description: Payout rules for Level 1 recipients of the commission. level_2: $ref: '#/components/schemas/CommissionItem' description: Payout rules for Level 2 recipients of the commission. DeleteProgramCommissionRequest: type: object properties: product_id: type: string DeleteSubscriptionPlanCommissionRequest: type: object properties: product_id: type: string subscription_plan_id: type: string Error: type: object properties: code: type: integer format: int32 message: type: string status: type: string details: type: array items: $ref: '#/components/schemas/ErrorDetails' ErrorDetails: type: object properties: domain: type: string resource: type: string GetRestCommissionProgram: type: object properties: id: type: string description: Commission program ID example: 1 name: type: string description: The affiliate commission program name example: commission program priority: type: string description: The Affiliate commission program priority example: 0 notes: type: string description: The affiliate commission program notes example: notes for the commission program create_time: type: string description: The created time of affiliate commission program example: '2019-08-24T14:15:22Z' affiliate_ids: type: array description: The list of affiliate_ids using this commission program example: - 123 - 124 items: type: string default_commission: $ref: '#/components/schemas/DefaultCommission' product_commissions: type: array items: $ref: '#/components/schemas/ProductCommission' subscription_commissions: type: array items: $ref: '#/components/schemas/SubscriptionCommission' ListAffiliateCommissionProgramsResponse: type: object properties: commission_programs: type: array items: $ref: '#/components/schemas/AffiliateProgramV2' next_page_token: type: string ListAffiliateCommissionsResponse: type: object properties: affiliate_commissions: type: array description: List of commissions for this affiliate items: $ref: '#/components/schemas/AffiliateCommission' next_page_token: type: string clawbacks: type: number format: double description: 'Calculated total amount of clawbacks from the returned commissions. ' example: 50.0 commission_total: type: number format: double description: Calculated total commission amount (amount earned - amount clawbacks) from the returned commissions example: 150.0 amount_earned: type: number format: double description: Calculated total amount earned from the returned commissions. example: 200.0 ListAffiliateLinksResponse: type: object properties: affiliate_links: type: array items: $ref: '#/components/schemas/AffiliateLink' next_page_token: type: string ListAffiliatePaymentsResponse: type: object properties: affiliate_payments: type: array items: $ref: '#/components/schemas/RestAffiliatePayment' next_page_token: type: string ListAffiliateReferralsResponse: type: object properties: referrals: type: array items: $ref: '#/components/schemas/Referral' next_page_token: type: string ListAffiliateSummariesResponse: type: object properties: affiliate_summaries: type: array items: $ref: '#/components/schemas/AffiliateSummaryRecord' next_page_token: type: string ListAffiliatesResponse: type: object properties: affiliates: type: array items: $ref: '#/components/schemas/RestAffiliate' next_page_token: type: string ListCustomFieldGroupsResponse: type: object properties: groups: type: array items: $ref: '#/components/schemas/CustomFieldGroup' ListCustomFieldTabsResponse: type: object properties: tabs: type: array items: $ref: '#/components/schemas/CustomFieldTab' ListProgramResourcesResponse: type: object properties: resources: type: array items: $ref: '#/components/schemas/AffiliateProgramResource' next_page_token: type: string ObjectModel: type: object properties: custom_fields: type: array items: $ref: '#/components/schemas/CustomFieldMetaData' optional_properties: type: array description: These fields are not transmitted by default on this model, but can be requested by specifying them in a comma-separated list in the optional_properties query parameter. items: type: string uniqueItems: true ProductCommission: type: object properties: payout_type: type: string default: UPFRONT description: The payout type for this commission. enum: - UPFRONT - PAYMENT_RECEIVED example: UPFRONT dollar_amount: type: number format: double description: Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1` example: 10.5 percentage: type: number format: double description: Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1` example: 25.0 unused: $ref: '#/components/schemas/CommissionItem' description: Payout rules for any unused commissions. level_1: $ref: '#/components/schemas/CommissionItem' description: Payout rules for Level 1 recipients of the commission. level_2: $ref: '#/components/schemas/CommissionItem' description: Payout rules for Level 2 recipients of the commission. product_id: type: string description: Product ID example: 123 product_name: type: string description: Product name example: Premium Membership product_price: type: number format: double description: Product price example: 99.99 Referral: type: object properties: id: type: string description: The unique identifier for this referral. example: 555 description: type: string description: The referral description. example: Referred via email campaign source: type: string description: The source for the referral. example: Email Marketing contact_id: type: string description: The referral's contact_id. example: 1001 referral_partner_id: type: string description: The referring affiliate ID. example: 123 referral_time: type: string format: date-time description: The time of the referral. example: '2024-05-21T23:00:00Z' expiration_time: type: string format: date-time description: The time when the referral expires. example: '2024-08-21T23:00:00Z' ip_address: type: string description: The IP address of the referral. example: 192.168.1.100 referral_type: type: string description: The referral type. enum: - COOKIE - MANUAL - PERMANENT example: COOKIE ResourceCommissionProgram: type: object properties: commission_program_id: type: string description: The commission program identifier example: 100 RestAffiliate: type: object properties: id: type: string description: The AffiliateId example: 1 code: type: string description: The Affiliate Code example: M123 name: type: string description: The Affiliate Name example: John Smith status: type: string description: The Affiliate Status enum: - ACTIVE - INACTIVE example: ACTIVE contact_id: type: string description: The ContactID example: 1 unique_site_id: type: string description: The Affiliate PortalSite Id example: 123456 date_created: type: string description: Date affiliate was created (ISO-8601) example: '2024-03-15T10:30:00Z' parent_affiliate_id: type: string description: The Parent Affiliate Id example: 0 notify_on_sale: type: boolean description: Whether to notify on sale events example: true notify_on_lead: type: boolean description: Whether to notify on lead events example: true track_leads_days: type: integer format: int32 description: Number of days to track leads example: 30 custom_fields: type: array description: List of custom field values applied to this affiliate example: - id: '1' content: VIP - id: '2' content: Preferred items: $ref: '#/components/schemas/CustomFieldValue' RestAffiliatePayment: type: object properties: id: type: string description: Payment ID example: 789 pay_date: type: string description: Payment date (ISO-8601) example: '2024-03-15T10:30:00Z' pay_notes: type: string description: Payment notes example: Monthly commission payout pay_amount: type: number format: double description: Payment amount example: 250.0 pay_type: type: string description: Payment type enum: - CASH - CHECK - CREDIT_CARD - CREDIT_CARD_MANUAL - MONEY_ORDER - ADJUSTMENT - CREDIT - REFUND example: CHECK create_time: type: string description: Record creation time (ISO-8601) example: '2024-03-15T10:30:00Z' SubscriptionCommission: type: object properties: payout_type: type: string default: UPFRONT description: The payout type for this commission. enum: - UPFRONT - PAYMENT_RECEIVED example: UPFRONT dollar_amount: type: number format: double description: Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1` example: 10.5 percentage: type: number format: double description: Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1` example: 25.0 unused: $ref: '#/components/schemas/CommissionItem' description: Payout rules for any unused commissions. level_1: $ref: '#/components/schemas/CommissionItem' description: Payout rules for Level 1 recipients of the commission. level_2: $ref: '#/components/schemas/CommissionItem' description: Payout rules for Level 2 recipients of the commission. name: type: string description: Subscription name example: Monthly Pro Plan subscription_id: type: string description: Subscription ID example: 456 plan_price: type: number format: double description: Plan price example: 49.99 UpdateAffiliateRequest: type: object properties: code: type: string description: 'The Affiliate code which have some validations. 1. The code should not have white spaces 2. The code should starts with letters 3. The code minimum 2 characters length' example: M123 name: type: string description: The Affiliate name. example: John Smith status: type: string description: The Affiliate Status enum: - ACTIVE - INACTIVE example: ACTIVE contact_id: type: string description: The contactId identifier. Must be a positive number example: 1 parent_affiliate_id: type: string description: The Parent Affiliate Id example: 0 notify_on_sale: type: boolean description: Whether to notify on sale events example: true notify_on_lead: type: boolean description: Whether to notify on lead events example: true track_leads_days: type: integer format: int32 description: Number of days to track leads example: 30 password: type: string description: Affiliate portal password. custom_fields: type: array description: List of custom field values to apply to this affiliate example: - id: '1' content: VIP - id: '2' content: Preferred items: $ref: '#/components/schemas/CustomFieldValue' UpdateCommissionProgramRequest: type: object properties: name: type: string description: The name of the Commission Program example: Fitness program notes: type: string description: The notes of the Commission Program example: 20% default commission priority: type: integer format: int32 description: The priority of the Commission Program example: 1 UpdateCustomFieldGroupRequest: type: object properties: name: type: string order: type: integer format: int32 tab_id: type: string UpdateCustomFieldMetaDataRequest: type: object properties: label: type: string options: type: array items: $ref: '#/components/schemas/CustomFieldOption' group_id: type: string required: - group_id UpdateCustomFieldTabRequest: type: object properties: name: type: string order: type: integer format: int32 UpdateDefaultCommissionProgramRequest: type: object properties: percentage: type: string deprecated: true description: Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1` example: 10.5 unused: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for any unused commissions. dollar_amount: type: string deprecated: true description: Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1` example: 25.0 level_1: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 1 recipients of the commission. level_2: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 2 recipients of the commission. payout_type: type: string default: UPFRONT description: The payout type for this commission. enum: - UPFRONT - PAYMENT_RECEIVED example: UPFRONT UpdateProductCommissionProgramRequest: type: object properties: percentage: type: string deprecated: true description: Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1` example: 10.5 unused: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for any unused commissions. dollar_amount: type: string deprecated: true description: Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1` example: 25.0 level_1: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 1 recipients of the commission. level_2: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 2 recipients of the commission. payout_type: type: string default: UPFRONT description: The payout type for this commission. enum: - UPFRONT - PAYMENT_RECEIVED example: UPFRONT product_id: type: string description: Product ID to assign commission example: 123 required: - product_id UpdateProgramResourceRequest: type: object properties: title: type: string description: The program resource title example: Summer Sale Banner notes: type: string description: The resource notes. example: Use this banner for summer promotions url: type: string description: The URL to the resource. example: https://thryv.com/banners/summer-sale.jpg order: type: integer format: int32 description: The order in which the resource is displayed. Minimum value is 0. Lower values indicate higher priority. example: 1 content_html: type: string description: The contents of the PAGE or EMAIL. In HTML format. example:Get 20% off!
page_width: type: integer format: int32 description: The width of the page for PAGE types, in pixels. Minimum value is 0. example: 728 page_height: type: integer format: int32 description: The height of the page for PAGE types, in pixels. Minimum value is 0. example: 90 commission_program_ids: type: array description: A list of commission program ids to use this resource. The values in this list will replace the existing list of commission program ids. example: - '123' - '456' items: type: string UpdateSubscriptionCommissionProgramRequest: type: object properties: percentage: type: string deprecated: true description: Level 1 percentage to be paid for commission (0-100). This will be set for the Sale. This is deprecated for `level_1` example: 10.5 unused: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for any unused commissions. dollar_amount: type: string deprecated: true description: Level 1 fixed dollar amount to be paid for commission. This will be set for the Sale. This is deprecated for `level_1` example: 25.0 level_1: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 1 recipients of the commission. level_2: $ref: '#/components/schemas/CommissionItemRequest' description: Payout rules for Level 2 recipients of the commission. payout_type: type: string default: UPFRONT description: The payout type for this commission. enum: - UPFRONT - PAYMENT_RECEIVED example: UPFRONT subscription_id: type: string description: Subscription ID to assign commission example: 456 securitySchemes: oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://accounts.infusionsoft.com/app/oauth/authorize tokenUrl: https://api.infusionsoft.com/token scopes: {} security: - oauth2: []