Back to top

TypeSquare Web API v2 リファレンス

API v1 はこちら

共通仕様

認証

■ 認証方式

  • トークンを利用した認証の手法としてRFC6750を採用する。

  • リクエストヘッダーにAuthorization: Bearer トークン を含めてトークンを送信。

  • Authorizationヘッダで送信するトークンは、マイページで発行できるAPI Keyを設定する。

Authorization ヘッダ例)

Authorization: Bearer 0100000000000000fda65be4f6876770be5c0263ac6606e07ae44f583c8b56941024d444b63a51d1



APIキー発行

■ 画面遷移

代表者でログインした場合

マイページ > 利用者登録 > 利用者詳細

利用者でログインした場合

マイページ > プロフィール編集

■ 画面イメージ

APIKey発行画面イメージ

■ API Key 発行方法

  • 【API Key 追加ボタン】を押下すると API Key が生成されます。

  • 【API Key 追加ボタン】左の【メモ】欄にテキストを入力すると API Key のメモを登録することができます。

■ API Key 削除方法

  • 【API Key 削除ボタン】を押下すると、ダイアログでの確認後削除されます。

  • 利用者は代表者により作成された API Key は削除できません。

■ プロジェクトIDについて

プロジェクトに関連するAPI で利用するパラメータです。

API リファレンスでproject_idパラメータとして記載されている場合必要となります。

GET https://api.typesquare.com/v2/projects/999



スロットリング

  • TypeSquare WebAPI v2 は、1ユーザーが一定時間内で実行できる回数に制限を設けています。

  • 1ユーザーあたりの実行可能回数は 2分で1回分 の頻度で増加し、最大 30回分 まで保持することができます。

  • 実行可能回数が0回になると、 API を実行できなくなります。




エラーコード一覧

ステータスコード 内容 詳細
200 OK 正常に処理され、何らかのレスポンスが返却された。 {“code” : “20000”, “message” : “Success”}
201 Created 正常に処理され、何らかのリソースが作成された。 {“code” : “20100”, “message” : “Created”}
204 No Content 正常に処理され、空のレスポンスが返却された。 {}
400 Bad Request クエリパラメータが不正等。 {“code” : “40000”, “message” : “Bad Request”}
401 Unauthorized 認証に失敗した。 {“code” : “40100”, “message” : “Unauthorized”}
401 Unauthorized API Key の形式が不正。 {“code” : “40101”, “message” : “Bad Authorize Request”}
403 Forbidden リソースへのアクセス権限がない。 {“code” : “40300”, “message” : “Forbidden”}
404 Not Found リソースが存在しない。 {“code” : “40400”, “message” : “Not Found”}
406 Not Acceptable 何らかの事情でリクエストを受け入れられない。 例:残りの空きリソースがない {“code” : “40600”, “message” : “Not Acceptable”}
409 Conflict リソースの現在の状態と矛盾する操作を行おうとした。 {“code” : “40900”, “message” : “Conflict”}
429 Too Many Requests リクエストが多すぎる。 {“code” : “42900”, “message” : “Too Many Requests”}
429 Too Many Requests 同一 API Key による多重リクエスト。 {“code” : “42901”, “message” : “Too Many Concurrent”}
500 Internal Server Error 内部エラーが発生した。 {“code” : “50000”, “message” : “Internal Server Error”}
503 Service Unavailable 何らかの事情によりサービスが利用可能でない。 {“code” : “50300”, “message” : “Service Unavailable”}

API v2

プロジェクト情報取得

プロジェクト情報取得
GET/projects/{project_id}

処理概要

プロジェクトIDで指定したプロジェクトの情報が取得できる。

Example URI

GET https://api.typesquare.com/v2/projects/999
URI Parameters
HideShow
project_id
number (required) Example: 999

プロジェクトID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Response  200
HideShow
  • 取得成功
