# Retrieve affiliate

## Request

| Method | URL                                              |
| ------ | ------------------------------------------------ |
| `GET`  | `https://api.getrewardful.com/v1/affiliates/:id` |

### Example

```bash
curl https://api.getrewardful.com/v1/affiliates/d0ed8392-8880-4f39-8715-60230f9eceab \
  -u YOUR_API_SECRET:
```

## Response

{% tabs %}
{% tab title="Success" %}

| Response code | Body                                                                                      |
| ------------- | ----------------------------------------------------------------------------------------- |
| `200`         | An [affiliate object](https://developers.rewardful.com/rest-api/affiliates/object) (JSON) |
| {% endtab %}  |                                                                                           |

{% tab title="Failures" %}

### Not found

| Response code | Body                              |
| ------------- | --------------------------------- |
| `404`         | JSON object describing the error. |

```javascript
{  "error": "Affiliate not found: " }
```

### Authentication failure

| Response code | Body                                       |
| ------------- | ------------------------------------------ |
| `401`         | Description of the authentication failure. |

```javascript
{  "error": "Invalid API Secret." }
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.rewardful.com/rest-api/affiliates/retrieve.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
