Back to top

TypeSquare Web API v2 Reference

Here is API v1

Common Specification

Authentication

■ Authentication Method

  • RFC6750 is adopted as an authentication method using tokens.

  • Send a token including Authorization: Bearer token to a request header.

  • A token which is sent by Authorization header sets API Key issued in My Page.

Example of Authorization header)

Authorization: Bearer 0100000000000000fda65be4f6876770be5c0263ac6606e07ae44f583c8b56941024d444b63a51d1



API Key Issuing

■ Screen Transition

When a representative user logged in

My Page > Add Users > User Detail

When a user logged in

My Page > Edit Profile

■ Screen Image

API Key Issuing Screen Image

■ Method of API Key Issuing

  • An API Key is created if you click on Add API Key button.

  • You can register your note of the API Key if you enter text in a text field on the left side of Add API Key button.

■ Method of API Key Deleting

  • An API Key is deleted after prompting if you click on API Key Delete button.

  • Users cannot delete API Keys created by a representative user.

■ About Project ID

This is a parameter used in API related to your Project.

This is needed if it is written as project_id parameter in API reference.

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



Throttling

  • TypeSquare WebAPI v2 restricts the number of times that a user can perform in a certain period of time.

  • The number of times that a user can perform will increase once every 2 minutes and be retained up to 30 times.

  • When the number of times that a user can perform becomes 0, API cannot be performed.




Error Code List

Status Code Content Details
200 OK Processed successfully and returned some responses. {“code” : “20000”, “message” : “Success”}
201 Created Processed successfully and created some resources. {“code” : “20100”, “message” : “Created”}
204 No Content Processed successfully and returned an empty response. {}
400 Bad Request Incorrect query parameter, etc. {“code” : “40000”, “message” : “Bad Request”}
401 Unauthorized Failed to authenticate. {“code” : “40100”, “message” : “Unauthorized”}
401 Unauthorized Incorrect API Key format. {“code” : “40101”, “message” : “Bad Authorize Request”}
403 Forbidden No access right to the resources. {“code” : “40300”, “message” : “Forbidden”}
404 Not Found The resources do not exist. {“code” : “40400”, “message” : “Not Found”}
406 Not Acceptable The request is not acceptable for some reason or other. e.g. no remaining free resources {“code” : “40600”, “message” : “Not Acceptable”}
409 Conflict Tried inconsistent operation with the current status of the resources. {“code” : “40900”, “message” : “Conflict”}
429 Too Many Requests Too many requests. {“code” : “42900”, “message” : “Too Many Requests”}
429 Too Many Requests Multiple requests by the same API Key. {“code” : “42901”, “message” : “Too Many Concurrent”}
500 Internal Server Error An internal error occurred. {“code” : “50000”, “message” : “Internal Server Error”}
503 Service Unavailable The service is unavailable for some reason or other. {“code” : “50300”, “message” : “Service Unavailable”}

API v2

Get Project Information

Get Project Information
GET/projects/{project_id}

Process Overview

This can get information of a project specified by Project ID.

Example URI

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

Project ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Response  200
HideShow
  • Retrieved successfully
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    },
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number",
          "description": "Project ID (contracts.id)"
        },
        "name": {
          "type": "string",
          "description": "Project name"
        },
        "nickname": {
          "type": "string",
          "description": "Project name (alias)"
        },
        "webfont": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "standard",
                "advanced",
                "self"
              ],
              "description": "Type of plan (standard, advanced, self)"
            },
            "distribution_key": {
              "type": "string",
              "description": "Distribution key"
            },
            "distribution_status": {
              "type": "string",
              "enum": [
                "working",
                "pause",
                "suspend"
              ],
              "description": "Distribution status (Working: working, Pausing by user action: pause, Suspending by system: suspend)"
            },
            "pv": {
              "type": "number",
              "description": "The number of consumption PV"
            },
            "sites": {
              "type": "number",
              "description": "The number of set URL"
            },
            "fonts": {
              "type": "number",
              "description": "The number of set fonts"
            },
            "limit_pv": {
              "type": "number",
              "description": "The maximum number of PV"
            },
            "limit_sites": {
              "type": "number",
              "description": "The maximum number of URL (Unlimited: 0)"
            },
            "limit_fonts": {
              "type": "number",
              "description": "The maximum number of fonts (Unlimited: 0)"
            }
          }
        }
      }
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  400
HideShow
  • Incorrect parameter
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • Failed to authenticate. Returned WWW-Authenticate:Bearer realm="" to response headers
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  403
HideShow
  • No permission to get the specified project resource (Tried to get project resource of another user)
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  404
HideShow
  • The specified project resource does not exist
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