Headers
Content-Type: application/json
Charset: utf-8
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 273
Body
{
  "code": "20000",
  "message": "Success.",
  "data": {
    "id": 999,
    "name": "standard plan I",
    "nickname": "my standard plan",
    "webfont": {
      "type": "standard",
      "distribution_key": "238cvu823u%3D",
      "distribution_status": "working",
      "pv": 500,
      "sites": 5,
      "fonts": 8,
      "limit_pv": 10000000,
      "limit_sites": 10,
      "limit_fonts": 10
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    },
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "プロジェクトID (contracts.id)"
        },
        "name": {
          "type": "string",
          "description": "プロジェクト名"
        },
        "nickname": {
          "type": "string",
          "description": "プロジェクト名(別名)"
        },
        "webfont": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "standard",
                "advanced",
                "self"
              ],
              "description": "プランのタイプ (standard, advanced, self)"
            },
            "distribution_key": {
              "type": "string",
              "description": "配信キー"
            },
            "distribution_status": {
              "type": "string",
              "enum": [
                "working",
                "pause",
                "suspend"
              ],
              "description": "配信ステータス (動作中: working, ユーザー操作による一時停止中: pause, システムによる一時停止中:suspend)"
            },
            "pv": {
              "type": "number",
              "description": "消費PV数"
            },
            "sites": {
              "type": "number",
              "description": "設定済URL数"
            },
            "fonts": {
              "type": "number",
              "description": "設定済書体数"
            },
            "limit_pv": {
              "type": "number",
              "description": "上限PV数"
            },
            "limit_sites": {
              "type": "number",
              "description": "上限URL数 (無制限: 0)"
            },
            "limit_fonts": {
              "type": "number",
              "description": "上限書体数 (無制限: 0)"
            }
          }
        }
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  400
HideShow
  • パラメータが適切でない
