# Retrieve the program terms

```
GET 
https://api.freemius.com/v1/products/{product_id}/aff/{affiliate_program_id}.json
```

#### Auth:Bearer TokenSCOPE: <!-- -->PRODUCT

Product-scoped API tokens allow you to operate on the product itself. This token usually allows read-only access to the product configuration and write access to several operations on subscriptions, customers, payments, and more. For most SaaS or app integrations, this is the token you will need.

1. Go to the [Freemius Developer Dashboard](https://dashboard.freemius.com/).
2. Open the Settings page of the relevant product.
3. Click the API & Keys tab.
4. Copy the API Bearer Authorization Token from the UI.

***

Retrieve a specific product affiliation program terms details.

## Request[​](#request "Direct link to request")

### Path Parameters

* **product\_id**
  <!-- -->
  integer\<int64>[](#param-property-affiliates-retrieve-program-terms-param-path-product-id "Direct link to product_id")required

  The ID of the product.

  **Possible values:** `>= 1`

  **Example:<!-- -->&#x20;**`1234`

  **affiliate\_program\_id**
  <!-- -->
  integer\<int64>[](#param-property-affiliates-retrieve-program-terms-param-path-affiliate-program-id "Direct link to affiliate_program_id")required

  The ID of the affiliate program.

  **Possible values:** `>= 1`

  **Example:<!-- -->&#x20;**`1234`

<!-- -->

## Responses[​](#responses "Direct link to Responses")

* 200
* 400
* 401
* 402
* 404

The retrieved affiliate program.

application/json

**Schema**

**id**string\<int64>[](#schema-property-affiliates-retrieve-program-terms-response-schema-id-string-int64 "Direct link to id")

The unique identifier of the entity.

**Possible values:** `>= 1`

**Example:<!-- -->&#x20;**`123456`

**created**string\<date-time>[](#schema-property-affiliates-retrieve-program-terms-response-schema-created-string-date-time "Direct link to created")

The date and time the entity was created, under UTC timezone.

**Example:<!-- -->&#x20;**`2025-01-01 00:00:00`

**updated**string\<date-time>[](#schema-property-affiliates-retrieve-program-terms-response-schema-updated-string-date-time "Direct link to updated")nullable

The date and time the entity was updated, under UTC timezone. If `null` then the entity was never updated since its creation.

**Example:<!-- -->&#x20;**`2025-01-01 00:00:00`

**is\_active**boolean\<boolean>[](#schema-property-affiliates-retrieve-program-terms-response-schema-is-active-boolean-boolean "Direct link to is_active")

Whether the affiliation program is active and can be used.

**type**string\<string>[](#schema-property-affiliates-retrieve-program-terms-response-schema-type-string-string "Direct link to type")

**Default value:<!-- -->&#x20;**`affiliation`

The type of the affiliation program.

**Possible values:** \[`affiliation`, `rewards`]

**reward\_type**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-reward-type-string "Direct link to reward_type")

**Default value:<!-- -->&#x20;**`payout`

The reward type of the affiliation program.

**Possible values:** \[`payout`, `credit`]

**referral\_attribution**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-referral-attribution-string "Direct link to referral_attribution")

**Default value:<!-- -->&#x20;**`first`

The attribution type of the referral. For `first`, the referral will be attributed to the first visited source containing the affiliation link that was clicked.

**Possible values:** \[`first`, `last`]

**cookie\_days**integer\<int64>[](#schema-property-affiliates-retrieve-program-terms-response-schema-cookie-days-integer-int64 "Direct link to cookie_days")nullable

**Default value:<!-- -->&#x20;**`30`

The number of days the referral cookie is valid. `0` for session cookie, and `null` for non-expiring cookie (until cookies are cleaned).

**Possible values:** `>= 0`

**Example:<!-- -->&#x20;**`0`

**commission**integer\<int64>[](#schema-property-affiliates-retrieve-program-terms-response-schema-commission-integer-int64 "Direct link to commission")

**Default value:<!-- -->&#x20;**`20`

The commission amount.

**Possible values:** `>= 0`

**Example:<!-- -->&#x20;**`20`

**commission\_type**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-commission-type-string "Direct link to commission_type")

**Default value:<!-- -->&#x20;**`percentage`

The commission type of the affiliation program.

**Possible values:** \[`percentage`, `dollar`]

**commission\_renewals\_days**integer\<int64>[](#schema-property-affiliates-retrieve-program-terms-response-schema-commission-renewals-days-integer-int64 "Direct link to commission_renewals_days")nullable

**Default value:<!-- -->&#x20;**`0`

The number of days the affiliate will get paid for all renewals after the initial upgrade/purchase. `0` for only the first payment, and `null` for all renewals. For greater than `0`, affiliate will get paid for all renewals x `commission_renewals_days` days after the initial upgrade/purchase.

**Possible values:** `>= 0`

**Example:<!-- -->&#x20;**`0`

**install\_commission**integer\<int64>[](#schema-property-affiliates-retrieve-program-terms-response-schema-install-commission-integer-int64 "Direct link to install_commission")nullable

**Default value:<!-- -->&#x20;**`null`

The commission amount for the initial installation.

**Possible values:** `>= 0`

**Example:<!-- -->&#x20;**`100`

**default\_url**string\<string>[](#schema-property-affiliates-retrieve-program-terms-response-schema-default-url-string-string "Direct link to default_url")

The default checkout link of the product.

**Example:<!-- -->&#x20;**`https://checkout.freemius.com/product/12196`

**reward\_customer\_type**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-reward-customer-type-string "Direct link to reward_customer_type")

**Default value:<!-- -->&#x20;**`all`

The type of customer to get the referral commission.

**Possible values:** \[`new_user`, `new_customer`, `all`]

**future\_payments\_days**integer\<int64>[](#schema-property-affiliates-retrieve-program-terms-response-schema-future-payments-days-integer-int64 "Direct link to future_payments_days")nullable

**Default value:<!-- -->&#x20;**`0`

The number of days an affiliate will get paid for all customer payments after the initial payment. `0` for only on directly affiliated links, and `null` for all customers' lifetime payments.

**Possible values:** `>= 0`

**Example:<!-- -->&#x20;**`0`

**is\_social\_allowed**boolean\<boolean>[](#schema-property-affiliates-retrieve-program-terms-response-schema-is-social-allowed-boolean-boolean "Direct link to is_social_allowed")

Whether to allow referrals from social sites.

**Example:<!-- -->&#x20;**`true`

**is\_app\_allowed**boolean\<boolean>[](#schema-property-affiliates-retrieve-program-terms-response-schema-is-app-allowed-boolean-boolean "Direct link to is_app_allowed")

Whether to allow conversions without HTTP referrer header at all.

**Example:<!-- -->&#x20;**`true`

**is\_any\_site\_allowed**boolean\<boolean>[](#schema-property-affiliates-retrieve-program-terms-response-schema-is-any-site-allowed-boolean-boolean "Direct link to is_any_site_allowed")

Whether to allow referrals from any site.

**Example:<!-- -->&#x20;**`true`

**is\_hidden**boolean\<boolean>[](#schema-property-affiliates-retrieve-program-terms-response-schema-is-hidden-boolean-boolean "Direct link to is_hidden")

**Default value:<!-- -->&#x20;**`false`

Whether to show the affiliation program only to users who are already affiliates of the product. If `true`, the affiliation program will be hidden from users who are not affiliates of the product.

**commissions** <!-- -->object

The commission rates in all currencies.

**property name\***&#x6E;umber\<int>[](#schema-property-affiliates-retrieve-program-terms-response-schema-property-name-number-int "Direct link to property name*")

**plugin\_affiliate\_terms\_id**string\<int64>[](#schema-property-affiliates-retrieve-program-terms-response-schema-plugin-affiliate-terms-id-string-int64 "Direct link to plugin_affiliate_terms_id")

The unique identifier of the entity.

**Possible values:** `>= 1`

**Example:<!-- -->&#x20;**`123456`

**plugin\_id**string\<int64>[](#schema-property-affiliates-retrieve-program-terms-response-schema-plugin-id-string-int64 "Direct link to plugin_id")

The ID of the product the entity belongs to.

**Possible values:** `>= 1`

**Example:<!-- -->&#x20;**`123456`

**moderation**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-moderation-string "Direct link to moderation")

**Default value:<!-- -->&#x20;**`selected`

Refers to who can be an affiliate.

**Possible values:** \[`selected`, `customers`, `all`]

**pending\_count**integer\<int64>[](#schema-property-affiliates-retrieve-program-terms-response-schema-pending-count-integer-int64 "Direct link to pending_count")

The number of pending affiliate applications that product owners need to review.

**Possible values:** `>= 0`

**Example:<!-- -->&#x20;**`1234`

**status**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-status-string "Direct link to status")nullable

The status of a product user who has applied for the affiliate program.

**plugin\_title**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-plugin-title-string "Direct link to plugin_title")

The title of the product.

**Example:<!-- -->&#x20;**`My Freemius Plugin`

Bad request. The request could not be understood by the server due to malformed syntax or arguments.

application/json

**Schema**

**path**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-path-string "Direct link to path")

The API request path.

**Example:<!-- -->&#x20;**`:/products/product_id/users.json`

**error** <!-- -->object

This object contains the error details.

**type**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-type-string "Direct link to type")

The type of the error encountered by the server.

**Example:<!-- -->&#x20;**`UnauthorizedAccess`

**message**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-message-string "Direct link to message")

The descriptive error message.

**Example:<!-- -->&#x20;**`Some error has occured.`

**code**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-code-string "Direct link to code")

The error code.

**Example:<!-- -->&#x20;**`unauthorized_access`

**http**integer[](#schema-property-affiliates-retrieve-program-terms-response-schema-http-integer "Direct link to http")

The HTTP status code returned by the server.

**Example:<!-- -->&#x20;**`401`

**timestamp**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-timestamp-string "Direct link to timestamp")

Current timestamp.

**Example:<!-- -->&#x20;**`Thu, 11 May 2023 11:45:30 +0000`

**request** <!-- -->object

This object sends back the request payload as received by the server (both from path and from body or query).

**property name\***&#x61;ny[](#schema-property-affiliates-retrieve-program-terms-response-schema-property-name-any "Direct link to property name*")

This object sends back the request payload as received by the server (both from path and from body or query).

**Example:<!-- -->&#x20;**`{"beautify":true,"format":"json"}`

Unauthorized access error. The request requires [authentication](https://freemius.com/help/api/#bearer-token-authentication) but was not provided or the provided authentication does not satisfy the required permissions.

application/json

**Schema**

**path**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-path-string "Direct link to path")

The API request path.

**Example:<!-- -->&#x20;**`:/products/product_id/users.json`

**error** <!-- -->object

This object contains the error details.

**type**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-type-string "Direct link to type")

The type of the error encountered by the server.

**Example:<!-- -->&#x20;**`UnauthorizedAccess`

**message**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-message-string "Direct link to message")

The descriptive error message.

**Example:<!-- -->&#x20;**`Some error has occured.`

**code**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-code-string "Direct link to code")

The error code.

**Example:<!-- -->&#x20;**`unauthorized_access`

**http**integer[](#schema-property-affiliates-retrieve-program-terms-response-schema-http-integer "Direct link to http")

The HTTP status code returned by the server.

**Example:<!-- -->&#x20;**`401`

**timestamp**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-timestamp-string "Direct link to timestamp")

Current timestamp.

**Example:<!-- -->&#x20;**`Thu, 11 May 2023 11:45:30 +0000`

**request** <!-- -->object

This object sends back the request payload as received by the server (both from path and from body or query).

**property name\***&#x61;ny[](#schema-property-affiliates-retrieve-program-terms-response-schema-property-name-any "Direct link to property name*")

This object sends back the request payload as received by the server (both from path and from body or query).

**Example:<!-- -->&#x20;**`{"beautify":true,"format":"json"}`

The request is missing the specified argument.

application/json

**Schema**

**path**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-path-string "Direct link to path")

The API request path.

**Example:<!-- -->&#x20;**`:/products/product_id/users.json`

**error** <!-- -->object

This object contains the error details.

**type**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-type-string "Direct link to type")

The type of the error encountered by the server.

**Example:<!-- -->&#x20;**`UnauthorizedAccess`

**message**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-message-string "Direct link to message")

The descriptive error message.

**Example:<!-- -->&#x20;**`Some error has occured.`

**code**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-code-string "Direct link to code")

The error code.

**Example:<!-- -->&#x20;**`unauthorized_access`

**http**integer[](#schema-property-affiliates-retrieve-program-terms-response-schema-http-integer "Direct link to http")

The HTTP status code returned by the server.

**Example:<!-- -->&#x20;**`401`

**timestamp**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-timestamp-string "Direct link to timestamp")

Current timestamp.

**Example:<!-- -->&#x20;**`Thu, 11 May 2023 11:45:30 +0000`

**request** <!-- -->object

This object sends back the request payload as received by the server (both from path and from body or query).

**property name\***&#x61;ny[](#schema-property-affiliates-retrieve-program-terms-response-schema-property-name-any "Direct link to property name*")

This object sends back the request payload as received by the server (both from path and from body or query).

**Example:<!-- -->&#x20;**`{"beautify":true,"format":"json"}`

The requested resource was not found.

application/json

**Schema**

**path**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-path-string "Direct link to path")

The API request path.

**Example:<!-- -->&#x20;**`:/products/product_id/users.json`

**error** <!-- -->object

This object contains the error details.

**type**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-type-string "Direct link to type")

The type of the error encountered by the server.

**Example:<!-- -->&#x20;**`UnauthorizedAccess`

**message**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-message-string "Direct link to message")

The descriptive error message.

**Example:<!-- -->&#x20;**`Some error has occured.`

**code**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-code-string "Direct link to code")

The error code.

**Example:<!-- -->&#x20;**`unauthorized_access`

**http**integer[](#schema-property-affiliates-retrieve-program-terms-response-schema-http-integer "Direct link to http")

The HTTP status code returned by the server.

**Example:<!-- -->&#x20;**`401`

**timestamp**string[](#schema-property-affiliates-retrieve-program-terms-response-schema-timestamp-string "Direct link to timestamp")

Current timestamp.

**Example:<!-- -->&#x20;**`Thu, 11 May 2023 11:45:30 +0000`

**request** <!-- -->object

This object sends back the request payload as received by the server (both from path and from body or query).

**property name\***&#x61;ny[](#schema-property-affiliates-retrieve-program-terms-response-schema-property-name-any "Direct link to property name*")

This object sends back the request payload as received by the server (both from path and from body or query).

**Example:<!-- -->&#x20;**`{"beautify":true,"format":"json"}`