Get Registration Site Information

Get Registration Site Information
GET/projects/{project_id}/sites

Process Overview

This can get registration site information of a project specified by Project ID.

Example URI

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

Project ID

cursor
number (optional) Example: 32

Cursor to retrieve

  • ID which is the start point of retrieved data. The same ID is not included in the retrieved data.
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Response  200
HideShow
  • Retrieved successfully
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    },
    "data": {
      "type": "object",
      "properties": {
        "sites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "enum": [
                  10000
                ],
                "description": "Site ID"
              },
              "url": {
                "type": "string",
                "enum": [
                  "www.example.com"
                ],
                "description": "Site URL"
              },
              "created_at": {
                "type": "string",
                "enum": [
                  "2017-04-10T13:50:40+09:00"
                ],
                "description": "Registration date and time"
              }
            },
            "required": [
              "id",
              "url",
              "created_at"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "sites"
      ]
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  204
HideShow
  • If Site ID which did not exist was specified

  • If Site ID managed by another user was specified

  • Returned an empty response

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
  • Incorrect parameter
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • Failed to authenticate. Returned WWW-Authenticate:Bearer realm="" to response headers
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  403
HideShow
  • No permission to get the specified project resource (Tried to get project resource of another user)
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  404
HideShow
  • The specified project resource does not exist
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

Register Registration Site Information

Register Registration Site Information
POST/projects/{project_id}/sites

Process Overview

This can register registration site information of a project specified by Project ID.

Example URI

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

Project 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
  • Retrieved successfully
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    },
    "data": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  400
HideShow
  • Incorrect parameter
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • Failed to authenticate. Returned WWW-Authenticate:Bearer realm="" to response headers
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  406
HideShow
  • The number of remaining site frames is insufficient
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  409
HideShow
  • If the specified site resource is locked
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

Delete Registration Site Information

Delete Registration Site Information
DELETE/projects/{project_id}/sites/{site_id}

Process Overview

This can delete registration site information of a project specified by Project ID.

Example URI

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

Project ID

site_id
number (required) Example: 99

Site ID

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Response  204
HideShow
  • Successfully deleted

  • Returned an empty response

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
  • Incorrect parameter
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • Failed to authenticate. Returned WWW-Authenticate:Bearer realm="" to response headers
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  403
HideShow
  • No permission to get the specified project resource (Tried to get another user’s project resource)
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  404
HideShow
  • The specified project resource does not exist
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

Get Registration Site PV Information

Get Registration Site PV Information
GET/projects/{project_id}/sites/pvs

Process Overview

This can get site information including PV of a project specified by Project ID.

Example URI

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

Project ID

target_month
string (optional) Default: the month of executed date Example: 201704

Targeted month(format: YYYYMM)

id
number (optional) Example: 1

Site ID

cursor
number (optional) Example: 6

Cursor to retrieve

  • ID which is the start point of retrieved data. The same ID is not included in the retrieved data.
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Response  200
HideShow
  • Retrieved successfully
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    },
    "data": {
      "type": "object",
      "properties": {
        "pvs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "site_id": {
                "type": "number",
                "enum": [
                  10000
                ],
                "description": "Site ID"
              },
              "pvs": {
                "type": "number",
                "enum": [
                  10000
                ],
                "description": "PV (Total number of PV in the specified period)"
              }
            },
            "required": [
              "site_id",
              "pvs"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "pvs"
      ]
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  204
HideShow
  • If Site ID which did not exist was specified

  • If Site ID managed by another user was specified

  • If PV was 0

  • Returned an empty response

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
  • Incorrect parameter
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • Failed to authenticate. Returned WWW-Authenticate:Bearer realm="" to response headers
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  403
HideShow
  • No permission to get the specified project resource (Tried to get project resource of another user)
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  404
HideShow
  • The specified project resource does not exist
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

Get Available Fonts

Get Available Fonts
GET/projects/{project_id}/fonts

Process Overview

This can get available fonts information in a project specified by Project ID.

Example URI

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

Project ID

styles
string (optional) Example: 2,3

Styles

  • Comma-separated multiple parameters can be set
vendors
string (optional) Example: 100,103

Foundry names

  • Comma-separated multiple parameters can be set
weights
string (optional) Example: 60,61

Weights

  • Comma-separated multiple parameters can be set
image_words
string (optional) Example: 25,26

Moods

  • Comma-separated multiple parameters can be set
scenes
string (optional) Example: 46,47

Usage

  • Comma-separated multiple parameters can be set
languages
string (optional) Example: 0020,0050

Languages

  • Comma-separated multiple parameters can be set
