# Requests

Data sent must be properly [UTF-8](https://en.wikipedia.org/wiki/UTF-8) URL-encoded. By default, browsers will properly encode `POST` calls. However, if you are writing your own client, you will need to make sure to set the `HTTP Content-Type header` to `application/x-www-form-urlencoded` if you are [form-encoding](https://en.wikipedia.org/wiki/POST_\(HTTP\)#Use_for_submitting_web_forms) your request bodies or `application/json` if you are [JSON-encoding](http://www.json.org/) your request bodies. If you are uploading a file as part of your request, you will need to specify `multipart/form-data`.

In some cases, clients do not support `PUT` and `DELETE` methods. In these cases, you can override the actual `HTTP` method by appending the `_method` parameter via a `POST` request. Valid values are `PUT` and `DELETE`.

Unless otherwise stated, request parameters have the following restrictions:

| Type       | Restriction                                                                           |
| ---------- | ------------------------------------------------------------------------------------- |
| *string*   | 255 `UTF-8` characters                                                                |
| *decimal*  | 8 digits, 2 decimal places                                                            |
| *datetime* | [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) (e.g. `2020-10-09T10:30:01−07:00`) |
| *currency* | [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) (e.g. `USD`)                       |
| *integer*  | 16 digits                                                                             |

#### URL Encoding

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

```bash
curl 'https://api.impact.com/Mediapartners/<AccountSID>/Actions' \
	-X POST \
	-H 'Content-Type: application/x-www-form-urlencoded'
	-d 'OrderId=MyTestOrderId'
```

{% endtab %}
{% endtabs %}

#### Method Overloading

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

```bash
curl 'https://api.impact.com/Mediapartners/<AccountSID>/Actions/ActionId=1017.3295.188200' \
	-d '_method=DELETE' \
	-G
```

{% 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://integrations.impact.com/partner-api-reference/readme/requests.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.
