> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/api-reference/reference/affiliates.md).

# Affiliates

## Get Affiliate

> Use this endpoint to extract details about an affiliate by code.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/affiliates/{AffiliateCode}":{"get":{"tags":["Affiliates"],"summary":"Get Affiliate","description":"Use this endpoint to extract details about an affiliate by code.","parameters":[{"name":"AffiliateCode","in":"path","description":"Unique code which represents an affiliate","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get affiliate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200_1"}}}}}}}},"components":{"schemas":{"inline_response_200_1":{"properties":{"Affiliate":{"$ref":"#/components/schemas/AffiliateResponse"}}},"AffiliateResponse":{"type":"object","properties":{"AffiliateCode":{"type":"string"},"Status":{"type":"string"},"Affiliate Name":{"type":"string"},"Website":{"type":"string"},"CommissionList":{"$ref":"#/components/schemas/AffiliateResponse_CommissionList"},"RequestDate":{"type":"string"},"Categories":{"type":"array","items":{"type":"string"}},"TCStatus":{"type":"string"},"AffiliateContact":{"$ref":"#/components/schemas/AffiliateResponse_AffiliateContact"}}},"AffiliateResponse_CommissionList":{"type":"object","properties":{"Object":{"$ref":"#/components/schemas/CommissionList"}}},"CommissionList":{"type":"object","properties":{"ListName":{"type":"string"},"CommissionRate":{"type":"string"}}},"AffiliateResponse_AffiliateContact":{"type":"object","properties":{"Object":{"$ref":"#/components/schemas/AffiliateContact"}}},"AffiliateContact":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Phone":{"type":"string"},"Email":{"type":"string"},"Country":{"type":"string"}}}}}}
```

## Search Affiliates

> Use this endpoint to find out details about one or more affiliates.

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/affiliates":{"get":{"tags":["Affiliates"],"summary":"Search Affiliates","description":"Use this endpoint to find out details about one or more affiliates.","parameters":[{"name":"AffiliateCode","in":"query","description":"Affiliate's code","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"Name","in":"query","description":"Affiliate's name","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"Status","in":"query","description":"Affiliate's status","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"RequestDateStart","in":"query","description":"Affiliate Request date start","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"RequestDateEnd","in":"query","description":"Affiliate Request date end","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"Country","in":"query","description":"Affiliate's country","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"TargetCountry","in":"query","description":"Countries where affiliates sell into","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"CommissionList","in":"query","description":"Affiliate commission list","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"Type","in":"query","description":"Affiliate type","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"Page","in":"query","description":"Page number","required":false,"style":"form","explode":true,"schema":{"type":"number"}},{"name":"Limit","in":"query","description":"Number of results on a page","required":false,"style":"form","explode":true,"schema":{"type":"number"}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}}],"responses":{"200":{"description":"Get affiliates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200_2"}}}},"400":{"description":"Invalid data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchAffiliatesError"}}}}}}}},"components":{"schemas":{"inline_response_200_2":{"properties":{"Affiliates":{"$ref":"#/components/schemas/inline_response_200_2_Affiliates"},"Pagination":{"$ref":"#/components/schemas/Pagination"}}},"inline_response_200_2_Affiliates":{"type":"object","properties":{"0":{"$ref":"#/components/schemas/AffiliateResponse"},"1":{"$ref":"#/components/schemas/AffiliateResponse"}}},"AffiliateResponse":{"type":"object","properties":{"AffiliateCode":{"type":"string"},"Status":{"type":"string"},"Affiliate Name":{"type":"string"},"Website":{"type":"string"},"CommissionList":{"$ref":"#/components/schemas/AffiliateResponse_CommissionList"},"RequestDate":{"type":"string"},"Categories":{"type":"array","items":{"type":"string"}},"TCStatus":{"type":"string"},"AffiliateContact":{"$ref":"#/components/schemas/AffiliateResponse_AffiliateContact"}}},"AffiliateResponse_CommissionList":{"type":"object","properties":{"Object":{"$ref":"#/components/schemas/CommissionList"}}},"CommissionList":{"type":"object","properties":{"ListName":{"type":"string"},"CommissionRate":{"type":"string"}}},"AffiliateResponse_AffiliateContact":{"type":"object","properties":{"Object":{"$ref":"#/components/schemas/AffiliateContact"}}},"AffiliateContact":{"type":"object","properties":{"FirstName":{"type":"string"},"LastName":{"type":"string"},"Phone":{"type":"string"},"Email":{"type":"string"},"Country":{"type":"string"}}},"Pagination":{"type":"object","properties":{"Page":{"type":"integer","description":"Number of pages used for displaying the results."},"Limit":{"type":"integer","description":"Limitation of the result numbers."},"Count":{"type":"integer","description":"Total number of results."}}},"SearchAffiliatesError":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/api-reference/reference/affiliates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