is_webfont
enum(number) (optional) Default: 1 Example: 1

Web font (0: FALSE, 1: TRUE)

cursor
number (optional) Example: 5

Cursor to retrieve

  • ID which is the start point of retrieved data. The same ID is not included in the retrieved data.
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824c5b9e29e1b161e5c
Response  200
HideShow
  • Retrieved successfully
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": "Ryumin L-KL",
        "css_names": [
          "Ryumin Light KL",
          "Ryumin L-KL"
        ],
        "vendor": {
          "id": 1,
          "value": "MORISAWA"
        },
        "weight": {
          "id": 1,
          "value": "Light"
        },
        "styles": [
          {
            "id": 1,
            "value": "Serif"
          },
          {
            "id": 5,
            "value": "Kana"
          }
        ],
        "image_words": [
          {
            "id": 1,
            "value": "Standard"
          },
          {
            "id": 8,
            "value": "Formal"
          },
          {
            "id": 13,
            "value": "Sharp"
          }
        ],
        "scenes": [
          {
            "id": 1,
            "value": "Basic"
          },
          {
            "id": 5,
            "value": "Formal"
          }
        ],
        "language": {
          "id": 1,
          "value": "Japanese"
        },
        "is_webfont": 1,
        "features": [
          "dtls",
          "nalt",
          "salt"
        ]
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    },
    "data": {
      "type": "object",
      "properties": {
        "fonts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "enum": [
                  1000
                ],
                "description": "Font ID"
              },
              "name": {
                "type": "string",
                "enum": [
                  "Ryumin L-KL"
                ],
                "description": "Font name"
              },
              "css_names": {
                "type": "array",
                "items": [
                  {
                    "type": "string",
                    "enum": [
                      "Ryumin Light KL"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "Ryumin L-KL"
                    ]
                  }
                ],
                "description": "CSS names"
              },
              "vendor": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "enum": [
                      1
                    ],
                    "description": "Foundry ID"
                  },
                  "value": {
                    "type": "string",
                    "enum": [
                      "MORISAWA"
                    ],
                    "description": "Foundry name"
                  }
                },
                "required": [
                  "id",
                  "value"
                ],
                "additionalProperties": false
              },
              "weight": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "enum": [
                      1
                    ],
                    "description": "Weight ID"
                  },
                  "value": {
                    "type": "string",
                    "enum": [
                      "Light"
                    ],
                    "description": "Weight"
                  }
                },
                "required": [
                  "id",
                  "value"
                ],
                "additionalProperties": false
              },
              "styles": {
                "type": "array",
                "items": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          1
                        ],
                        "description": "Classification ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "Serif"
                        ],
                        "description": "Classification"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          5
                        ],
                        "description": "Classification ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "Kana"
                        ],
                        "description": "Classification"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "image_words": {
                "type": "array",
                "items": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          1
                        ],
                        "description": "Mood ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "Standard"
                        ],
                        "description": "Mood"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          8
                        ],
                        "description": "Mood ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "Formal"
                        ],
                        "description": "Mood"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          13
                        ],
                        "description": "Mood ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "Sharp"
                        ],
                        "description": "Mood"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "scenes": {
                "type": "array",
                "items": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          1
                        ],
                        "description": "Usage ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "Basic"
                        ],
                        "description": "Usage"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number",
                        "enum": [
                          5
                        ],
                        "description": "Usage ID"
                      },
                      "value": {
                        "type": "string",
                        "enum": [
                          "Formal"
                        ],
                        "description": "Usage"
                      }
                    },
                    "required": [
                      "id",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "language": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "enum": [
                      1
                    ],
                    "description": "Language ID"
                  },
                  "value": {
                    "type": "string",
                    "enum": [
                      "Japanese"
                    ],
                    "description": "Language"
                  }
                },
                "required": [
                  "id",
                  "value"
                ],
                "additionalProperties": false
              },
              "is_webfont": {
                "type": "number",
                "enum": [
                  1
                ],
                "description": "Web font"
              },
              "features": {
                "type": "array",
                "items": [
                  {
                    "type": "string",
                    "enum": [
                      "dtls"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "nalt"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "salt"
                    ]
                  }
                ],
                "description": "feature information ([feature list](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
  • Incorrect parameter
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  401
HideShow
  • Failed to authenticate. Returned WWW-Authenticate:Bearer realm="" to response headers
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}
Response  404
HideShow
  • The specified project resource does not exist
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": "Response code"
    },
    "message": {
      "type": "string",
      "description": "Message"
    }
  },
  "required": [
    "code",
    "message"
  ]
}

Generated by aglio on 29 Oct 2024