Basics

Encoding

Default encoding is UTF-8.

Response Protocol

Conyac API is accessible through HTTPS. Response is formatted as JSON.

Parameter Format

GET Request

POST, PUT Requests

application/json

or

application/x-www-form-urlencoded

Format of the API file

multipart/form-data

Error Response

If request cannot be handled, a 5xx or 4xx error will be returned.

Not Found

 HTTP/1.1 404 NotFound
 Content-Type: application/json; charset=utf-8
{
  "success": false,
  "message": "Page not Found",
  "error_code": 404
}

Access Denied

 HTTP/1.1 403 AccessDenied
 Content-Type: application/json; charset=utf-8

{"message":"Problems parsing JSON"}

UnAuthorized

 HTTP/1.1 401 Unauthorized
 Content-Type: application/json; charset=utf-8
{
  "success": false,
  "message": "Requires authentication",
  "error_code": 401
}

Validation Error

If incorrect data is used for a new/update API request, a 422 Unprocessable Entity will be returned.

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json; charset=utf-8
{
  "message": "Validation Fail",
  "error_code": 201,
  "success": false,
  "errors": {
    "name": "can't be blank"
  }
}

Pagination

Conyac API fetches and returns up to 30 entries by default. You can get entries of the next page by setting the page parameter. In addition, you can change this fetch limit by setting the per_page parameter (max = 100).

$ curl  https://biz.conyac.cc/api/v1/my/questions?page=4&per_page=100&access_token=dec0c0dc2f72e9d67075d136409bf33a21b6cb8097634d328447a7672b2969ac