Headers
Content-Type: application/json
Body
{
  "code": "40000",
  "message": "Bad Request."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • 認証失敗。レスポンスヘッダにWWW-Authenticate:Bearer realm=""を返却
Headers
Content-Type: application/json
WWW-Authenticate: Bearer realm=""
Body
{
  "code": "40100",
  "message": "Unauthorized."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  403
HideShow
  • 指定したプロジェクトリソースを取得する権限が無い(他ユーザーのプロジェクトリソースを取得しようとした)
Headers
Content-Type: application/json
Body
{
  "code": "40300",
  "message": "Forbidden."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  404
HideShow
  • 指定したプロジェクトリソースが存在しない
Headers
Content-Type: application/json
Body
{
  "code": "40400",
  "message": "Not Found."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

登録サイト情報取得

登録サイト情報取得
GET/projects/{project_id}/sites

処理概要

プロジェクトIDで指定したプロジェクトの登録サイト情報が取得できる。

Example URI

GET https://api.typesquare.com/v2/projects/999/sites
URI Parameters
HideShow
project_id
number (required) Example: 999

プロジェクトID

cursor
number (optional) Example: 32

取得カーソル

  • 取得するデータの始点となるID。取得データに同IDのデータは含まれない。
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Response  200
HideShow
  • 取得成功
Headers
Content-Type: application/json
Charset: utf-8
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 273
Body
{
  "code": "20000",
  "message": "Success.",
  "data": {
    "sites": [
      {
        "id": 10000,
        "url": "www.example.com",
        "created_at": "2017-04-10T13:50:40+09:00"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    },
    "data": {
      "type": "object",
      "properties": {
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "enum": [
                  10000
                ],
                "description": "サイトID"
              },
              "url": {
                "type": "string",
                "enum": [
                  "www.example.com"
                ],
                "description": "サイトURL"
              },
              "created_at": {
                "type": "string",
                "enum": [
                  "2017-04-10T13:50:40+09:00"
                ],
                "description": "登録日時"
              }
            },
            "required": [
              "id",
              "url",
              "created_at"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "sites"
      ]
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  204
HideShow
  • 存在しないサイトIDを指定した場合

  • 自分の管理外のサイトIDを指定した場合

  • 空のレスポンスを返却

Headers
Content-Type: application/json
Charset: utf-8
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 273
Body
{}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {}
}
Response  400
HideShow
  • パラメータが適切でない
Headers
Content-Type: application/json
Body
{
  "code": "40000",
  "message": "Bad Request."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • 認証失敗。レスポンスヘッダにWWW-Authenticate:Bearer realm=""を返却
Headers
Content-Type: application/json
WWW-Authenticate: Bearer realm=""
Body
{
  "code": "40100",
  "message": "Unauthorized."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  403
HideShow
  • 指定したプロジェクトリソースを取得する権限が無い(他ユーザーのプロジェクトリソースを取得しようとした)
Headers
Content-Type: application/json
Body
{
  "code": "40300",
  "message": "Forbidden."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  404
HideShow
  • 指定したプロジェクトリソースが存在しない
Headers
Content-Type: application/json
Body
{
  "code": "40400",
  "message": "Not Found."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

登録サイト情報登録

登録サイト情報登録
POST/projects/{project_id}/sites

処理概要

プロジェクトIDで指定したプロジェクトの登録サイト情報を登録できる。

Example URI

POST https://api.typesquare.com/v2/projects/999/sites
URI Parameters
HideShow
project_id
number (required) Example: 999

プロジェクトID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Body
{
  "url": [
    "http://example.com"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "url": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "http://example.com"
        ]
      },
      "description": "URL"
    }
  },
  "required": [
    "url"
  ]
}
Response  201
HideShow
  • 登録成功
Headers
Content-Type: application/json
Charset: utf-8
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 273
Body
{
  "code": "20100",
  "message": "Created.",
  "data": {}
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    },
    "data": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  400
HideShow
  • パラメータが適切でない
Headers
Content-Type: application/json
Body
{
  "code": "40000",
  "message": "Bad Request."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • 認証失敗。レスポンスヘッダにWWW-Authenticate:Bearer realm=""を返却
Headers
Content-Type: application/json
WWW-Authenticate: Bearer realm=""
Body
{
  "code": "40100",
  "message": "Unauthorized."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  406
HideShow
  • 残りサイト枠数が不足していた
Headers
Content-Type: application/json
Body
{
  "code": "40600",
  "message": "Not Acceptable."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  409
HideShow
  • 指定したサイトリソースがロック中の場合
Headers
Content-Type: application/json
Body
{
  "code": "40900",
  "message": "Conflict."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

登録サイト情報削除

登録サイト情報削除
DELETE/projects/{project_id}/sites/{site_id}

処理概要

プロジェクトIDで指定したプロジェクトの登録サイト情報を削除できる。

Example URI

DELETE https://api.typesquare.com/v2/projects/999/sites/99
URI Parameters
HideShow
project_id
number (required) Example: 999

プロジェクトID

site_id
number (required) Example: 99

サイトID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Response  204
HideShow
  • 削除成功

  • 空のレスポンスを返却

Headers
Content-Type: application/json
Charset: utf-8
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 273
Body
{}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {}
}
Response  400
HideShow
  • パラメータが適切でない
Headers
Content-Type: application/json
Body
{
  "code": "40000",
  "message": "Bad Request."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • 認証失敗。レスポンスヘッダにWWW-Authenticate:Bearer realm=""を返却
Headers
Content-Type: application/json
WWW-Authenticate: Bearer realm=""
Body
{
  "code": "40100",
  "message": "Unauthorized."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  403
HideShow
  • 指定したプロジェクトリソースを取得する権限が無い(他ユーザーのプロジェクトリソースを取得しようとした)
Headers
Content-Type: application/json
Body
{
  "code": "40300",
  "message": "Forbidden."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  404
HideShow
  • 指定したプロジェクトリソースが存在しない
Headers
Content-Type: application/json
Body
{
  "code": "40400",
  "message": "Not Found."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

登録サイトPV情報取得

登録サイトPV情報取得
GET/projects/{project_id}/sites/pvs

処理概要

プロジェクトIDで指定したプロジェクトのPVを含むサイト情報が取得できる。

Example URI

GET https://api.typesquare.com/v2/projects/999/sites/pvs
URI Parameters
HideShow
project_id
number (required) Example: 999

プロジェクトID

target_month
string (optional) Example: 201704

対象月(format: YYYYMM)

  • 初期値: 実行日の月

  • 指定年月の情報を取得する

id
number (optional) Example: 1

サイトID

cursor
number (optional) Example: 6

取得カーソル

  • 取得するデータの始点となるID。取得データに同IDのデータは含まれない。
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Response  200
HideShow
  • 取得成功
Headers
Content-Type: application/json
charset: utf-8
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 273
Body
{
  "code": "20000",
  "message": "Success.",
  "data": {
    "pvs": [
      {
        "site_id": 10000,
        "pvs": 10000
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    },
    "data": {
      "type": "object",
      "properties": {
        "pvs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "number",
                "enum": [
                  10000
                ],
                "description": "サイトID"
              },
              "pvs": {
                "type": "number",
                "enum": [
                  10000
                ],
                "description": "PV (指定期間中のPV数合計)"
              }
            },
            "required": [
              "site_id",
              "pvs"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "pvs"
      ]
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  204
HideShow
  • 存在しないサイトIDを指定した場合

  • 自分の管理外のサイトIDを指定した場合

  • PVが0の場合

  • 空のレスポンスを返却

Headers
Content-Type: application/json
Charset: utf-8
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 273
Body
{}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {}
}
Response  400
HideShow
  • パラメータが適切でない
Headers
Content-Type: application/json
Body
{
  "code": "40000",
  "message": "Bad Request."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • 認証失敗。レスポンスヘッダにWWW-Authenticate:Bearer realm=""を返却
Headers
Content-Type: application/json
WWW-Authenticate: Bearer realm=""
Body
{
  "code": "40100",
  "message": "Unauthorized."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  403
HideShow
  • 指定したプロジェクトリソースを取得する権限が無い(他ユーザーのプロジェクトリソースを取得しようとした)
Headers
Content-Type: application/json
Body
{
  "code": "40300",
  "message": "Forbidden."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  404
HideShow
  • 指定したプロジェクトリソースが存在しない
Headers
Content-Type: application/json
Body
{
  "code": "40400",
  "message": "Not Found."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

利用可能フォント取得

利用可能フォント取得
GET/projects/{project_id}/fonts

処理概要

プロジェクトIDで指定したプロジェクトで利用可能なフォント情報が取得できる。

Example URI

GET https://api.typesquare.com/v2/projects/999/fonts
URI Parameters
HideShow
project_id
number (required) Example: 999

プロジェクトID

styles
string (optional) Example: 2,3

書体分類

  • カンマ区切りで複数設定可能
vendors
string (optional) Example: 100,101

メーカー名

  • カンマ区切りで複数設定可能
weights
string (optional) Example: 60,61

太さ

  • カンマ区切りで複数設定可能
image_words
string (optional) Example: 25,26

イメージワード

  • カンマ区切りで複数設定可能
scenes
string (optional) Example: 46,47

用途

  • カンマ区切りで複数設定可能
languages
string (optional) Example: 0010,0030

言語

  • カンマ区切りで複数設定可能
is_webfont
enum(number) (optional) Example: 1

Webフォント (0: FALSE, 1: TRUE)

  • 初期値: 1
cursor
number (optional) Example: 5

取得カーソル

  • 取得するデータの始点となるID。取得データに同IDのデータは含まれない。
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Response  200
HideShow
  • 取得成功
Headers
Content-Type: application/json
Charset: utf-8
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 273
Body
{
  "code": "20000",
  "message": "Success.",
  "data": {
    "fonts": [
      {
        "id": 1000,
        "name": "リュウミン L-KL",
        "css_names": [
          "Ryumin Light KL",
          "リュウミン L-KL"
        ],
        "vendor": {
          "id": 1,
          "value": "MORISAWA"
        },
        "weight": {
          "id": 1,
          "value": "Light"
        },
        "styles": [
          {
            "id": 1,
            "value": "明朝体"
          },
          {
            "id": 5,
            "value": "かな"
          }
        ],
        "image_words": [
          {
            "id": 1,
            "value": "スタンダード"
          },
          {
            "id": 8,
            "value": "フォーマル"
          },
          {
            "id": 13,
            "value": "シャープ"
          }
        ],
        "scenes": [
          {
            "id": 1,
            "value": "ベーシック"
          },
          {
            "id": 5,
            "value": "フォーマル"
          }
        ],
        "language": {
          "id": 1,
          "value": "日本語"
        },
        "is_webfont": 1,
        "features": [
          "dtls",
          "nalt",
          "salt"
        ]
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    },
    "data": {
      "type": "object",
      "properties": {
        "fonts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "enum": [
                  1000
                ],
                "description": "フォントID"
              },
              "name": {
                "type": "string",
                "enum": [
                  "リュウミン L-KL"
                ],
                "description": "フォント名"
              },
              "css_names": {
                "type": "array",
                "items": [
                  {
                    "type": "string",
                    "enum": [
                      "Ryumin Light KL"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "リュウミン L-KL"
                    ]
                  }
                ],
                "description": "CSS名"
              },
              "vendor": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "enum": [
                      1
                    ],
                    "description": "メーカー名ID"
                  },
                  "value": {
                    "type": "string",
                    "enum": [
                      "MORISAWA"
                    ],
                    "description": "メーカー名"
                  }
                },
                "required": [
                  "id",
                  "value"
                ],
                "additionalProperties": false
              },
              "weight": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "enum": [
                      1
                    ],
                    "description": "太さID"
                  },
                  "value": {
                    "type": "string",
                    "enum": [
                      "Light"
                    ],
                    "description": "太さ"
                  }
                },
                "required": [
                  "id",
                  "value"
                ],
                "additionalProperties": false
              },
              "styles": {
                "type": "array",
                "items": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          1
                        ],
                        "description": "書体分類ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "明朝体"
                        ],
                        "description": "書体分類"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          5
                        ],
                        "description": "書体分類ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "かな"
                        ],
                        "description": "書体分類"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "image_words": {
                "type": "array",
                "items": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          1
                        ],
                        "description": "イメージワードID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "スタンダード"
                        ],
                        "description": "イメージワード"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          8
                        ],
                        "description": "イメージワードID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "フォーマル"
                        ],
                        "description": "イメージワード"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          13
                        ],
                        "description": "イメージワードID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "シャープ"
                        ],
                        "description": "イメージワード"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "scenes": {
                "type": "array",
                "items": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          1
                        ],
                        "description": "用途ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "ベーシック"
                        ],
                        "description": "用途"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          5
                        ],
                        "description": "用途ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "フォーマル"
                        ],
                        "description": "用途"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "language": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "enum": [
                      1
                    ],
                    "description": "言語ID"
                  },
                  "value": {
                    "type": "string",
                    "enum": [
                      "日本語"
                    ],
                    "description": "言語"
                  }
                },
                "required": [
                  "id",
                  "value"
                ],
                "additionalProperties": false
              },
              "is_webfont": {
                "type": "number",
                "enum": [
                  1
                ],
                "description": "Webフォント"
              },
              "features": {
                "type": "array",
                "items": [
                  {
                    "type": "string",
                    "enum": [
                      "dtls"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "nalt"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "salt"
                    ]
                  }
                ],
                "description": "feature情報 ([feature一覧](https://www.microsoft.com/typography/otspec/featurelist.htm))"
              }
            },
            "required": [
              "id",
              "name",
              "css_names",
              "vendor",
              "weight",
              "styles",
              "image_words",
              "scenes",
              "language",
              "is_webfont",
              "features"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "fonts"
      ]
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  400
HideShow
  • パラメータが適切でない
Headers
Content-Type: application/json
Body
{
  "code": "40000",
  "message": "Bad Request."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • 認証失敗。レスポンスヘッダにWWW-Authenticate:Bearer realm=""を返却
Headers
Content-Type: application/json
WWW-Authenticate: Bearer realm=""
Body
{
  "code": "40100",
  "message": "Unauthorized."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  404
HideShow
  • 指定したプロジェクトリソースが存在しない
Headers
Content-Type: application/json
Body
{
  "code": "40400",
  "message": "Not Found."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "レスポンスコード"
    },
    "message": {
      "type": "string",
      "description": "メッセージ"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

Generated by aglio on 18 Apr 2024