API error response

Summary

This is the list of errors that occur in each module/operation when making API requests. Each response contains code, message, and field data.

  • code: a string indicating the error type code (e.g: invalid if the request parameter is invalid)
  • message: standard error message in Kuroco
  • field: the request parameter where the error has occurred.
    It is not generated in the case of general errors.

Errors list

Login

APIConditionHTTP StatusCodeFieldMessage(ja)Message(en)Note
loginLogin authentication failed401unauthorized-Invalid credentialsInvalid credentialsIt returns "status": 1 in addition to "errors"("status": 0 for login success)
profileNot logged in(AccessToken unspecified)401----{"errors": [ "[GW] Access Token is required"]}
tokenGrantToken invalid401unauthorized-Grant token is invalid, revoked or expiredGrant token is invalid, revoked or expired

Topics

APIConditionHTTP StatusCodeFieldMessage(ja)Message(en)Note
list / detailNo topic group ID
No topic ID
404not_found---
insert / updateNo topic group IDbad_request-コンテンツ定義は存在しません。Content Structure does not exist.
No title400invalidsubjectタイトルは必須項目です。Title is required
Extended data:text
required input validation(without parameter)
400requiredext_col_xxRequired property missingRequired property missing
Extended data:text
required input validation(empty string)
400requiredext_col_xxString is too shortString is too short
Extended data:text
input limit(E-mail)
400invalidext_col_xxTextが不正です。 E-mail形式で入力してください。Invalid Text Please enter in a {1} format.
Extended data:text
input limit(Tel)
400invalidext_col_xxTextが不正です。 電話番号形式で入力してください。Invalid Text Please enter in a {1} format.
Extended data:text
input limit(ZIP)
400invalidext_col_xxTextが不正です。 郵便番号形式で入力してください。Invalid Text Please enter in a {1} format.
Extended data:text
input limit(URL)
400invalidext_col_xxTextが不正です。 URL形式で入力してください。Invalid Text Please enter in a {1} format.
Extended data:text
input limit(Number)
400invalidext_col_xxTextが不正です。 数値形式で入力してください。Invalid Text Please enter in a {1} format.
Extended data:text
input limit(Regular Expression)
400invalidext_col_xxTextが不正です。Invalid Text Please enter in a {1} format.
Extended data:text
input limit(number of character)
400invalidext_col_xxTextの文字数が不正です。The number of characters in Text is invalid.

Sample of error response

Below is a sample response of the error when the subject is empty or unspecified in the Add Content API.

{
  "errors": [
    {
      "code": "invalid",
      "message": "Title is required",
      "field": "subject"
    }
  ],
  "x-rcms-request-id": "280496b2-8b45-4a9a-8a21-678feb77e2ff"
}
  • In case of an error for a specific item, field contains the target item.