Developer docs

Retino provides an easy way how to communicate with us programmatically through the API. Easily manage the tickets and connect your existing software. On this page, you’ll find a quick and easy intro to our API service.

API endpoints

With our API endpoints you can easily create, update, delete and list your tickets. All endpoints have the URL formatted like https://app.retino.io/api/v1/…

Authorization

In order to use our API service, first you need to create an API Token. This is done in Settings > API.

Every API request needs to be authorized with the Token using Authorization HTTP header like this:

Authorization: Token 61c57a563ce3b3bcf69fa78c1324abbac974a7060

Be careful about whitespace and letter case.

Content type

All endpoints accept and send json content type. Please use the following HTTP headers on all requests:

Content-Type: application/json
Accept: application/json

Example: list tickets

Send the following request:

GET https://app.retino.io/api/v1/tickets
Authorization: Token 61c57a563ce3b3bcf69fa78c1324abbac974a7060
Content-Type: application/json
Accept: application/json

and get the following (paginated) response:

 
   "count":556,
   "next":"https://app.retino.io/api/v1/tickets?page=2",
   "previous":null,
   "results": 
       
         "id":"23bb1054-f026-4ac6-a11e-570a58793b9e",
         "code":"20170545",
         "customer_name":"John Doe",
         "customer_email":"customer@gmail.com",
         "customer_phone":"800123456",
         "order_id":"494",
         "order_date":"July 19, 2017",
         "customer_note":"",
         "internal_note":"",
         "customer_rating":null,
         "customer_rating_comment":null,
         "language":"de",
         "country":"CZ",
         "priority":"NORMAL",
         "get_priority_display":"Normal",
         "created_at":"2017-07-19T13:02:44.816508Z",
         "updated_at":"2017-07-29T13:58:28.038636Z",
         "closed_at":null,
         "deleted_at":null,
         "emailing_list":"{}",
         "state":"1603d957-ca04-46af-a1e3-6dde275aa310",
         "state_data": 
            "id":"1603d957-ca04-46af-a1e3-6dde275aa310",
            "name":"Approved",
            "fgcolor":"#000000",
            "bgcolor":"#ffffff"
         },
         "owner":"c9c54f5a-cc05-4a55-94a9-c86b7633e5ad",
         "owner_data": 
            "id":"c9c54f5a-cc05-4a55-94a9-c86b7633e5ad",
            "email":"agent@company.com",
            "username":"agent@company.com",
            "first_name":"Mr.",
            "last_name":"Agent"
         },
         "company":"84530b39-24ac-4aa1-a537-7cfd39f214f1",
         "company_data": 
            "id":"84530b39-24ac-4aa1-a537-7cfd39f214f1",
            "name":"Test",
            "logo":null,
            "shop_url":""
         },
         "type":null,
         "type_data":null,
         "tags": 

         ],
         "tags_data": 

         ],
         "is_email_blacklisted":false,
         "custom_fields": 

         ],
         "direct_order_link":null
      },
      ...
   ]
}

Webhooks

With Retino, you can also fire webhooks on certain event. Webhook is a HTTP callback that is called when a certain event occurs. You can set up webhooks at Settings > Automation > Webhooks. With each webhook, we send the related ticket in json as the request body. The format of the json is the same as with the API.