API Requests
Schema
The API is accessable only over HTTPS. All data is sent and received in JSON format.
curl -i https://api.convertiser.com/publisher/websites/
-H "Authorization: Token your-personal-secret-token-here"
HTTP/1.1 200 OK
Server: nginx/1.4.6 (Ubuntu)
Date: Fri, 17 Nov 2017 13:15:25 GMT
Content-Type: application/json
Content-Length: 18584
Connection: keep-alive
Content-Language: en
Vary: Accept-Language
Allow: GET, HEAD, OPTIONS
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000
Important
For requests, resource URL should be ended with slash /, otherwise redirect response returned.
curl -i -X GET https://api.convertiser.com/publisher/websites
-H "Authorization: Token your-personal-secret-token-here"
HTTP/1.1 301 Moved Permanently
Blank fields are included as null instead of being omitted.
HTTP Verbs
The API strives to use appropriate HTTP verbs for each action.
| Verb | Description |
|---|---|
| HEAD | Can be issued against any resource to get just the HTTP header info. |
| GET | Used for retrieving resources. |
| POST | Used for creating resources. |
| PATCH | Used for updating resources with partial JSON data. |
| PUT | Used for replacing resources or collections. |
| DELETE | Used for deleting resources. |
| OPTIONS | Used for gettings resource description. |
Parameters
Many API methods take optional parameters, example for filtering or ordering data.
For GET requests, any parameters not specified as a segment in the path can be passed as an HTTP query string parameter:
curl -X GET https://api.convertiser.com/publisher/websites/?ordering=-created_at&status=approved
-H "Authorization: Token your-personal-secret-token-here"
Date and number ranges
A filter on a date or an amount, such as created_at or sale_amount, takes a range as two parameters: <field>_0 for the start and <field>_1 for the end. Both ends are inclusive, and either one can be left out.
curl -X GET "https://api.convertiser.com/publisher/conversions/?created_at_0=2026-10-01&created_at_1=2026-10-31"
-H "Authorization: Token your-personal-secret-token-here"
Dates are ISO 8601, such as 2026-10-01, and are read in your account's timezone. An end date counts up to the end of that day. Conversions for a period walks through an example.
For POST, PATCH, PUT, and DELETE requests, parameters (usually) not included in the URL should be encoded as JSON :
curl -X POST https://api.convertiser.com/publisher/websites/
-H "Authorization: Token your-personal-secret-token-here"
-H "Content-Type: application/json"
-d '{"title": "website-title"}'