# Partner API Structure

In order to integrate with our Partner Portal, the base URL of all API endpoints is

```
https://partners.clym.io/api/portal
```

When calling API endpoints that change a resource, you must provide a `JSON` request body with the `Content-Type: application/json` HTTP header set.&#x20;

When calling API endpoints that perform asset uploading, you must use the multipart/form-data encoding with the `Content-Type: multipart/form-data` HTTP header set and the asset under the `asset` field.

All API endpoints will return `JSON` data with the `Content-Type: application/json` response HTTP header set.

The following status codes can be returned:

| Status code                              | Description                                                                                              |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| <mark style="color:green;">`2xx`</mark>  | Everything worked as expected                                                                            |
| <mark style="color:yellow;">`400`</mark> | The request data was unacceptable, most likely due to missing required params or invalid specified data. |
| <mark style="color:orange;">`401`</mark> | The specified API key is not valid                                                                       |
| <mark style="color:orange;">`403`</mark> | The API key does not have permissions to perform the request.                                            |
| <mark style="color:yellow;">`404`</mark> | The specified API endpoint, resource or requested resource does not exist.                               |
| <mark style="color:yellow;">`429`</mark> | Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.         |
| <mark style="color:red;">`5xx`</mark>    | Server errors, something went wrong on Clym's end.                                                       |
