{
  "openapi": "3.1.0",
  "info": {
    "title": "Amiqus ID REST API",
    "version": "2.0",
    "description": "Amiqus ID API reference.\n\n[Changelog](/aqid/changelog.html)\n",
    "contact": {
      "email": "developers@amiqus.co",
      "name": "Amiqus Engineering",
      "url": "https://developers.amiqus.co/aqid/api-reference.html"
    }
  },
  "servers": [
    {
      "url": "https://id.amiqus.co/api/v2"
    }
  ],
  "tags": [
    {
      "name": "Service Status"
    },
    {
      "name": "User Account"
    },
    {
      "name": "Your Team"
    },
    {
      "name": "Records"
    },
    {
      "name": "Record Assignees"
    },
    {
      "name": "Clients"
    },
    {
      "name": "Client Assignees"
    },
    {
      "name": "Client Files"
    },
    {
      "name": "Client Organisations"
    },
    {
      "name": "Cases"
    },
    {
      "name": "Case Items"
    },
    {
      "name": "Case Assignees"
    },
    {
      "name": "Steps"
    },
    {
      "name": "Teams"
    },
    {
      "name": "Organisations"
    },
    {
      "name": "Organisation Clients"
    },
    {
      "name": "Organisation Assignees"
    },
    {
      "name": "Documents"
    },
    {
      "name": "Templates"
    },
    {
      "name": "Webhooks"
    },
    {
      "name": "Forms"
    },
    {
      "name": "Files"
    },
    {
      "name": "Attachments"
    },
    {
      "name": "Other Resources"
    },
    {
      "name": "Aggregates"
    }
  ],
  "paths": {
    "/status": {
      "get": {
        "summary": "Check service status",
        "description": "The status endpoint can be used to perform an authenticated request to verify the access token is valid and that the service is operational.\n",
        "operationId": "get-status",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Service Status"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/status \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/status',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/status\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/status');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/me": {
      "get": {
        "summary": "Retrieve user account",
        "description": "Retrieve details of the current user's account.\n\nAccess tokens are scoped to a single user account and team _(if they are a member of more than one)_. This endpoint can be used to determine which user the access token was issued for.\n\nTo retrieve details of the user's role within their current team, refer to **[Retrieve team membership](#operation/get-team-me)**.\n",
        "operationId": "get-me",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "User Account"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                },
                "example": {
                  "object": "user",
                  "id": 345789,
                  "name": "Bob Gale",
                  "email": "bob@example.com",
                  "is_verified": true,
                  "is_disabled": false,
                  "created_at": "2019-08-24T14:15:22Z",
                  "updated_at": "2019-08-24T14:15:22Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/me \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/me',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/me\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/me');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "patch": {
        "summary": "Update user account",
        "description": "Update the current user's account details.\n\nWhen updating a user's email address, the change must be confirmed by the user via an email sent to their current email address. The updated email address won't be reflected in the response until the confirmation is complete.\n\nIt is not possible to update a user's password using the API.\n",
        "operationId": "patch-me",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "User Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "minProperties": 1,
                "$ref": "#/components/schemas/User"
              },
              "example": {
                "name": "Robert Gale"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                },
                "example": {
                  "object": "user",
                  "id": 345789,
                  "name": "Robert Gale",
                  "email": "bob@example.com",
                  "is_verified": true,
                  "is_disabled": false,
                  "created_at": "2019-08-24T14:15:22Z",
                  "updated_at": "2019-08-24T14:15:22Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PATCH \\\n  --url https://id.amiqus.co/api/v2/me \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"email\":\"user@example.com\"}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://id.amiqus.co/api/v2/me',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {name: 'string', email: 'user@example.com'},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"name\": \"string\",\n  \"email\": \"user@example.com\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://id.amiqus.co/api/v2/me\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"name\":\"string\",\"email\":\"user@example.com\"}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/me');\n$request->setRequestMethod('PATCH');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/me/teams": {
      "get": {
        "summary": "List all my teams",
        "description": "List all teams the current user is a member of.\n\nA user can be a member of multiple teams. To retrieve details of the team the access token is scoped to, refer to **[Retrieve current team](#operation/get-team)**.\n",
        "operationId": "get-me-teams",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "User Account"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Team"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "team",
                      "id": 88,
                      "uuid": "6b9c8323-4b54-4bb3-a1c8-68de534368a5",
                      "name": "Fusion Industries",
                      "contact": "fusion.support@example.com",
                      "telephone": null,
                      "tier": "standard_2021",
                      "logo": null,
                      "is_support_enabled": true,
                      "created_at": "2019-08-24T14:15:22Z",
                      "updated_at": "2019-08-24T14:15:22Z",
                      "archived_at": null
                    }
                  ],
                  "total": 1,
                  "count": 1,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/me/teams?page=INTEGER_VALUE&limit=INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/me/teams',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/me/teams?page=INTEGER_VALUE&limit=INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/me/teams');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/team": {
      "get": {
        "summary": "Retrieve current team",
        "description": "Returns basic details of the current team.",
        "operationId": "get-team",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Your Team"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                },
                "example": {
                  "object": "team",
                  "id": 88,
                  "identifier": "fusion-industries",
                  "uuid": "6b9c8323-4b54-4bb3-a1c8-68de534368a5",
                  "name": "Fusion Industries",
                  "contact": "fusion.support@example.com",
                  "telephone": null,
                  "tier": "standard_2021",
                  "logo": null,
                  "is_support_enabled": true,
                  "created_at": "2019-08-24T14:15:22Z",
                  "updated_at": "2019-08-24T14:15:22Z",
                  "archived_at": null
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/team \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/team',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/team\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/team');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "patch": {
        "summary": "Update current team",
        "description": "Updates basic details of the current team.",
        "operationId": "patch-team",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Your Team"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "minProperties": 1,
                "properties": {
                  "contact": {
                    "type": "string",
                    "format": "email"
                  },
                  "telephone": {
                    "type": [
                      "null",
                      "string"
                    ]
                  }
                }
              },
              "example": {
                "contact": "fusion@example.com"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Team"
                },
                "example": {
                  "object": "team",
                  "id": 88,
                  "identifier": "fusion-industries",
                  "uuid": "6b9c8323-4b54-4bb3-a1c8-68de534368a5",
                  "name": "Fusion Industries",
                  "contact": "fusion@example.com",
                  "telephone": null,
                  "tier": "standard_2021",
                  "logo": null,
                  "is_support_enabled": true,
                  "created_at": "2019-08-24T14:15:22Z",
                  "updated_at": "2019-08-24T14:15:22Z",
                  "archived_at": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PATCH \\\n  --url https://id.amiqus.co/api/v2/team \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"contact\":\"user@example.com\",\"telephone\":null}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://id.amiqus.co/api/v2/team',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {contact: 'user@example.com', telephone: null},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"contact\": \"user@example.com\",\n  \"telephone\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://id.amiqus.co/api/v2/team\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"contact\":\"user@example.com\",\"telephone\":null}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/team');\n$request->setRequestMethod('PATCH');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/team/me": {
      "get": {
        "summary": "Retrieve team membership",
        "description": "Retrieve membership details for the user's current team.\n\nTo retrieve the user's basic details, refer to **[Retrieve user account](#operation/get-me)**.\n",
        "operationId": "get-team-me",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Your Team"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMember"
                },
                "example": {
                  "object": "team_member",
                  "id": 121,
                  "name": "Lorraine Baines",
                  "email": "lorraine@example.com",
                  "role": "owner"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/team/me \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/team/me',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/team/me\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/team/me');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/team/members": {
      "get": {
        "summary": "List all team members",
        "description": "List all team members of the current team.",
        "operationId": "get-team-members",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Your Team"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/TeamMember"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "team_member",
                      "id": 121,
                      "name": "Lorraine Baines",
                      "email": "lorraine@example.com",
                      "role": "owner"
                    },
                    {
                      "object": "team_member",
                      "id": 472,
                      "name": "Dennis Jones",
                      "email": "dennis@example.com",
                      "role": "member"
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/team/members?page=INTEGER_VALUE&limit=INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/team/members',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/team/members?page=INTEGER_VALUE&limit=INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/team/members');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients": {
      "get": {
        "summary": "List all clients",
        "description": "Returns a paginated list of clients.\n\nTo retrieve a client, refer to **[Retrieve a client](#operation/get-clients-id)**.\n",
        "operationId": "get-clients",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "description": "Search for clients by name (first, middle and last), reference and organisation name. Search is case-insensitive and fuzzy.",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "description": "Filter clients by their current status.",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "rejected"
              ]
            }
          },
          {
            "name": "visibility",
            "description": "Filter clients by their visibility state. Both active and archived clients are returned by default.",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "assignee",
            "description": "Filter records assigned to this team member's user ID.",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "reference",
            "description": "Filter users by reference.\n\nThis search is case-insensitive but is not fuzzy and will only return full matches.\n",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deletion_date",
            "description": "Filter clients by deletion date. All values, including `not_set`, are returned by default.",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "upcoming",
                "today",
                "overdue",
                "not_set"
              ]
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name.first_name",
                "name.last_name",
                "deletion_date",
                "created_at",
                "updated_at",
                "archived_at"
              ]
            },
            "description": "Sort results by name or date. Results returned in ID order by default"
          },
          {
            "name": "order_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Order results in ascending or descending order. Results returned in ascending order by default"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/Client"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "status": {
                                    "oneOf": [
                                      {
                                        "type": "null"
                                      },
                                      {
                                        "type": "string",
                                        "enum": [
                                          "pending",
                                          "approved",
                                          "rejected"
                                        ]
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "client",
                      "id": 73823,
                      "status": "pending",
                      "name": {
                        "object": "name",
                        "title": "mr",
                        "other_title": null,
                        "first_name": "Martin",
                        "middle_name": "Seamus",
                        "last_name": "McFly",
                        "name": "Martin McFly",
                        "full_name": "Martin Seamus McFly",
                        "complete_name": "Mr Martin Seamus McFly"
                      },
                      "email": "marty@example.com",
                      "landline": null,
                      "mobile": null,
                      "dob": "1968-06-12",
                      "reference": null,
                      "national_insurance_number": null,
                      "is_deletable": true,
                      "deletion_date": "2026-01-14",
                      "created_at": "2022-05-21T14:15:22Z",
                      "updated_at": "2022-05-21T14:15:22Z",
                      "archived_at": null
                    },
                    {
                      "object": "client",
                      "id": 73841,
                      "status": null,
                      "name": {
                        "object": "name",
                        "title": "miss",
                        "other_title": null,
                        "first_name": "Jennifer",
                        "middle_name": "Jane",
                        "last_name": "Parker",
                        "name": "Jennifer Parker",
                        "full_name": "Jennifer Jane Parker",
                        "complete_name": "Miss Jennifer Jane Parker"
                      },
                      "email": "jennifer@example.com",
                      "landline": null,
                      "mobile": null,
                      "dob": "1967-10-29",
                      "reference": null,
                      "national_insurance_number": "QQ345678Z",
                      "is_deletable": true,
                      "deletion_date": "2025-09-11",
                      "created_at": "2022-05-21T14:22:01Z",
                      "updated_at": "2022-05-21T14:22:01Z",
                      "archived_at": null
                    },
                    {
                      "object": "client",
                      "id": 76219,
                      "status": "approved",
                      "name": {
                        "object": "name",
                        "title": "dr",
                        "other_title": null,
                        "first_name": "Emmett",
                        "middle_name": "Lathrop",
                        "last_name": "Brown",
                        "name": "Emmett Brown",
                        "full_name": "Emmett Lathrop Brown",
                        "complete_name": "Dr Emmett Lathrop Brown"
                      },
                      "email": "doc@example.com",
                      "landline": null,
                      "mobile": null,
                      "dob": null,
                      "reference": null,
                      "national_insurance_number": "QQ123456C",
                      "is_deletable": true,
                      "deletion_date": "2026-12-21",
                      "created_at": "2022-05-21T14:29:59Z",
                      "updated_at": "2022-05-21T14:29:59Z",
                      "archived_at": null
                    }
                  ],
                  "total": 3,
                  "count": 3,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/clients?page=INTEGER_VALUE&limit=INTEGER_VALUE&search=STRING_VALUE&status=STRING_VALUE&visibility=STRING_VALUE&assignee=INTEGER_VALUE&reference=STRING_VALUE&deletion_date=STRING_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    search: 'STRING_VALUE',\n    status: 'STRING_VALUE',\n    visibility: 'STRING_VALUE',\n    assignee: 'INTEGER_VALUE',\n    reference: 'STRING_VALUE',\n    deletion_date: 'STRING_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients?page=INTEGER_VALUE&limit=INTEGER_VALUE&search=STRING_VALUE&status=STRING_VALUE&visibility=STRING_VALUE&assignee=INTEGER_VALUE&reference=STRING_VALUE&deletion_date=STRING_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'search' => 'STRING_VALUE',\n  'status' => 'STRING_VALUE',\n  'visibility' => 'STRING_VALUE',\n  'assignee' => 'INTEGER_VALUE',\n  'reference' => 'STRING_VALUE',\n  'deletion_date' => 'STRING_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Create a client",
        "description": "Create a new client.",
        "operationId": "post-clients",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Client",
                "required": [
                  "email",
                  "name"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "pending",
                      "approved",
                      "rejected"
                    ]
                  },
                  "name": {
                    "required": [
                      "first_name",
                      "last_name"
                    ]
                  }
                }
              },
              "example": {
                "name": {
                  "title": "mr",
                  "first_name": "Martin",
                  "middle_name": "Seamus",
                  "last_name": "McFly"
                },
                "email": "marty@example.com"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Client"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "oneOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "pending",
                                "approved",
                                "rejected"
                              ]
                            }
                          ]
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "client",
                  "id": 73845,
                  "status": "pending",
                  "name": {
                    "object": "name",
                    "title": "mr",
                    "other_title": null,
                    "first_name": "Martin",
                    "middle_name": "Seamus",
                    "last_name": "McFly",
                    "name": "Martin McFly",
                    "full_name": "Martin Seamus McFly",
                    "complete_name": "Mr Martin Seamus McFly"
                  },
                  "email": "marty@example.com",
                  "landline": null,
                  "mobile": null,
                  "dob": null,
                  "reference": null,
                  "national_insurance_number": "QQ123456C",
                  "is_deletable": true,
                  "deletion_date": "2026-01-14",
                  "created_at": "2022-05-21T14:15:22Z",
                  "updated_at": "2022-05-21T14:15:22Z",
                  "archived_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/clients \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"status\":\"pending\",\"name\":{\"title\":\"miss\",\"other_title\":null,\"first_name\":\"string\",\"middle_name\":null,\"last_name\":\"string\"},\"email\":\"user@example.com\",\"landline\":null,\"mobile\":null,\"dob\":null,\"reference\":null,\"deletion_date\":null}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/clients',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {\n    status: 'pending',\n    name: {\n      title: 'miss',\n      other_title: null,\n      first_name: 'string',\n      middle_name: null,\n      last_name: 'string'\n    },\n    email: 'user@example.com',\n    landline: null,\n    mobile: null,\n    dob: null,\n    reference: null,\n    deletion_date: null\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"status\": \"pending\",\n  \"name\": {\n    \"title\": \"miss\",\n    \"other_title\": null,\n    \"first_name\": \"string\",\n    \"middle_name\": null,\n    \"last_name\": \"string\"\n  },\n  \"email\": \"user@example.com\",\n  \"landline\": null,\n  \"mobile\": null,\n  \"dob\": null,\n  \"reference\": null,\n  \"deletion_date\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/clients\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"status\":\"pending\",\"name\":{\"title\":\"miss\",\"other_title\":null,\"first_name\":\"string\",\"middle_name\":null,\"last_name\":\"string\"},\"email\":\"user@example.com\",\"landline\":null,\"mobile\":null,\"dob\":null,\"reference\":null,\"deletion_date\":null}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique client identifier"
        }
      ],
      "get": {
        "summary": "Retrieve a client",
        "description": "Returns a single client.",
        "operationId": "get-clients-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Client"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "oneOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "pending",
                                "approved",
                                "rejected"
                              ]
                            }
                          ]
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "client",
                  "id": 73845,
                  "status": "pending",
                  "name": {
                    "object": "name",
                    "title": "mr",
                    "other_title": null,
                    "first_name": "Martin",
                    "middle_name": "Seamus",
                    "last_name": "McFly",
                    "name": "Martin McFly",
                    "full_name": "Martin Seamus McFly",
                    "complete_name": "Mr Martin Seamus McFly"
                  },
                  "email": "marty@example.com",
                  "landline": null,
                  "mobile": null,
                  "dob": null,
                  "reference": null,
                  "national_insurance_number": "QQ123456C",
                  "is_deletable": true,
                  "deletion_date": "2026-01-14",
                  "created_at": "2022-05-21T14:15:22Z",
                  "updated_at": "2022-05-21T14:15:22Z",
                  "archived_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "patch": {
        "summary": "Update a client",
        "description": "Update the details of a client.\n\nTo add or update a client's address, refer to **[Replace an address for a client](#operation/put-clients-id-address)**.\n",
        "operationId": "patch-clients-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Client"
                  },
                  {
                    "type": "object",
                    "minProperties": 1,
                    "properties": {
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending",
                          "approved",
                          "rejected"
                        ]
                      }
                    }
                  }
                ]
              },
              "examples": {
                "email": {
                  "summary": "Email",
                  "description": "Update the client's email address.",
                  "value": {
                    "email": "martin.mcfly@example.com"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Client"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "oneOf": [
                            {
                              "type": "null"
                            },
                            {
                              "type": "string",
                              "enum": [
                                "pending",
                                "approved",
                                "rejected"
                              ]
                            }
                          ]
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "client",
                  "id": 73845,
                  "status": null,
                  "name": {
                    "object": "name",
                    "title": "mr",
                    "other_title": null,
                    "first_name": "Martin",
                    "middle_name": "Seamus",
                    "last_name": "McFly",
                    "name": "Martin McFly",
                    "full_name": "Martin Seamus McFly",
                    "complete_name": "Mr Martin Seamus McFly"
                  },
                  "email": "martin.mcfly@example.com",
                  "landline": null,
                  "mobile": null,
                  "dob": null,
                  "reference": null,
                  "national_insurance_number": "QQ123456C",
                  "is_deletable": true,
                  "deletion_date": "2026-01-14",
                  "created_at": "2022-05-21T14:15:22Z",
                  "updated_at": "2022-09-22T17:02:13Z",
                  "archived_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PATCH \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"status\":\"pending\",\"name\":{\"title\":\"miss\",\"other_title\":null,\"first_name\":\"string\",\"middle_name\":null,\"last_name\":\"string\"},\"email\":\"user@example.com\",\"landline\":null,\"mobile\":null,\"dob\":null,\"reference\":null,\"deletion_date\":null}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {\n    status: 'pending',\n    name: {\n      title: 'miss',\n      other_title: null,\n      first_name: 'string',\n      middle_name: null,\n      last_name: 'string'\n    },\n    email: 'user@example.com',\n    landline: null,\n    mobile: null,\n    dob: null,\n    reference: null,\n    deletion_date: null\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"status\": \"pending\",\n  \"name\": {\n    \"title\": \"miss\",\n    \"other_title\": null,\n    \"first_name\": \"string\",\n    \"middle_name\": null,\n    \"last_name\": \"string\"\n  },\n  \"email\": \"user@example.com\",\n  \"landline\": null,\n  \"mobile\": null,\n  \"dob\": null,\n  \"reference\": null,\n  \"deletion_date\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"status\":\"pending\",\"name\":{\"title\":\"miss\",\"other_title\":null,\"first_name\":\"string\",\"middle_name\":null,\"last_name\":\"string\"},\"email\":\"user@example.com\",\"landline\":null,\"mobile\":null,\"dob\":null,\"reference\":null,\"deletion_date\":null}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D');\n$request->setRequestMethod('PATCH');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "delete": {
        "summary": "Delete a client",
        "description": "Delete a client. Can be performed by Admin or Member users only. Clients with requests attached can only be deleted by Admin users.",
        "operationId": "delete-clients-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{id}/address": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique client identifier."
        }
      ],
      "get": {
        "summary": "Retrieve address for a client",
        "description": "Retrieve address for a client.",
        "operationId": "get-clients-id-address",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Address"
                },
                "example": {
                  "object": "address",
                  "unit": "3rd Floor",
                  "house_name": "Citypoint",
                  "house_number": "65",
                  "street_name": "Haymarket Terrace",
                  "second_street": null,
                  "district": null,
                  "city": "Edinburgh",
                  "province": null,
                  "postcode": "EH12 5HD",
                  "country": "GB"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/address \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/address',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/address\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/address');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "put": {
        "summary": "Replace an address for a client",
        "description": "Replace address for a client.\n\nEach country has its own field requirements. Any field can become required if the selected country demands it, most commonly `postcode`.\n",
        "operationId": "put-clients-id-address",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "minProperties": 1,
                "$ref": "#/components/schemas/Address"
              },
              "example": {
                "unit": "3rd Floor",
                "house_name": "Citypoint",
                "house_number": "65",
                "street_name": "Haymarket Terrace",
                "city": "Edinburgh",
                "postcode": "EH12 5HD",
                "country": "GB"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Address"
                },
                "example": {
                  "object": "address",
                  "unit": "3rd Floor",
                  "house_name": "Citypoint",
                  "house_number": "65",
                  "street_name": "Haymarket Terrace",
                  "second_street": null,
                  "district": null,
                  "city": "Edinburgh",
                  "province": null,
                  "postcode": "EH12 5HD",
                  "country": "GB"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/address \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"unit\":null,\"house_name\":null,\"house_number\":null,\"street_name\":null,\"second_street\":null,\"district\":null,\"city\":null,\"province\":null,\"postcode\":null,\"country\":\"AF\"}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/address',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {\n    unit: null,\n    house_name: null,\n    house_number: null,\n    street_name: null,\n    second_street: null,\n    district: null,\n    city: null,\n    province: null,\n    postcode: null,\n    country: 'AF'\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"unit\": null,\n  \"house_name\": null,\n  \"house_number\": null,\n  \"street_name\": null,\n  \"second_street\": null,\n  \"district\": null,\n  \"city\": null,\n  \"province\": null,\n  \"postcode\": null,\n  \"country\": \"AF\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/address\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"unit\":null,\"house_name\":null,\"house_number\":null,\"street_name\":null,\"second_street\":null,\"district\":null,\"city\":null,\"province\":null,\"postcode\":null,\"country\":\"AF\"}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/address');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{id}/assignees": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique client identifier."
        }
      ],
      "get": {
        "summary": "List all assignees for a client",
        "description": "Returns a paginated list of the client's assignees.",
        "operationId": "get-clients-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Assignees"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/TeamMember-2"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "assignee",
                      "id": 34535,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 121,
                        "name": "Lorraine Baines",
                        "email": "lorraine@example.com",
                        "role": "owner"
                      }
                    },
                    {
                      "object": "assignee",
                      "id": 34538,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 472,
                        "name": "Dennis Jones",
                        "email": "dennis@example.com",
                        "role": "member"
                      }
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees?page=INTEGER_VALUE&limit=INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees?page=INTEGER_VALUE&limit=INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Add assignees to a client",
        "description": "Add one or more assignees to a client, merging them with existing assignees.\n\nExisting assignees to the client are not included in the response. Only added assignees to the client will be returned.\n\nTo replace assignees, refer to **[Replace assignees for a client](#operation/put-clients-id-assignees)**.\n",
        "operationId": "post-clients-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Assignees"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Assignee"
                    },
                    {
                      "type": "object",
                      "required": [
                        "type",
                        "team_member"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "team_member": {
                          "type": "integer",
                          "description": "The unique identifier of the team member to be assigned to the client."
                        },
                        "type": {
                          "type": "string",
                          "const": "team_member",
                          "description": "The type of assignee to be assigned to the client."
                        }
                      }
                    }
                  ]
                }
              },
              "example": [
                {
                  "type": "team_member",
                  "team_member": 121
                },
                {
                  "type": "team_member",
                  "team_member": 472
                }
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (one or more assignees to the client have been added)",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "total": {
                          "minimum": 1
                        },
                        "count": {
                          "minimum": 1,
                          "maximum": 100
                        },
                        "limit": {
                          "minimum": 100,
                          "const": 100
                        },
                        "data": {
                          "minItems": 1,
                          "maxItems": 100,
                          "items": {
                            "$ref": "#/components/schemas/TeamMember-2"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "assignee",
                      "id": 34535,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 121,
                        "name": "Lorraine Baines",
                        "email": "lorraine@example.com",
                        "role": "owner"
                      }
                    },
                    {
                      "object": "assignee",
                      "id": 34538,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 472,
                        "name": "Dennis Jones",
                        "email": "dennis@example.com",
                        "role": "member"
                      }
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "has_more": false,
                  "url": "https://id.amiqus.co/api/v2/clients/4672/assignees"
                }
              }
            }
          },
          "204": {
            "description": "No Content (no new assignees to the client have been added)"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema"
                },
                "example": {
                  "errors": [
                    "The submitted value must be an array of assignee objects"
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"type\":\"team_member\",\"team_member\":0}]'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: [{type: 'team_member', team_member: 0}],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify([\n  {\n    \"type\": \"team_member\",\n    \"team_member\": 0\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('[{\"type\":\"team_member\",\"team_member\":0}]');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "put": {
        "summary": "Replace assignees for a client",
        "description": "Replace all existing assignees for a client.\n\nExisting assignees to the client that are included in the request will be part of the updated assignees to the client but they will not be shown in the response. Only added assignees will be returned.\n\nTo add additional assignees without replacing existing, refer to **[Add assignees for a client](#operation/post-clients-id-assignees)**.\n",
        "operationId": "put-clients-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Assignees"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Assignee"
                    },
                    {
                      "type": "object",
                      "required": [
                        "type",
                        "team_member"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "team_member": {
                          "type": "integer",
                          "description": "The unique identifier of the team member to be assigned to the client."
                        },
                        "type": {
                          "type": "string",
                          "const": "team_member",
                          "description": "The type of assignee to be assigned to the client."
                        }
                      }
                    }
                  ]
                }
              },
              "example": [
                {
                  "type": "team_member",
                  "team_member": 121
                },
                {
                  "type": "team_member",
                  "team_member": 523
                }
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (one or more assignees to the client have been replaced)",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "total": {
                          "minimum": 1
                        },
                        "count": {
                          "minimum": 1,
                          "maximum": 100
                        },
                        "limit": {
                          "minimum": 100,
                          "const": 100
                        },
                        "data": {
                          "minItems": 1,
                          "maxItems": 100,
                          "items": {
                            "$ref": "#/components/schemas/TeamMember-2"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "assignee",
                      "id": 34535,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 121,
                        "name": "Lorraine Baines",
                        "email": "lorraine@example.com",
                        "role": "member"
                      }
                    },
                    {
                      "object": "assignee",
                      "id": 34541,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 523,
                        "name": "Clara Clayton",
                        "email": "clara@example.com",
                        "role": "member"
                      }
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "has_more": false,
                  "url": "https://id.amiqus.co/api/v2/clients/4672/assignees"
                }
              }
            }
          },
          "204": {
            "description": "No Content (assignees to the client have been successfully deleted or there are no changes)"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema"
                },
                "example": {
                  "errors": [
                    "The submitted value must be an array of assignee objects"
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"type\":\"team_member\",\"team_member\":0}]'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: [{type: 'team_member', team_member: 0}],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify([\n  {\n    \"type\": \"team_member\",\n    \"team_member\": 0\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('[{\"type\":\"team_member\",\"team_member\":0}]');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "delete": {
        "summary": "Delete assignees for a client",
        "description": "Remove all assignees from a client.\n\nTo delete a single client assignee, see **[Delete an assignee for a client](#operation/delete-clients-clientId-assignees-assigneeId)**.\n",
        "operationId": "delete-clients-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Assignees"
        ],
        "requestBody": {
          "content": {
            "application/json": {}
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/assignees');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{clientId}/assignees/{assigneeId}": {
      "delete": {
        "summary": "Delete an assignee for a client",
        "description": "Remove an assignee from a client.\n\nTo delete all client assignees, see **[Delete assignees for a client](#operation/delete-clients-id-assignees)**.\n",
        "operationId": "delete-clients-clientId-assignees-assigneeId",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Assignees"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unique client identifier."
            }
          },
          {
            "name": "assigneeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unique assignee identifier."
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {}
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Client not found",
                        "Assignee not found"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/clients/%7BclientId%7D/assignees/%7BassigneeId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/clients/%7BclientId%7D/assignees/%7BassigneeId%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/clients/%7BclientId%7D/assignees/%7BassigneeId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7BclientId%7D/assignees/%7BassigneeId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{id}/organisations": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique client identifier"
        }
      ],
      "get": {
        "summary": "List all organisations for a client",
        "description": "Returns a paginated list of a client's organisation memberships. When an organisation is archived all clients associated with the organisation will be removed.\n\nTo retrieve organisations for the team, refer to **[List all organisations](#operation/get-organisations)**.\n",
        "operationId": "get-clients-id-organisations",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Organisations"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "created_at",
                "updated_at",
                "archived_at"
              ]
            },
            "description": "Sort results by organisation name. Results returned in created order by default."
          },
          {
            "name": "order_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Order results in ascending or descending order. Results returned in ascending order by default."
          },
          {
            "name": "expand",
            "description": "Expand each organisation's `assignees` and `clients` relationships. Both are returned as arrays of identifiers by default.",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "assignees",
                  "clients"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Organisation"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "organisation",
                      "id": 3970,
                      "status": "approved",
                      "name": "Probert Publishing",
                      "company_number": "SF12188",
                      "jurisdiction": "gb",
                      "reference": "PP-001",
                      "address": {
                        "object": "address",
                        "unit": null,
                        "house_name": "Probert House",
                        "house_number": null,
                        "street_name": "42 Market Street",
                        "second_street": null,
                        "district": null,
                        "city": "London",
                        "province": null,
                        "postcode": "EC1A 1BB",
                        "country": "GB"
                      },
                      "incorporated_at": "2015-06-01",
                      "assignees": [
                        187,
                        947
                      ],
                      "clients": [
                        73845,
                        73841
                      ],
                      "created_at": "2022-03-15T21:43:16Z",
                      "updated_at": "2022-03-15T21:43:16Z",
                      "archived_at": null
                    }
                  ],
                  "total": 1,
                  "count": 1,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE',\n    expand: 'ARRAY_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE',\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Add organisations for a client",
        "description": "Add the client to one or more organisations, merging them with existing organisation memberships. Existing organisation memberships are not included in the response. Only added organisation memberships will be returned.\n\nTo replace organisations, refer to **[Replace organisations for a client](#operation/put-clients-id-organisations)**.\n\nTo update an organisation's basic details, refer to **[Update an organisation](#operation/patch-organisations-id)**.\n",
        "operationId": "post-clients-id-organisations",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Organisations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "integer",
                  "description": "Unique organisation identifier"
                }
              },
              "example": [
                3970,
                4117
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (one or more organisations to the client have been added)",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Organisation"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "4117 pre-exists": {
                    "description": "Membership to 4117 already existed before the request.",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "organisation",
                          "id": 3970,
                          "status": "approved",
                          "name": "Probert Publishing",
                          "company_number": "SF12188",
                          "jurisdiction": "gb",
                          "reference": "PP-001",
                          "address": {
                            "object": "address",
                            "unit": null,
                            "house_name": "Probert House",
                            "house_number": null,
                            "street_name": "42 Market Street",
                            "second_street": null,
                            "district": null,
                            "city": "London",
                            "province": null,
                            "postcode": "EC1A 1BB",
                            "country": "GB"
                          },
                          "incorporated_at": "2015-06-01",
                          "assignees": [
                            187,
                            947
                          ],
                          "clients": [
                            73845,
                            73841
                          ],
                          "created_at": "2022-03-15T21:43:16Z",
                          "updated_at": "2022-03-15T21:43:16Z",
                          "archived_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "has_more": false,
                      "url": "https://id.amiqus.co/api/v2/clients/73845/organisations"
                    }
                  },
                  "new": {
                    "description": "Membership to 3970 and 4117 did not exist before the request.",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "organisation",
                          "id": 3970,
                          "status": "approved",
                          "name": "Probert Publishing",
                          "company_number": "SF12188",
                          "jurisdiction": "gb",
                          "reference": "PP-001",
                          "address": {
                            "object": "address",
                            "unit": null,
                            "house_name": "Probert House",
                            "house_number": null,
                            "street_name": "42 Market Street",
                            "second_street": null,
                            "district": null,
                            "city": "London",
                            "province": null,
                            "postcode": "EC1A 1BB",
                            "country": "GB"
                          },
                          "incorporated_at": "2015-06-01",
                          "assignees": [
                            187,
                            947
                          ],
                          "clients": [
                            73845,
                            73841
                          ],
                          "created_at": "2022-03-15T21:43:16Z",
                          "updated_at": "2022-03-15T21:43:16Z",
                          "archived_at": null
                        },
                        {
                          "object": "organisation",
                          "id": 4117,
                          "status": null,
                          "name": "CusCo",
                          "company_number": "11249",
                          "jurisdiction": "us_ca",
                          "reference": null,
                          "address": null,
                          "incorporated_at": null,
                          "assignees": null,
                          "clients": [
                            73845
                          ],
                          "created_at": "2022-03-20T13:12:41Z",
                          "updated_at": "2022-03-20T13:12:41Z",
                          "archived_at": null
                        }
                      ],
                      "total": 2,
                      "count": 2,
                      "limit": 100,
                      "has_more": false,
                      "url": "https://id.amiqus.co/api/v2/clients/73845/organisations"
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "No Content (no new organisations to the client have been added)"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema"
                },
                "example": {
                  "errors": [
                    "At least one organisation is required"
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[0]'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: [0],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify([\n  0\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('[0]');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "put": {
        "summary": "Replace organisations for a client",
        "description": "Replaces a client's organisation memberships. Existing organisation memberships that are included in the request will be part of the updated organisation memberships, but they will not be shown in the response. Only added organisations will be returned.\n\nTo add additional organisations without replacing existing, refer to **[Add organisations for a client](#operation/post-clients-id-organisations)**.\n",
        "operationId": "put-clients-id-organisations",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Organisations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "integer",
                  "description": "Unique organisation identifier"
                }
              },
              "example": [
                3970,
                4117
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (one or more organisations to the client have been replaced)",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Organisation"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "organisation",
                      "id": 3970,
                      "status": "approved",
                      "name": "Probert Publishing",
                      "company_number": "SF12188",
                      "jurisdiction": "gb",
                      "reference": "PP-001",
                      "address": {
                        "object": "address",
                        "unit": null,
                        "house_name": "Probert House",
                        "house_number": null,
                        "street_name": "42 Market Street",
                        "second_street": null,
                        "district": null,
                        "city": "London",
                        "province": null,
                        "postcode": "EC1A 1BB",
                        "country": "GB"
                      },
                      "incorporated_at": "2015-06-01",
                      "assignees": [
                        187,
                        947
                      ],
                      "clients": [
                        73845,
                        73841
                      ],
                      "created_at": "2022-03-15T21:43:16Z",
                      "updated_at": "2022-03-15T21:43:16Z",
                      "archived_at": null
                    },
                    {
                      "object": "organisation",
                      "id": 4117,
                      "status": null,
                      "name": "CusCo",
                      "company_number": "11249",
                      "jurisdiction": "us_ca",
                      "reference": null,
                      "address": null,
                      "incorporated_at": null,
                      "assignees": null,
                      "clients": [
                        73845
                      ],
                      "created_at": "2022-03-20T13:12:41Z",
                      "updated_at": "2022-03-20T13:12:41Z",
                      "archived_at": null
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "has_more": false,
                  "url": "https://id.amiqus.co/api/v2/clients/73845/organisations"
                }
              }
            }
          },
          "204": {
            "description": "No Content (organisations to the client have been successfully deleted or there are no changes)"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema"
                },
                "example": {
                  "errors": [
                    "At least one organisation is required"
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[0]'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: [0],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify([\n  0\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('[0]');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "delete": {
        "summary": "Delete organisations for a client",
        "description": "Delete all of a client's organisation memberships.",
        "operationId": "delete-clients-id-organisations",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Organisations"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/organisations');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{clientId}/organisations/{organisationId}": {
      "delete": {
        "summary": "Delete organisation for a client",
        "description": "Delete a single client organisation membership.",
        "operationId": "get-clients-clientId-organisations-organisationId",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Organisations"
        ],
        "parameters": [
          {
            "name": "clientId",
            "description": "Unique client identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "organisationId",
            "description": "Unique organisation identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Client not found",
                        "Organisation not found"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/clients/%7BclientId%7D/organisations/%7BorganisationId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/clients/%7BclientId%7D/organisations/%7BorganisationId%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/clients/%7BclientId%7D/organisations/%7BorganisationId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7BclientId%7D/organisations/%7BorganisationId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{id}/forms": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId"
        }
      ],
      "get": {
        "summary": "List all forms for a client",
        "description": "List all forms for a client.",
        "operationId": "get-clients-id-forms",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client",
                  "record"
                ]
              }
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by internal client forms (`internal`), or requested for completion by the client (`requested`). Includes both by default.",
            "schema": {
              "type": "string",
              "enum": [
                "internal",
                "requested"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/ClientForm"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "client_form",
                      "id": 37344,
                      "reference": "2ddb20b8-e0e3-45ae-a638-42610b990a6a",
                      "type": "requested",
                      "client": 73212,
                      "record": 87564,
                      "name": "New starter form",
                      "description": null,
                      "instructions": null,
                      "fields": [
                        {
                          "id": "1",
                          "type": "section",
                          "label": "",
                          "fields": [
                            "2"
                          ]
                        },
                        {
                          "id": "2",
                          "type": "section",
                          "label": "Onboarding",
                          "fields": [
                            "3",
                            "4"
                          ]
                        },
                        {
                          "id": "3",
                          "type": "text",
                          "label": "Job title",
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": null
                        },
                        {
                          "id": "4",
                          "type": "radio",
                          "label": {
                            "value": "Contract type",
                            "options": [
                              "Full-time",
                              "Part-time"
                            ]
                          },
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": null
                        }
                      ],
                      "version": 1,
                      "created_at": "2022-10-11T13:41:38Z",
                      "updated_at": "2022-10-11T13:41:38Z",
                      "completed_at": null,
                      "archived_at": null
                    },
                    {
                      "object": "client_form",
                      "id": 37523,
                      "reference": "4fdb5ab5-f83e-4b52-926b-340e880bb030",
                      "type": "internal",
                      "client": 73212,
                      "record": null,
                      "name": "Onboarding checklist",
                      "description": "Checklist for all new employees.",
                      "instructions": null,
                      "fields": [
                        {
                          "id": "1",
                          "type": "section",
                          "label": "",
                          "fields": [
                            "2",
                            "3"
                          ]
                        },
                        {
                          "id": "2",
                          "type": "radio",
                          "label": {
                            "value": "Location",
                            "options": [
                              "Office",
                              "Remote",
                              "Hybrid"
                            ]
                          },
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": "Remote"
                        },
                        {
                          "id": "3",
                          "type": "radio",
                          "label": {
                            "value": "Department",
                            "options": [
                              "Sales",
                              "Marketing",
                              "Legal",
                              "Admin"
                            ]
                          },
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": "Admin"
                        }
                      ],
                      "version": 2,
                      "created_at": "2022-11-02T15:55:38Z",
                      "updated_at": "2022-11-05T20:02:06Z",
                      "completed_at": null,
                      "archived_at": null
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=ARRAY_VALUE&type=STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    expand: 'ARRAY_VALUE',\n    type: 'STRING_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=ARRAY_VALUE&type=STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'expand' => 'ARRAY_VALUE',\n  'type' => 'STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{id}/forms/{reference}": {
      "get": {
        "summary": "Retrieve a form for a client",
        "description": "Retrieve a form for a client.",
        "operationId": "get-clients-id-forms-reference",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/resourceId"
          },
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientForm"
                },
                "examples": {
                  "requested": {
                    "summary": "Requested form",
                    "description": "A form for completion by the client",
                    "value": {
                      "object": "client_form",
                      "id": 37344,
                      "reference": "2ddb20b8-e0e3-45ae-a638-42610b990a6a",
                      "type": "requested",
                      "client": 73212,
                      "record": 87564,
                      "name": "New starter form",
                      "description": null,
                      "instructions": null,
                      "fields": [
                        {
                          "id": "1",
                          "type": "section",
                          "label": "",
                          "fields": [
                            "2"
                          ]
                        },
                        {
                          "id": "2",
                          "type": "section",
                          "label": "Onboarding",
                          "fields": [
                            "3",
                            "4"
                          ]
                        },
                        {
                          "id": "3",
                          "type": "text",
                          "label": "Job title",
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": null
                        },
                        {
                          "id": "4",
                          "type": "radio",
                          "label": {
                            "value": "Contract type",
                            "options": [
                              "Full-time",
                              "Part-time"
                            ]
                          },
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": null
                        }
                      ],
                      "version": 1,
                      "created_at": "2022-10-11T13:41:38Z",
                      "updated_at": "2022-10-11T13:41:38Z",
                      "completed_at": null,
                      "archived_at": null
                    }
                  },
                  "internal": {
                    "summary": "Internal form",
                    "description": "A form for internal data collection",
                    "value": {
                      "object": "client_form",
                      "id": 37523,
                      "reference": "4fdb5ab5-f83e-4b52-926b-340e880bb030",
                      "type": "internal",
                      "client": 73212,
                      "record": null,
                      "name": "Onboarding checklist",
                      "description": "Checklist for all new employees.",
                      "instructions": null,
                      "fields": [
                        {
                          "id": "1",
                          "type": "section",
                          "label": "",
                          "fields": [
                            "2",
                            "3"
                          ]
                        },
                        {
                          "id": "2",
                          "type": "radio",
                          "label": {
                            "value": "Location",
                            "options": [
                              "Office",
                              "Remote",
                              "Hybrid"
                            ]
                          },
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": "Remote"
                        },
                        {
                          "id": "3",
                          "type": "radio",
                          "label": {
                            "value": "Department",
                            "options": [
                              "Sales",
                              "Marketing",
                              "Legal",
                              "Admin"
                            ]
                          },
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": "Admin"
                        }
                      ],
                      "version": 2,
                      "created_at": "2022-11-02T15:55:38Z",
                      "updated_at": "2022-11-05T20:02:06Z",
                      "completed_at": null,
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms/%7Breference%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms/%7Breference%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms/%7Breference%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms/%7Breference%7D');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{id}/forms/{reference}/download": {
      "get": {
        "summary": "Download a form for a client",
        "description": "Download a form for a client.",
        "operationId": "get-clients-id-forms-reference-download",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/resourceId"
          },
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms/%7Breference%7D/download \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms/%7Breference%7D/download',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms/%7Breference%7D/download\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/forms/%7Breference%7D/download');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{id}/records": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId"
        }
      ],
      "get": {
        "summary": "List all records for a client",
        "description": "List all records for a client.",
        "operationId": "get-clients-id-records",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Record"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "record",
                      "id": 983434,
                      "status": "pending",
                      "email": "marty@example.com",
                      "steps": [
                        {
                          "object": "step",
                          "id": 2,
                          "type": "check.photo_id",
                          "preferences": {
                            "report_type": "standard",
                            "face": true,
                            "liveness": true,
                            "facial_similarity": false,
                            "live_document": false,
                            "docs": [
                              "passport",
                              "driving_licence",
                              "national_id"
                            ],
                            "issuing_countries": null,
                            "right_to_work": null
                          },
                          "check": 82342,
                          "cost": 1,
                          "completed_at": null
                        },
                        {
                          "object": "step",
                          "id": 3,
                          "type": "document.request",
                          "preferences": {
                            "title": "Utility bill",
                            "instructions": "A utility bill dated within the last three months."
                          },
                          "document": 23123,
                          "cost": 0,
                          "completed_at": null
                        },
                        {
                          "object": "step",
                          "id": 4,
                          "type": "form",
                          "form": "4bd9bfca-e61d-4a68-99b3-ca61a02f650f",
                          "cost": 0,
                          "completed_at": null
                        }
                      ],
                      "client": 73845,
                      "name": {
                        "object": "name",
                        "title": "mr",
                        "other_title": null,
                        "first_name": "Martin",
                        "middle_name": "Seamus",
                        "last_name": "McFly",
                        "name": "Martin McFly",
                        "full_name": "Martin Seamus McFly",
                        "complete_name": "Mr Martin Seamus McFly"
                      },
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z",
                      "archived_at": null,
                      "is_declaration_required": false,
                      "declaration_confirmed_at": null
                    }
                  ],
                  "total": 1,
                  "count": 1,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/records?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/records',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE', expand: 'ARRAY_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/records?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/records');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{id}/files": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId"
        }
      ],
      "get": {
        "summary": "List all files for a client",
        "description": "List all files for a client.",
        "operationId": "get-clients-id-files",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Files"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Sort results by file name, date of upload or file expiry date. Results returned in ID order by default.",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "created_at",
                "expires_at"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/order_by"
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "source",
                  "created_by"
                ]
              }
            }
          },
          {
            "name": "source",
            "description": "**Note:** `form` is deprecated, use `client_form` instead\n",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "check",
                "client",
                "client_form",
                "form",
                "client_document",
                "record_document"
              ]
            }
          },
          {
            "name": "source_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "photo_id",
                "reference",
                "banking_information",
                "employment_referencing",
                "requested",
                "sent",
                "returned"
              ]
            },
            "description": "Some sources can be filtered by type:\n\n- **check**:\n   - `photo_id`\n   - `reference`\n   - `banking_information`\n   - `employment_referencing`\n- **record_document**\n  - `requested`, `sent`, `returned`\n\n**Note:** to filter by source type, the `source` parameter must also be provided.\n"
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search for client files by name. Search is case-insensitive and fuzzy.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/ClientFile"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "internal": {
                    "summary": "Internal",
                    "description": "An internal file attached directly to the client.",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "client_file",
                          "id": 31788,
                          "type": "internal",
                          "source": {
                            "id": 31788,
                            "type": "client"
                          },
                          "name": "73db4d13-6c1b-40b1-94fc-2cf6d7ac22d2.pdf",
                          "attachment": {
                            "object": "attachment",
                            "id": 31782,
                            "name": "73db4d13-6c1b-40b1-94fc-2cf6d7ac22d2.pdf",
                            "original": "NDA-final.pdf",
                            "type": "application/pdf",
                            "size": 16053,
                            "av_status": "clean",
                            "created_at": "2019-08-24T14:15:22Z",
                            "updated_at": "2019-08-24T14:15:22Z"
                          },
                          "created_by": {
                            "object": "team_member",
                            "id": 121,
                            "name": "Lorraine Baines",
                            "email": "lorraine@example.com",
                            "role": "owner"
                          },
                          "is_deletable": true,
                          "expires_at": "2027-08-24T23:59:59Z",
                          "created_at": "2019-08-24T14:15:22Z",
                          "updated_at": "2019-08-24T14:15:22Z",
                          "redacted_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "record": {
                    "summary": "Record documents",
                    "description": "Files associated with a sent and returned document.",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "client_file",
                          "id": 31431,
                          "type": "sent",
                          "source": {
                            "id": 133144,
                            "type": "record_document"
                          },
                          "name": "186a4641-337a-4a1f-86ba-0bc6d81a3ed4.pdf",
                          "attachment": {
                            "object": "attachment",
                            "id": 31431,
                            "name": "186a4641-337a-4a1f-86ba-0bc6d81a3ed4.pdf",
                            "original": "NDA-final.pdf",
                            "type": "application/pdf",
                            "size": 265434,
                            "av_status": "clean",
                            "created_at": "2020-03-11T12:43:55Z",
                            "updated_at": "2020-03-11T12:43:55Z"
                          },
                          "created_by": {
                            "object": "team_member",
                            "id": 472,
                            "name": "Dennis Jones",
                            "email": "dennis@example.com",
                            "role": "member"
                          },
                          "is_deletable": false,
                          "expires_at": "2027-08-24T23:59:59Z",
                          "created_at": "2020-03-11T12:43:55Z",
                          "updated_at": "2020-03-11T12:43:55Z",
                          "redacted_at": "2025-11-03T10:43:22Z"
                        },
                        {
                          "object": "client_file",
                          "id": 31432,
                          "type": "received",
                          "source": {
                            "id": 133145,
                            "type": "record_document"
                          },
                          "name": "cd349cd8-28e9-4e71-bc46-e99726b7b914.pdf",
                          "attachment": {
                            "object": "attachment",
                            "id": 31432,
                            "name": "cd349cd8-28e9-4e71-bc46-e99726b7b914.pdf",
                            "original": "NDA-final(signed).pdf",
                            "type": "application/pdf",
                            "size": 278311,
                            "av_status": "clean",
                            "created_at": "2020-03-12T06:31:46Z",
                            "updated_at": "2020-03-12T06:31:46Z"
                          },
                          "created_by": {
                            "object": "client",
                            "id": 73823,
                            "status": "pending",
                            "name": {
                              "object": "name",
                              "title": "mr",
                              "other_title": null,
                              "first_name": "Martin",
                              "middle_name": "Seamus",
                              "last_name": "McFly",
                              "name": "Martin McFly",
                              "full_name": "Martin Seamus McFly",
                              "complete_name": "Mr Martin Seamus McFly"
                            },
                            "email": "marty@example.com",
                            "landline": null,
                            "mobile": null,
                            "dob": "1968-06-12",
                            "reference": null,
                            "national_insurance_number": null,
                            "is_deletable": true,
                            "deletion_date": "2026-01-14",
                            "created_at": "2022-05-21T14:15:22Z",
                            "updated_at": "2022-05-21T14:15:22Z",
                            "archived_at": null
                          },
                          "is_deletable": false,
                          "expires_at": null,
                          "created_at": "2020-03-12T06:31:46Z",
                          "updated_at": "2020-03-12T06:31:46Z",
                          "redacted_at": null
                        }
                      ],
                      "total": 2,
                      "count": 2,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/files?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE&source=STRING_VALUE&source_type=STRING_VALUE&search=STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/files',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE',\n    expand: 'ARRAY_VALUE',\n    source: 'STRING_VALUE',\n    source_type: 'STRING_VALUE',\n    search: 'STRING_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/files?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE&source=STRING_VALUE&source_type=STRING_VALUE&search=STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/files');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE',\n  'expand' => 'ARRAY_VALUE',\n  'source' => 'STRING_VALUE',\n  'source_type' => 'STRING_VALUE',\n  'search' => 'STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Create a file for a client",
        "description": "Create a file for a client.",
        "operationId": "post-clients-id-files",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Files"
        ],
        "requestBody": {
          "description": "- **Basic** creates a new client file from an uploaded attachment.\n- **Document template** creates a new `requested` Client Document for a document template.\n",
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "title": "Basic",
                    "type": "object",
                    "required": [
                      "attachment"
                    ],
                    "properties": {
                      "attachment": {
                        "type": "integer",
                        "description": "The unique identifier of an attachment.\n\nTo create an attachment, refer to the **[Create an attachment](#operation/post-attachments)**.\n"
                      },
                      "name": {
                        "$ref": "#/components/schemas/name"
                      },
                      "expires_at": {
                        "$ref": "#/components/schemas/expires_at"
                      }
                    }
                  },
                  {
                    "title": "Document template",
                    "type": "object",
                    "required": [
                      "attachment",
                      "template"
                    ],
                    "properties": {
                      "attachment": {
                        "type": "integer",
                        "description": "The unique identifier of an attachment.\n\nTo create an attachment, refer to the **[Create an attachment](#operation/post-attachments)**.\n"
                      },
                      "template": {
                        "type": "integer",
                        "description": "The unique identifier of a document template.\n\nCreate a client file for an existing [document template](#operation/get-templates-documents).\n"
                      },
                      "name": {
                        "$ref": "#/components/schemas/name"
                      },
                      "expires_at": {
                        "$ref": "#/components/schemas/expires_at"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "manual": {
                  "summary": "Manual",
                  "value": {
                    "attachment": 31782,
                    "name": "NDA-final",
                    "expires_at": "2025-01-01T23:59:59Z"
                  }
                },
                "requested": {
                  "summary": "Requested",
                  "value": {
                    "attachment": 104,
                    "template": 15478
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientFile"
                },
                "examples": {
                  "external": {
                    "value": {
                      "object": "client_file",
                      "id": 31788,
                      "type": "internal",
                      "source": {
                        "id": 31788,
                        "type": "client"
                      },
                      "name": "NDA-final",
                      "attachment": {
                        "object": "attachment",
                        "id": 31782,
                        "name": "73db4d13-6c1b-40b1-94fc-2cf6d7ac22d2.pdf",
                        "original": "NDA-final.pdf",
                        "type": "application/pdf",
                        "size": 16053,
                        "av_status": "clean",
                        "created_at": "2019-08-24T14:15:22Z",
                        "updated_at": "2019-08-24T14:15:22Z"
                      },
                      "created_by": {
                        "id": 121,
                        "type": "team_member"
                      },
                      "is_deletable": true,
                      "expires_at": "2025-01-01T23:59:59Z",
                      "created_at": "2019-08-24T14:15:22Z",
                      "updated_at": "2019-08-24T14:15:22Z",
                      "redacted_at": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/clients/%7Bid%7D/files \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"attachment\":0,\"name\":\"string\",\"expires_at\":null}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/files',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {attachment: 0, name: 'string', expires_at: null},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"attachment\": 0,\n  \"name\": \"string\",\n  \"expires_at\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/files\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"attachment\":0,\"name\":\"string\",\"expires_at\":null}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/files');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{clientId}/files/{fileId}": {
      "delete": {
        "summary": "Delete a file for a client",
        "description": "Delete a file for a client.",
        "operationId": "delete-clients-clientId-files-fileId",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Files"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unique client identifier."
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unique file identifier."
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Client not found",
                        "File not found"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/clients/%7BclientId%7D/files/%7BfileId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/clients/%7BclientId%7D/files/%7BfileId%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/clients/%7BclientId%7D/files/%7BfileId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7BclientId%7D/files/%7BfileId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{clientId}/files/{fileId}/download": {
      "get": {
        "summary": "Download a file for a client",
        "description": "Download a file for a client.",
        "operationId": "get-clients-clientId-files-fileId-download",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Client Files"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Client not found",
                        "File not found"
                      ]
                    }
                  }
                }
              }
            }
          },
          "410": {
            "$ref": "#/components/responses/410-attachment"
          },
          "423": {
            "$ref": "#/components/responses/423-attachment"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/clients/%7BclientId%7D/files/%7BfileId%7D/download \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7BclientId%7D/files/%7BfileId%7D/download',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7BclientId%7D/files/%7BfileId%7D/download\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7BclientId%7D/files/%7BfileId%7D/download');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{id}/corrections": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId"
        }
      ],
      "get": {
        "summary": "List all corrections for a client",
        "description": "Retrieve a paginated list of corrections for a client",
        "operationId": "get-clients-id-corrections",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number of items to return.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of items to return per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Sort corrections by creation date.",
            "schema": {
              "type": "string",
              "enum": [
                "created_at"
              ]
            }
          },
          {
            "name": "order_by",
            "in": "query",
            "description": "Order results in ascending or descending order. Results returned in ascending order by default",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client",
                  "record"
                ]
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter corrections by status.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "accepted",
                "rejected"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/ClientCorrection"
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "client_correction",
                      "id": 73823,
                      "client": {
                        "object": "client",
                        "id": 73823,
                        "status": "pending",
                        "name": {
                          "object": "name",
                          "title": "mr",
                          "other_title": null,
                          "first_name": "Martin",
                          "middle_name": "Seamus",
                          "last_name": "McFly",
                          "name": "Martin McFly",
                          "full_name": "Martin Seamus McFly",
                          "complete_name": "Mr Martin Seamus McFly"
                        },
                        "email": "marty@example.com",
                        "landline": null,
                        "mobile": null,
                        "dob": "1968-06-12",
                        "reference": null,
                        "national_insurance_number": null,
                        "is_deletable": true,
                        "deletion_date": "2026-01-14",
                        "created_at": "2022-05-21T14:15:22Z",
                        "updated_at": "2022-05-21T14:15:22Z",
                        "archived_at": null
                      },
                      "record": 915732,
                      "status": "pending",
                      "correction": {
                        "first_name": "Marty",
                        "middle_name": "Seamus",
                        "last_name": "McFly"
                      },
                      "created_at": "2022-05-22T11:08:31Z",
                      "updated_at": "2022-05-22T11:08:31Z"
                    }
                  ],
                  "total": 1,
                  "count": 1,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Client not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/corrections?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE&status=STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/clients/%7Bid%7D/corrections',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE',\n    expand: 'ARRAY_VALUE',\n    status: 'STRING_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/clients/%7Bid%7D/corrections?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE&status=STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7Bid%7D/corrections');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE',\n  'expand' => 'ARRAY_VALUE',\n  'status' => 'STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/clients/{clientId}/corrections/{correctionId}": {
      "patch": {
        "summary": "Update a correction for a client",
        "description": "Accept, reject and modify a name correction proposed by a client.",
        "operationId": "patch-clients-clientId-corrections-correctionId",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unique client identifier."
            }
          },
          {
            "name": "correctionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Unique client correction identifier."
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "status"
                ],
                "oneOf": [
                  {
                    "type": "object",
                    "title": "Accepted",
                    "properties": {
                      "status": {
                        "type": "string",
                        "const": "accepted"
                      },
                      "correction": {
                        "type": "object",
                        "minProperties": 1,
                        "properties": {
                          "first_name": {
                            "type": "string"
                          },
                          "middle_name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "last_name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  },
                  {
                    "type": "object",
                    "title": "Rejected",
                    "properties": {
                      "status": {
                        "type": "string",
                        "const": "rejected"
                      }
                    }
                  }
                ]
              },
              "examples": {
                "accepted": {
                  "summary": "Accepted",
                  "description": "Accept the client correction as provided.",
                  "value": {
                    "status": "accepted"
                  }
                },
                "accepted_with_correction": {
                  "summary": "Accepted with modification",
                  "description": "Accept the client correction with a modification to the first name.",
                  "value": {
                    "status": "accepted",
                    "correction": {
                      "first_name": "Martin"
                    }
                  }
                },
                "accepted_with_nullable": {
                  "summary": "Accepted with removal",
                  "description": "Accept the client correction with a modification to the last name and removal of the suggested middle name.",
                  "value": {
                    "status": "accepted",
                    "correction": {
                      "middle_name": null,
                      "last_name": "McFly"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientCorrection"
                },
                "example": {
                  "object": "client_correction",
                  "id": 34234,
                  "client": 73823,
                  "record": 915732,
                  "status": "accepted",
                  "correction": {
                    "first_name": "Marty",
                    "middle_name": "Seamus",
                    "last_name": "McFly"
                  },
                  "created_at": "2022-05-22T11:08:31Z",
                  "updated_at": "2022-05-23T08:53:21Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "enum": [
                        "Client not found",
                        "Correction not found"
                      ]
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "default": "Correction has already been completed"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PATCH \\\n  --url https://id.amiqus.co/api/v2/clients/%7BclientId%7D/corrections/%7BcorrectionId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"status\":\"accepted\",\"correction\":{\"first_name\":\"string\",\"middle_name\":\"string\",\"last_name\":\"string\"}}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://id.amiqus.co/api/v2/clients/%7BclientId%7D/corrections/%7BcorrectionId%7D',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {\n    status: 'accepted',\n    correction: {first_name: 'string', middle_name: 'string', last_name: 'string'}\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"status\": \"accepted\",\n  \"correction\": {\n    \"first_name\": \"string\",\n    \"middle_name\": \"string\",\n    \"last_name\": \"string\"\n  }\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://id.amiqus.co/api/v2/clients/%7BclientId%7D/corrections/%7BcorrectionId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"status\":\"accepted\",\"correction\":{\"first_name\":\"string\",\"middle_name\":\"string\",\"last_name\":\"string\"}}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/clients/%7BclientId%7D/corrections/%7BcorrectionId%7D');\n$request->setRequestMethod('PATCH');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/credits": {
      "get": {
        "summary": "List all credit history",
        "description": "Return a list of credit usage history",
        "operationId": "get-credits",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Your Team"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "created_at"
              ],
              "description": "Sort results by specified item. Results returned in created order by default."
            }
          },
          {
            "name": "order_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Order results in ascending or descending order. Results returned in ascending order by default."
          },
          {
            "name": "expand",
            "in": "query",
            "description": "Expand the causer property to include details about the event that caused the credit history entry.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "causer"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/CreditHistory"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "credit_history",
                          "id": 1,
                          "credits": 244,
                          "reason": "Monthly topup",
                          "created_at": "2024-09-18T12:42:23Z",
                          "causer": {
                            "id": 72343,
                            "type": "user"
                          }
                        },
                        {
                          "object": "credit_history",
                          "id": 2,
                          "credits": -1,
                          "reason": null,
                          "created_at": "2024-09-23T12:56:39Z",
                          "causer": {
                            "id": 1,
                            "type": "check"
                          }
                        }
                      ],
                      "total": 2,
                      "count": 2,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "causer_expanded": {
                    "summary": "Causer expanded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "credit_history",
                          "id": 1,
                          "credits": 244,
                          "reason": "Monthly topup",
                          "created_at": "2024-09-18T12:42:23Z",
                          "causer": {
                            "id": 72343,
                            "type": "user"
                          }
                        },
                        {
                          "object": "credit_history",
                          "id": 2,
                          "credits": -1,
                          "reason": null,
                          "created_at": "2024-09-23T12:56:39Z",
                          "causer": {
                            "object": "check",
                            "id": 82342,
                            "type": "identity",
                            "record": 983434,
                            "status": "pending",
                            "allow_replay": true,
                            "allow_cancel": true,
                            "requires_consent": true,
                            "created_at": "2022-05-22T08:22:12Z",
                            "updated_at": "2022-05-22T08:22:12Z"
                          }
                        }
                      ],
                      "total": 2,
                      "count": 2,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "500": {
            "$ref": "#/components/responses/500"
          },
          "503": {
            "description": "Service Unavailable"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/credits?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/credits',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE',\n    expand: 'ARRAY_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/credits?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/credits');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE',\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/labels/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "The unique label identifier."
        }
      ]
    },
    "/organisations": {
      "get": {
        "summary": "List all organisations",
        "description": "Returns a paginated list of the team's organisations.\n\nTo retrieve a specific client's organisations, refer to **[List all organisations for a client](#operation/get-clients-id-organisations)**.\n",
        "operationId": "get-organisations",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Organisations"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "description": "Search for organisations by name, company number and reference. Search is case-insensitive and fuzzy.",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignee",
            "description": "Filter organisations assigned to team member user ID or use `false` to filter unassigned organisations only. Both assigned and unassigned organisations are returned by default.",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "integer",
                  "description": "Filter organisations assigned to team member user ID"
                },
                {
                  "type": "boolean",
                  "enum": [
                    false
                  ],
                  "description": "Filter unassigned organisations"
                }
              ]
            },
            "required": false
          },
          {
            "name": "sort_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "reference",
                "created_at",
                "updated_at",
                "archived_at"
              ]
            },
            "description": "Sort results by organisation name, reference or date. Results returned in created order by default."
          },
          {
            "name": "order_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Order results in ascending or descending order. Results returned in ascending order by default."
          },
          {
            "name": "visibility",
            "description": "Filter organisations by their visibility state. Both active and archived organisations are returned by default.",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "expand",
            "description": "Expand the organisation's `assignees` and `clients` relationships. Both are returned as arrays of identifiers by default.",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "assignees",
                  "clients"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Organisation"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "organisation",
                          "id": 3970,
                          "status": "approved",
                          "name": "Probert Publishing",
                          "company_number": "SF12188",
                          "jurisdiction": "gb",
                          "reference": "PP-001",
                          "address": {
                            "object": "address",
                            "unit": null,
                            "house_name": "Probert House",
                            "house_number": null,
                            "street_name": "42 Market Street",
                            "second_street": null,
                            "district": null,
                            "city": "London",
                            "province": null,
                            "postcode": "EC1A 1BB",
                            "country": "GB"
                          },
                          "incorporated_at": "2015-06-01",
                          "assignees": [
                            187,
                            947
                          ],
                          "clients": [
                            73845,
                            73841
                          ],
                          "created_at": "2022-03-15T21:43:16Z",
                          "updated_at": "2022-03-15T21:43:16Z",
                          "archived_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "assignees_expanded": {
                    "summary": "Assignees expanded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "organisation",
                          "id": 3970,
                          "status": "approved",
                          "name": "Probert Publishing",
                          "company_number": "SF12188",
                          "jurisdiction": "gb",
                          "reference": "PP-001",
                          "address": {
                            "object": "address",
                            "unit": null,
                            "house_name": "Probert House",
                            "house_number": null,
                            "street_name": "42 Market Street",
                            "second_street": null,
                            "district": null,
                            "city": "London",
                            "province": null,
                            "postcode": "EC1A 1BB",
                            "country": "GB"
                          },
                          "incorporated_at": "2015-06-01",
                          "assignees": {
                            "object": "list",
                            "data": [
                              {
                                "object": "team_member",
                                "id": 187,
                                "name": "Ross Green",
                                "email": "ross.green@example.com",
                                "role": "member"
                              },
                              {
                                "object": "team_member",
                                "id": 947,
                                "name": "Wayne Murray",
                                "email": "wayne.murray@example.com",
                                "role": "read-only"
                              }
                            ],
                            "total": 2,
                            "count": 2,
                            "limit": 25,
                            "has_more": false,
                            "url": "https://id.amiqus.co/api/v2/organisations/3970/assignees"
                          },
                          "clients": [
                            73845,
                            73841
                          ],
                          "created_at": "2022-03-15T21:43:16Z",
                          "updated_at": "2022-03-15T21:43:16Z",
                          "archived_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "clients_expanded": {
                    "summary": "Clients expanded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "organisation",
                          "id": 3970,
                          "status": "approved",
                          "name": "Probert Publishing",
                          "company_number": "SF12188",
                          "jurisdiction": "gb",
                          "reference": "PP-001",
                          "address": {
                            "object": "address",
                            "unit": null,
                            "house_name": "Probert House",
                            "house_number": null,
                            "street_name": "42 Market Street",
                            "second_street": null,
                            "district": null,
                            "city": "London",
                            "province": null,
                            "postcode": "EC1A 1BB",
                            "country": "GB"
                          },
                          "incorporated_at": "2015-06-01",
                          "assignees": [
                            187,
                            947
                          ],
                          "clients": {
                            "object": "list",
                            "data": [
                              {
                                "object": "client",
                                "id": 73845,
                                "status": "pending",
                                "name": {
                                  "object": "name",
                                  "title": "mr",
                                  "other_title": null,
                                  "first_name": "Martin",
                                  "middle_name": "Seamus",
                                  "last_name": "McFly",
                                  "name": "Martin McFly",
                                  "full_name": "Martin Seamus McFly",
                                  "complete_name": "Mr Martin Seamus McFly"
                                },
                                "email": "marty@example.com",
                                "landline": null,
                                "mobile": null,
                                "dob": null,
                                "reference": null,
                                "national_insurance_number": null,
                                "is_deletable": true,
                                "deletion_date": "2026-01-14",
                                "created_at": "2022-05-21T14:15:22Z",
                                "updated_at": "2022-05-21T14:15:22Z",
                                "archived_at": null
                              },
                              {
                                "object": "client",
                                "id": 73841,
                                "status": null,
                                "name": {
                                  "object": "name",
                                  "title": "miss",
                                  "other_title": null,
                                  "first_name": "Jennifer",
                                  "middle_name": "Jane",
                                  "last_name": "Parker",
                                  "name": "Jennifer Parker",
                                  "full_name": "Jennifer Jane Parker",
                                  "complete_name": "Miss Jennifer Jane Parker"
                                },
                                "email": "jennifer@example.com",
                                "landline": null,
                                "mobile": null,
                                "dob": "1967-10-29",
                                "reference": null,
                                "national_insurance_number": "QQ345678Z",
                                "is_deletable": true,
                                "deletion_date": "2025-09-11",
                                "created_at": "2022-05-21T14:22:01Z",
                                "updated_at": "2022-05-21T14:22:01Z",
                                "archived_at": null
                              }
                            ],
                            "total": 2,
                            "count": 2,
                            "limit": 25,
                            "has_more": false,
                            "url": "https://id.amiqus.co/api/v2/organisations/3970/clients"
                          },
                          "created_at": "2022-03-15T21:43:16Z",
                          "updated_at": "2022-03-15T21:43:16Z",
                          "archived_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "expanded_empty": {
                    "summary": "Expanded with no assignees or clients",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "organisation",
                          "id": 4117,
                          "status": null,
                          "name": "CusCo",
                          "company_number": "11249",
                          "jurisdiction": "us_ca",
                          "reference": null,
                          "address": null,
                          "incorporated_at": null,
                          "assignees": null,
                          "clients": null,
                          "created_at": "2022-03-20T13:12:41Z",
                          "updated_at": "2022-03-20T13:12:41Z",
                          "archived_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/organisations?page=INTEGER_VALUE&limit=INTEGER_VALUE&search=STRING_VALUE&assignee=QUERY_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&visibility=STRING_VALUE&expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/organisations',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    search: 'STRING_VALUE',\n    assignee: 'QUERY_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE',\n    visibility: 'STRING_VALUE',\n    expand: 'ARRAY_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/organisations?page=INTEGER_VALUE&limit=INTEGER_VALUE&search=STRING_VALUE&assignee=QUERY_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&visibility=STRING_VALUE&expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/organisations');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'search' => 'STRING_VALUE',\n  'assignee' => 'QUERY_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE',\n  'visibility' => 'STRING_VALUE',\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Create an organisation",
        "description": "Create a new organisation.",
        "operationId": "post-organisations",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Organisations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Organisation"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jurisdiction": {
                        "description": "Required with `company_number`"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                ]
              },
              "example": {
                "status": "approved",
                "name": "Probert Publishing",
                "company_number": "SF12188",
                "jurisdiction": "gb",
                "reference": "PP-001",
                "address": {
                  "unit": null,
                  "house_name": "Probert House",
                  "house_number": null,
                  "street_name": "42 Market Street",
                  "second_street": null,
                  "district": null,
                  "city": "London",
                  "province": null,
                  "postcode": "EC1A 1BB",
                  "country": "GB"
                },
                "incorporated_at": "2015-06-01"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organisation"
                },
                "example": {
                  "object": "organisation",
                  "id": 3970,
                  "status": "approved",
                  "name": "Probert Publishing",
                  "company_number": "SF12188",
                  "jurisdiction": "gb",
                  "reference": "PP-001",
                  "address": {
                    "object": "address",
                    "unit": null,
                    "house_name": "Probert House",
                    "house_number": null,
                    "street_name": "42 Market Street",
                    "second_street": null,
                    "district": null,
                    "city": "London",
                    "province": null,
                    "postcode": "EC1A 1BB",
                    "country": "GB"
                  },
                  "incorporated_at": "2015-06-01",
                  "assignees": null,
                  "clients": null,
                  "created_at": "2022-03-15T21:43:16Z",
                  "updated_at": "2022-03-15T21:43:16Z",
                  "archived_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/organisations \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"status\":\"pending\",\"name\":\"string\",\"company_number\":null,\"jurisdiction\":null,\"reference\":null,\"address\":{},\"incorporated_at\":null}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/organisations',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {\n    status: 'pending',\n    name: 'string',\n    company_number: null,\n    jurisdiction: null,\n    reference: null,\n    address: {},\n    incorporated_at: null\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"status\": \"pending\",\n  \"name\": \"string\",\n  \"company_number\": null,\n  \"jurisdiction\": null,\n  \"reference\": null,\n  \"address\": {},\n  \"incorporated_at\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/organisations\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"status\":\"pending\",\"name\":\"string\",\"company_number\":null,\"jurisdiction\":null,\"reference\":null,\"address\":{},\"incorporated_at\":null}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/organisations');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/organisations/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique organisation identifier"
        }
      ],
      "get": {
        "summary": "Retrieve an organisation",
        "description": "Returns a single organisation.",
        "operationId": "get-organisations-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Organisations"
        ],
        "parameters": [
          {
            "name": "expand",
            "description": "Expand the organisation's `assignees` and `clients` relationships. Both are returned as arrays of identifiers by default.",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "assignees",
                  "clients"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organisation"
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "organisation",
                      "id": 3970,
                      "status": "approved",
                      "name": "Probert Publishing",
                      "company_number": "SF12188",
                      "jurisdiction": "gb",
                      "reference": "PP-001",
                      "address": {
                        "object": "address",
                        "unit": null,
                        "house_name": "Probert House",
                        "house_number": null,
                        "street_name": "42 Market Street",
                        "second_street": null,
                        "district": null,
                        "city": "London",
                        "province": null,
                        "postcode": "EC1A 1BB",
                        "country": "GB"
                      },
                      "incorporated_at": "2015-06-01",
                      "assignees": [
                        187,
                        947
                      ],
                      "clients": [
                        73845,
                        73841
                      ],
                      "created_at": "2022-03-15T21:43:16Z",
                      "updated_at": "2022-03-15T21:43:16Z",
                      "archived_at": null
                    }
                  },
                  "assignees_expanded": {
                    "summary": "Assignees expanded",
                    "value": {
                      "object": "organisation",
                      "id": 3970,
                      "status": "approved",
                      "name": "Probert Publishing",
                      "company_number": "SF12188",
                      "jurisdiction": "gb",
                      "reference": "PP-001",
                      "address": {
                        "object": "address",
                        "unit": null,
                        "house_name": "Probert House",
                        "house_number": null,
                        "street_name": "42 Market Street",
                        "second_street": null,
                        "district": null,
                        "city": "London",
                        "province": null,
                        "postcode": "EC1A 1BB",
                        "country": "GB"
                      },
                      "incorporated_at": "2015-06-01",
                      "assignees": {
                        "object": "list",
                        "data": [
                          {
                            "object": "team_member",
                            "id": 187,
                            "name": "Ross Green",
                            "email": "ross.green@example.com",
                            "role": "member"
                          },
                          {
                            "object": "team_member",
                            "id": 947,
                            "name": "Wayne Murray",
                            "email": "wayne.murray@example.com",
                            "role": "read-only"
                          }
                        ],
                        "total": 2,
                        "count": 2,
                        "limit": 25,
                        "has_more": false,
                        "url": "https://id.amiqus.co/api/v2/organisations/3970/assignees"
                      },
                      "clients": [
                        73845,
                        73841
                      ],
                      "created_at": "2022-03-15T21:43:16Z",
                      "updated_at": "2022-03-15T21:43:16Z",
                      "archived_at": null
                    }
                  },
                  "clients_expanded": {
                    "summary": "Clients expanded",
                    "value": {
                      "object": "organisation",
                      "id": 3970,
                      "status": "approved",
                      "name": "Probert Publishing",
                      "company_number": "SF12188",
                      "jurisdiction": "gb",
                      "reference": "PP-001",
                      "address": {
                        "object": "address",
                        "unit": null,
                        "house_name": "Probert House",
                        "house_number": null,
                        "street_name": "42 Market Street",
                        "second_street": null,
                        "district": null,
                        "city": "London",
                        "province": null,
                        "postcode": "EC1A 1BB",
                        "country": "GB"
                      },
                      "incorporated_at": "2015-06-01",
                      "assignees": [
                        187,
                        947
                      ],
                      "clients": {
                        "object": "list",
                        "data": [
                          {
                            "object": "client",
                            "id": 73845,
                            "status": "pending",
                            "name": {
                              "object": "name",
                              "title": "mr",
                              "other_title": null,
                              "first_name": "Martin",
                              "middle_name": "Seamus",
                              "last_name": "McFly",
                              "name": "Martin McFly",
                              "full_name": "Martin Seamus McFly",
                              "complete_name": "Mr Martin Seamus McFly"
                            },
                            "email": "marty@example.com",
                            "landline": null,
                            "mobile": null,
                            "dob": null,
                            "reference": null,
                            "national_insurance_number": null,
                            "is_deletable": true,
                            "deletion_date": "2026-01-14",
                            "created_at": "2022-05-21T14:15:22Z",
                            "updated_at": "2022-05-21T14:15:22Z",
                            "archived_at": null
                          },
                          {
                            "object": "client",
                            "id": 73841,
                            "status": null,
                            "name": {
                              "object": "name",
                              "title": "miss",
                              "other_title": null,
                              "first_name": "Jennifer",
                              "middle_name": "Jane",
                              "last_name": "Parker",
                              "name": "Jennifer Parker",
                              "full_name": "Jennifer Jane Parker",
                              "complete_name": "Miss Jennifer Jane Parker"
                            },
                            "email": "jennifer@example.com",
                            "landline": null,
                            "mobile": null,
                            "dob": "1967-10-29",
                            "reference": null,
                            "national_insurance_number": "QQ345678Z",
                            "is_deletable": true,
                            "deletion_date": "2025-09-11",
                            "created_at": "2022-05-21T14:22:01Z",
                            "updated_at": "2022-05-21T14:22:01Z",
                            "archived_at": null
                          }
                        ],
                        "total": 2,
                        "count": 2,
                        "limit": 25,
                        "has_more": false,
                        "url": "https://id.amiqus.co/api/v2/organisations/3970/clients"
                      },
                      "created_at": "2022-03-15T21:43:16Z",
                      "updated_at": "2022-03-15T21:43:16Z",
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Organisation not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D?expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D',\n  qs: {expand: 'ARRAY_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/organisations/%7Bid%7D?expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/organisations/%7Bid%7D');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "patch": {
        "summary": "Update an organisation",
        "description": "Update the details of an organisation.\n\nTo add clients to or remove clients from the organisation, refer to **[Update organisations for a client](#operation/patch-clients-id-organisations)**.\n",
        "operationId": "patch-organisations-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Organisations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Organisation"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "jurisdiction": {
                        "description": "Required with `company_number`"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                ]
              },
              "example": {
                "status": "rejected",
                "name": "Probert Publishing Co",
                "reference": "PP-002",
                "address": null,
                "incorporated_at": "2015-06-01"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organisation"
                },
                "example": {
                  "object": "organisation",
                  "id": 3970,
                  "status": "rejected",
                  "name": "Probert Publishing Co",
                  "company_number": "SF12188",
                  "jurisdiction": "gb",
                  "reference": "PP-002",
                  "address": null,
                  "incorporated_at": "2015-06-01",
                  "assignees": [
                    187,
                    947
                  ],
                  "clients": [
                    73845,
                    73841
                  ],
                  "created_at": "2022-03-15T21:43:16Z",
                  "updated_at": "2022-05-21T09:11:54Z",
                  "archived_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Organisation not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PATCH \\\n  --url https://id.amiqus.co/api/v2/organisations/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"status\":\"pending\",\"name\":\"string\",\"company_number\":null,\"jurisdiction\":null,\"reference\":null,\"address\":{},\"incorporated_at\":null}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {\n    status: 'pending',\n    name: 'string',\n    company_number: null,\n    jurisdiction: null,\n    reference: null,\n    address: {},\n    incorporated_at: null\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"status\": \"pending\",\n  \"name\": \"string\",\n  \"company_number\": null,\n  \"jurisdiction\": null,\n  \"reference\": null,\n  \"address\": {},\n  \"incorporated_at\": null\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://id.amiqus.co/api/v2/organisations/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"status\":\"pending\",\"name\":\"string\",\"company_number\":null,\"jurisdiction\":null,\"reference\":null,\"address\":{},\"incorporated_at\":null}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/organisations/%7Bid%7D');\n$request->setRequestMethod('PATCH');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/organisations/{id}/assignees": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique organisation identifier."
        }
      ],
      "get": {
        "summary": "List all assignees for an organisation",
        "description": "List all assignees for an organisation.",
        "operationId": "get-organisations-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Organisation Assignees"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/TeamMember-2"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "assignee",
                      "id": 34535,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 121,
                        "name": "Lorraine Baines",
                        "email": "lorraine@example.com",
                        "role": "owner"
                      }
                    },
                    {
                      "object": "assignee",
                      "id": 34538,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 472,
                        "name": "Dennis Jones",
                        "email": "dennis@example.com",
                        "role": "member"
                      }
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Organisation not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees?page=INTEGER_VALUE&limit=INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees?page=INTEGER_VALUE&limit=INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Add assignees to an organisation",
        "description": "Add one or more assignees to an organisation, merging them with existing assignees.\n\nExisting assignees to the organisation are not included in the response. Only added assignees to the organisation will be returned.\n\nTo replace assignees, refer to **[Replace assignees for an organisation](#operation/put-organisations-id-assignees)**.\n",
        "operationId": "post-organisations-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Organisation Assignees"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Assignee"
                    },
                    {
                      "type": "object",
                      "required": [
                        "type",
                        "team_member"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "team_member": {
                          "type": "integer",
                          "description": "The unique identifier of the team member to be assigned to the organisation."
                        },
                        "type": {
                          "type": "string",
                          "const": "team_member",
                          "description": "The type of assignee to be assigned to the organisation."
                        }
                      }
                    }
                  ]
                }
              },
              "example": [
                {
                  "type": "team_member",
                  "team_member": 121
                },
                {
                  "type": "team_member",
                  "team_member": 472
                }
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (one or more assignees to the organisation have been added)",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "total": {
                          "minimum": 1
                        },
                        "count": {
                          "minimum": 1,
                          "maximum": 100
                        },
                        "limit": {
                          "minimum": 100,
                          "const": 100
                        },
                        "data": {
                          "minItems": 1,
                          "maxItems": 100,
                          "items": {
                            "$ref": "#/components/schemas/TeamMember-2"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "assignee",
                      "id": 34535,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 121,
                        "name": "Lorraine Baines",
                        "email": "lorraine@example.com",
                        "role": "owner"
                      }
                    },
                    {
                      "object": "assignee",
                      "id": 34538,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 472,
                        "name": "Dennis Jones",
                        "email": "dennis@example.com",
                        "role": "member"
                      }
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "has_more": false,
                  "url": "https://id.amiqus.co/api/v2/organisations/87249/assignees"
                }
              }
            }
          },
          "204": {
            "description": "No Content (no new assignees to the organisation have been added)"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Organisation not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema"
                },
                "example": {
                  "errors": [
                    "The submitted value must be an array of assignee objects"
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"type\":\"team_member\",\"team_member\":0}]'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: [{type: 'team_member', team_member: 0}],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify([\n  {\n    \"type\": \"team_member\",\n    \"team_member\": 0\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('[{\"type\":\"team_member\",\"team_member\":0}]');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "put": {
        "summary": "Replace assignees for an organisation",
        "description": "Replacing all existing assignees for an organisation.\n\nExisting assignees to the organisation that are included in the request will be part of the updated assignees to the\norganisation but they will not be shown in the response. Only added assignees will be returned.\n\nTo add additional assignees without replacing the existing ones, refer to **[Add assignees for an organisation](#operation/post-organisations-id-assignees)**.\n",
        "operationId": "put-organisations-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Organisation Assignees"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Assignee"
                    },
                    {
                      "type": "object",
                      "required": [
                        "type",
                        "team_member"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "team_member": {
                          "type": "integer",
                          "description": "The unique identifier of the team member to be assigned to the organisation."
                        },
                        "type": {
                          "type": "string",
                          "const": "team_member",
                          "description": "The type of assignee to be assigned to the organisation."
                        }
                      }
                    }
                  ]
                }
              },
              "example": [
                {
                  "type": "team_member",
                  "team_member": 121
                },
                {
                  "type": "team_member",
                  "team_member": 523
                }
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (one or more assignees to the organisation have been replaced)",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "total": {
                          "minimum": 1
                        },
                        "count": {
                          "minimum": 1,
                          "maximum": 100
                        },
                        "limit": {
                          "minimum": 100,
                          "const": 100
                        },
                        "data": {
                          "minItems": 1,
                          "maxItems": 100,
                          "items": {
                            "$ref": "#/components/schemas/TeamMember-2"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "assignee",
                      "id": 34535,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 121,
                        "name": "Lorraine Baines",
                        "email": "lorraine@example.com",
                        "role": "owner"
                      }
                    },
                    {
                      "object": "assignee",
                      "id": 34541,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 523,
                        "name": "Clara Clayton",
                        "email": "clara@example.com",
                        "role": "owner"
                      }
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "has_more": false,
                  "url": "https://id.amiqus.co/api/v2/organisations/87249/assignees"
                }
              }
            }
          },
          "204": {
            "description": "No Content (assignees to the organisation have been successfully deleted or there are no changes)"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Organisation not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema"
                },
                "example": {
                  "errors": [
                    "The submitted value must be an array of assignee objects"
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"type\":\"team_member\",\"team_member\":0}]'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: [{type: 'team_member', team_member: 0}],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify([\n  {\n    \"type\": \"team_member\",\n    \"team_member\": 0\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('[{\"type\":\"team_member\",\"team_member\":0}]');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "delete": {
        "summary": "Delete assignees for an organisation",
        "description": "Remove all assignees from an organisation.\n\nIf you want to remove a specific assignee from an organisation,\nrefer to **[Delete assignee for an organisation](#operation/delete-organisations-id-assignees-assigneeId)**.\n",
        "operationId": "delete-organisations-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Organisation Assignees"
        ],
        "requestBody": {
          "content": {
            "application/json": {}
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Organisation not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/organisations/{id}/assignees/{assigneeId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique organisation identifier."
        }
      ],
      "delete": {
        "summary": "Delete assignee for an organisation",
        "description": "Remove a single assignee from an organisation.\n\nTo remove all of an organisation's assignees, see **[Delete assignees for an organisation](#operation/delete-organisations-id-assignees)**.\n",
        "operationId": "delete-organisations-id-assignees-assigneeId",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Organisation Assignees"
        ],
        "parameters": [
          {
            "name": "assigneeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unique assignee identifier."
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {}
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Organisation not found",
                        "Assignee not found"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees/%7BassigneeId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees/%7BassigneeId%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees/%7BassigneeId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/organisations/%7Bid%7D/assignees/%7BassigneeId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/organisations/{id}/clients": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique organisation identifier."
        }
      ],
      "get": {
        "summary": "List all clients for an organisation",
        "description": "Returns a paginated list of the clients belonging to an organisation. Clients will be returned in the order they were created, most recent first. An empty list is returned when the organisation has no clients. When a client is archived all organisations associated with the client will continue to be attached.\n\nTo retrieve clients for the team, refer to **[List all clients](#operation/get-clients)**.\n",
        "operationId": "get-organisations-id-clients",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Organisation Clients"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Client"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "default": {
                    "summary": "Clients returned",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "client",
                          "id": 73845,
                          "status": "pending",
                          "name": {
                            "object": "name",
                            "title": "mr",
                            "other_title": null,
                            "first_name": "Martin",
                            "middle_name": "Seamus",
                            "last_name": "McFly",
                            "name": "Martin McFly",
                            "full_name": "Martin Seamus McFly",
                            "complete_name": "Mr Martin Seamus McFly"
                          },
                          "email": "marty@example.com",
                          "landline": null,
                          "mobile": null,
                          "dob": null,
                          "reference": null,
                          "national_insurance_number": null,
                          "is_deletable": true,
                          "deletion_date": "2026-01-14",
                          "created_at": "2022-05-21T14:15:22Z",
                          "updated_at": "2022-05-21T14:15:22Z",
                          "archived_at": null
                        },
                        {
                          "object": "client",
                          "id": 73841,
                          "status": null,
                          "name": {
                            "object": "name",
                            "title": "miss",
                            "other_title": null,
                            "first_name": "Jennifer",
                            "middle_name": "Jane",
                            "last_name": "Parker",
                            "name": "Jennifer Parker",
                            "full_name": "Jennifer Jane Parker",
                            "complete_name": "Miss Jennifer Jane Parker"
                          },
                          "email": "jennifer@example.com",
                          "landline": null,
                          "mobile": null,
                          "dob": "1967-10-29",
                          "reference": null,
                          "national_insurance_number": "QQ345678Z",
                          "is_deletable": true,
                          "deletion_date": "2025-09-11",
                          "created_at": "2022-05-21T14:22:01Z",
                          "updated_at": "2022-05-21T14:22:01Z",
                          "archived_at": null
                        }
                      ],
                      "total": 2,
                      "count": 2,
                      "limit": 25,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "no_clients_returned": {
                    "summary": "No clients returned",
                    "value": {
                      "object": "paginated_list",
                      "data": [],
                      "total": 0,
                      "count": 0,
                      "limit": 25,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Organisation not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D/clients?page=INTEGER_VALUE&limit=INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/organisations/%7Bid%7D/clients',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/organisations/%7Bid%7D/clients?page=INTEGER_VALUE&limit=INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/organisations/%7Bid%7D/clients');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/organisations/records/{id}/download": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId"
        }
      ]
    },
    "/organisations/records/{id}/assignees": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique organisation record identifier."
        }
      ]
    },
    "/organisations/records/{id}/assignees/{assigneeId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique organisation record identifier."
        }
      ]
    },
    "/records": {
      "get": {
        "summary": "List all records",
        "description": "List all records.",
        "operationId": "get-records",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "client.name.first_name",
                "client.name.last_name",
                "created_at",
                "updated_at",
                "archived_at"
              ]
            },
            "description": "Sort results by client name or date. Results returned in created_at order by default"
          },
          {
            "name": "order_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Order results in ascending or descending order. Results returned in ascending order by default"
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client"
                ]
              }
            }
          },
          {
            "name": "status",
            "description": "Filter records by their current status.\n",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "started",
                "complete",
                "incomplete",
                "waiting",
                "failed",
                "empty",
                "paused",
                "amendments",
                "reviewed"
              ],
              "description": "The overall status of the record.\n\nStatus is determined by the combined states of a record's steps, expiry and review.\n"
            }
          },
          {
            "name": "visibility",
            "description": "Filter records by their current visibility. Both \"active\" and \"archived\" records are returned by default.",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "creator",
            "deprecated": true,
            "description": "To filter records created by team member user ID.\n\nThis query parameter is deprecated and has been replaced by `created_by`.\n",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "created_by",
            "description": "Filter records created by team member user ID",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "assignee",
            "description": "Filter records assigned to team member user ID or use `false` to filter unassigned records only. Both assigned and unassigned records are returned by default.",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "integer",
                  "description": "Filter records assigned to team member user ID"
                },
                {
                  "type": "boolean",
                  "enum": [
                    false
                  ],
                  "description": "Filter unassigned records"
                }
              ]
            },
            "required": false
          },
          {
            "name": "client_visibility",
            "description": "Filter records by the visibility of their associated client. By default records are returned for both active and archived clients.",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Record"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "record",
                      "id": 983434,
                      "status": "pending",
                      "perform_url": "https://id.amiqus.co/i/0vz32B9CZpO1yLsKPdy9q",
                      "email": "marty@example.com",
                      "client": 73845,
                      "name": {
                        "object": "name",
                        "title": "mr",
                        "other_title": null,
                        "first_name": "Martin",
                        "middle_name": "Seamus",
                        "last_name": "McFly",
                        "name": "Martin McFly",
                        "full_name": "Martin Seamus McFly",
                        "complete_name": "Mr Martin Seamus McFly"
                      },
                      "steps": [
                        {
                          "object": "step",
                          "id": 2,
                          "type": "check.photo_id",
                          "preferences": {
                            "report_type": "standard",
                            "face": true,
                            "liveness": true,
                            "facial_similarity": false,
                            "live_document": false,
                            "docs": [
                              "passport",
                              "driving_licence",
                              "national_id"
                            ],
                            "issuing_countries": null,
                            "right_to_work": null,
                            "right_to_rent": null
                          },
                          "check": 82342,
                          "cost": 1,
                          "completed_at": null
                        },
                        {
                          "object": "step",
                          "id": 3,
                          "type": "document.request",
                          "preferences": {
                            "title": "Utility bill",
                            "instructions": "A utility bill dated within the last three months."
                          },
                          "document": 23123,
                          "cost": 0,
                          "completed_at": null
                        },
                        {
                          "object": "step",
                          "id": 4,
                          "type": "form",
                          "form": "4bd9bfca-e61d-4a68-99b3-ca61a02f650f",
                          "cost": 0,
                          "completed_at": null
                        }
                      ],
                      "has_reminders": true,
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z",
                      "expired_at": "2022-06-01T08:22:12Z",
                      "archived_at": null,
                      "is_declaration_required": false,
                      "declaration_confirmed_at": null
                    }
                  ],
                  "total": 1,
                  "count": 1,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/records?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE&status=STRING_VALUE&visibility=STRING_VALUE&creator=INTEGER_VALUE&created_by=INTEGER_VALUE&assignee=QUERY_VALUE&client_visibility=STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/records',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE',\n    expand: 'ARRAY_VALUE',\n    status: 'STRING_VALUE',\n    visibility: 'STRING_VALUE',\n    creator: 'INTEGER_VALUE',\n    created_by: 'INTEGER_VALUE',\n    assignee: 'QUERY_VALUE',\n    client_visibility: 'STRING_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/records?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE&status=STRING_VALUE&visibility=STRING_VALUE&creator=INTEGER_VALUE&created_by=INTEGER_VALUE&assignee=QUERY_VALUE&client_visibility=STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE',\n  'expand' => 'ARRAY_VALUE',\n  'status' => 'STRING_VALUE',\n  'visibility' => 'STRING_VALUE',\n  'creator' => 'INTEGER_VALUE',\n  'created_by' => 'INTEGER_VALUE',\n  'assignee' => 'QUERY_VALUE',\n  'client_visibility' => 'STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Create a record",
        "description": "Create a record.",
        "operationId": "post-records",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                },
                "examples": {
                  "simple": {
                    "summary": "Single step",
                    "value": {
                      "object": "record",
                      "id": 983434,
                      "status": "pending",
                      "perform_url": "https://id.amiqus.co/i/NzJXeGzUYAQxaF1G80NB",
                      "email": "marty@example.com",
                      "client": 7832,
                      "name": {
                        "object": "name",
                        "title": "mr",
                        "other_title": null,
                        "first_name": "Martin",
                        "middle_name": "Seamus",
                        "last_name": "McFly",
                        "name": "Martin McFly",
                        "full_name": "Martin Seamus McFly",
                        "complete_name": "Mr Martin Seamus McFly"
                      },
                      "steps": [
                        {
                          "object": "step",
                          "id": 2,
                          "type": "check.photo_id",
                          "preferences": {
                            "report_type": "standard",
                            "face": false,
                            "liveness": false,
                            "facial_similarity": false,
                            "live_document": false,
                            "docs": [
                              "passport",
                              "driving_licence"
                            ],
                            "issuing_countries": null,
                            "right_to_work": null,
                            "right_to_rent": null
                          },
                          "check": 82342,
                          "cost": 1,
                          "completed_at": null
                        }
                      ],
                      "has_reminders": true,
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z",
                      "expired_at": "2022-06-01T08:22:12Z",
                      "archived_at": null,
                      "is_declaration_required": false,
                      "declaration_confirmed_at": null
                    }
                  },
                  "advanced": {
                    "summary": "Multiple steps",
                    "value": {
                      "object": "record",
                      "id": 983434,
                      "status": "pending",
                      "perform_url": "https://id.amiqus.co/i/KKyraextnvOkGumVbGK6",
                      "email": "marty@example.com",
                      "client": 73845,
                      "name": {
                        "object": "name",
                        "title": "mr",
                        "other_title": null,
                        "first_name": "Martin",
                        "middle_name": "Seamus",
                        "last_name": "McFly",
                        "name": "Martin McFly",
                        "full_name": "Martin Seamus McFly",
                        "complete_name": "Mr Martin Seamus McFly"
                      },
                      "steps": [
                        {
                          "object": "step",
                          "id": 2,
                          "type": "check.photo_id",
                          "preferences": {
                            "report_type": "biometric",
                            "issuing_countries": null,
                            "allow_fallback": false,
                            "right_to_work": null,
                            "right_to_rent": null
                          },
                          "check": 82342,
                          "cost": 2,
                          "completed_at": null
                        },
                        {
                          "object": "step",
                          "id": 3,
                          "type": "check.criminal_record",
                          "preferences": {
                            "region": "england",
                            "type": "standard",
                            "free_volunteer": false,
                            "enable_payment": false
                          },
                          "check": 82343,
                          "cost": 16,
                          "completed_at": null
                        },
                        {
                          "object": "step",
                          "id": 4,
                          "type": "document.request",
                          "preferences": {
                            "title": "Utility bill",
                            "instructions": "A utility bill dated within the last three months."
                          },
                          "document": 15478,
                          "cost": 0,
                          "completed_at": null
                        },
                        {
                          "object": "step",
                          "id": 5,
                          "type": "form",
                          "form": "f11b16cd-a03c-4c7e-a151-14b5e1463846",
                          "cost": 0,
                          "completed_at": null
                        }
                      ],
                      "has_reminders": true,
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z",
                      "expired_at": "2022-06-01T08:22:12Z",
                      "archived_at": null,
                      "is_declaration_required": false,
                      "declaration_confirmed_at": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "title": "Manual",
                    "allOf": [
                      {
                        "type": "object",
                        "required": [
                          "client"
                        ],
                        "properties": {
                          "client": {
                            "type": "integer",
                            "description": "Unique client identifier."
                          }
                        }
                      },
                      {
                        "$ref": "#/components/schemas/RecordSettings"
                      },
                      {
                        "properties": {
                          "steps": {
                            "items": {
                              "$ref": "#/components/schemas/RecordStepsWrite"
                            }
                          }
                        }
                      }
                    ]
                  },
                  {
                    "title": "Template",
                    "allOf": [
                      {
                        "type": "object",
                        "required": [
                          "client",
                          "template"
                        ],
                        "properties": {
                          "client": {
                            "type": "integer",
                            "description": "Unique client identifier."
                          },
                          "template": {
                            "type": "integer",
                            "description": "Create a record using an existing [record template ID](#operation/get-templates-records).\n"
                          },
                          "assignees": {
                            "type": "boolean",
                            "default": true,
                            "description": "Automatically assign team members defined in the record template to the new record."
                          }
                        }
                      }
                    ]
                  }
                ]
              },
              "examples": {
                "simple": {
                  "summary": "Single step",
                  "description": "A request with a single step containing a Photo ID check",
                  "value": {
                    "client": 7832,
                    "steps": [
                      {
                        "type": "check.photo_id",
                        "preferences": {
                          "report_type": "standard",
                          "docs": [
                            "passport",
                            "driving_licence"
                          ]
                        }
                      }
                    ],
                    "notification": "email"
                  }
                },
                "advanced": {
                  "summary": "Multiple steps",
                  "description": "A request with multiple steps including checks and documents",
                  "value": {
                    "client": 34853,
                    "steps": [
                      {
                        "type": "check.photo_id",
                        "preferences": {
                          "report_type": "biometric"
                        }
                      },
                      {
                        "type": "check.criminal_record",
                        "preferences": {
                          "region": "england",
                          "type": "standard"
                        }
                      },
                      {
                        "type": "document.request",
                        "preferences": {
                          "template": 15478
                        }
                      },
                      {
                        "type": "form",
                        "preferences": {
                          "form": "f11b16cd-a03c-4c7e-a151-14b5e1463846"
                        }
                      }
                    ],
                    "notification": "email",
                    "message": "Please complete the following request to begin onboarding with Fusion Industries.",
                    "reminder": true,
                    "is_declaration_required": true
                  }
                },
                "template": {
                  "summary": "Template",
                  "description": "Use an existing record template",
                  "value": {
                    "client": 34853,
                    "template": 43723
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/records \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"client\":0,\"steps\":[{\"type\":\"check.credit\"}],\"notification\":\"email\",\"message\":null,\"reminder\":false,\"is_declaration_required\":false}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/records',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {\n    client: 0,\n    steps: [{type: 'check.credit'}],\n    notification: 'email',\n    message: null,\n    reminder: false,\n    is_declaration_required: false\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"client\": 0,\n  \"steps\": [\n    {\n      \"type\": \"check.credit\"\n    }\n  ],\n  \"notification\": \"email\",\n  \"message\": null,\n  \"reminder\": false,\n  \"is_declaration_required\": false\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/records\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"client\":0,\"steps\":[{\"type\":\"check.credit\"}],\"notification\":\"email\",\"message\":null,\"reminder\":false,\"is_declaration_required\":false}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/records/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique record identifier."
        }
      ],
      "get": {
        "summary": "Retrieve a record",
        "description": "Retrieve a record.",
        "operationId": "get-records-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                },
                "example": {
                  "object": "record",
                  "id": 983434,
                  "status": "pending",
                  "perform_url": "https://id.amiqus.co/i/0vz32B9CZpO1yLsKPdy9q",
                  "email": "marty@example.com",
                  "client": 73845,
                  "name": {
                    "object": "name",
                    "title": "mr",
                    "other_title": null,
                    "first_name": "Martin",
                    "middle_name": "Seamus",
                    "last_name": "McFly",
                    "name": "Martin McFly",
                    "full_name": "Martin Seamus McFly",
                    "complete_name": "Mr Martin Seamus McFly"
                  },
                  "steps": [
                    {
                      "object": "step",
                      "id": 2,
                      "type": "check.photo_id",
                      "preferences": {
                        "report_type": "standard",
                        "face": true,
                        "liveness": true,
                        "facial_similarity": false,
                        "live_document": false,
                        "docs": [
                          "passport",
                          "driving_licence",
                          "national_id"
                        ],
                        "issuing_countries": null,
                        "right_to_work": null,
                        "right_to_rent": null
                      },
                      "check": 82342,
                      "cost": 1,
                      "completed_at": null
                    },
                    {
                      "object": "step",
                      "id": 3,
                      "type": "document.request",
                      "preferences": {
                        "title": "Utility bill",
                        "instructions": "A utility bill dated within the last three months."
                      },
                      "document": 23123,
                      "cost": 0,
                      "completed_at": null
                    },
                    {
                      "object": "step",
                      "id": 4,
                      "type": "form",
                      "form": "4bd9bfca-e61d-4a68-99b3-ca61a02f650f",
                      "cost": 0,
                      "completed_at": null
                    }
                  ],
                  "has_reminders": true,
                  "created_at": "2022-05-22T08:22:12Z",
                  "updated_at": "2022-05-22T08:22:12Z",
                  "expired_at": "2022-06-01T08:22:12Z",
                  "archived_at": null,
                  "is_declaration_required": false,
                  "declaration_confirmed_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Record not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/records/%7Bid%7D?expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D',\n  qs: {expand: 'ARRAY_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D?expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "patch": {
        "summary": "Update a record",
        "description": "Update the details of a record.\n",
        "operationId": "patch-records-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "is_archived": {
                    "type": "boolean",
                    "description": "Allows toggling of archived state"
                  },
                  "is_reviewed": {
                    "type": "boolean",
                    "description": "Allows toggling of reviewed state"
                  },
                  "has_reminders": {
                    "type": "boolean",
                    "description": "Allows toggling of reminder state"
                  },
                  "expired_at": {
                    "description": "Allows for setting the date and time that the record will expire.",
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time",
                        "description": "Value for expiry date must be within 10 days from now."
                      },
                      {
                        "type": "boolean",
                        "enum": [
                          true
                        ],
                        "description": "Expire the record now."
                      }
                    ]
                  }
                }
              },
              "example": {
                "is_archived": true,
                "is_reviewed": true,
                "expired_at": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                },
                "example": {
                  "object": "record",
                  "id": 983434,
                  "status": "pending",
                  "perform_url": "https://id.amiqus.co/i/0vz32B9CZpO1yLsKPdy9q",
                  "email": "marty@example.com",
                  "client": 73845,
                  "name": {
                    "object": "name",
                    "title": "mr",
                    "other_title": null,
                    "first_name": "Martin",
                    "middle_name": "Seamus",
                    "last_name": "McFly",
                    "name": "Martin McFly",
                    "full_name": "Martin Seamus McFly",
                    "complete_name": "Mr Martin Seamus McFly"
                  },
                  "steps": [
                    {
                      "object": "step",
                      "id": 2,
                      "type": "check.photo_id",
                      "preferences": {
                        "report_type": "standard",
                        "face": true,
                        "liveness": true,
                        "facial_similarity": false,
                        "live_document": false,
                        "docs": [
                          "passport",
                          "driving_licence",
                          "national_id"
                        ],
                        "issuing_countries": null,
                        "right_to_work": null,
                        "right_to_rent": null
                      },
                      "check": 82342,
                      "cost": 1,
                      "completed_at": null
                    },
                    {
                      "object": "step",
                      "id": 3,
                      "type": "document.request",
                      "preferences": {
                        "title": "Utility bill",
                        "instructions": "A utility bill dated within the last three months."
                      },
                      "document": 23123,
                      "cost": 0,
                      "completed_at": null
                    },
                    {
                      "object": "step",
                      "id": 4,
                      "type": "form",
                      "form": "4bd9bfca-e61d-4a68-99b3-ca61a02f650f",
                      "cost": 0,
                      "completed_at": null
                    }
                  ],
                  "has_reminders": true,
                  "created_at": "2022-05-22T08:22:12Z",
                  "updated_at": "2022-05-22T08:22:12Z",
                  "expired_at": "2022-05-25T08:22:12Z",
                  "archived_at": "2023-09-15T13:03:11Z",
                  "is_declaration_required": false,
                  "declaration_confirmed_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Record not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PATCH \\\n  --url https://id.amiqus.co/api/v2/records/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"is_archived\":true,\"is_reviewed\":true,\"has_reminders\":true,\"expired_at\":\"2019-08-24T14:15:22Z\"}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {\n    is_archived: true,\n    is_reviewed: true,\n    has_reminders: true,\n    expired_at: '2019-08-24T14:15:22Z'\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"is_archived\": true,\n  \"is_reviewed\": true,\n  \"has_reminders\": true,\n  \"expired_at\": \"2019-08-24T14:15:22Z\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"is_archived\":true,\"is_reviewed\":true,\"has_reminders\":true,\"expired_at\":\"2019-08-24T14:15:22Z\"}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D');\n$request->setRequestMethod('PATCH');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/records/{id}/archive": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId"
        }
      ],
      "post": {
        "summary": "Archive a record",
        "description": "Archive a record.\n\nThis operation is deprecated and will be removed in future versions. To archive a record, please refer to **[Update a record](#operation/patch-records-id)**.\n",
        "operationId": "post-records-id-archive",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "deprecated": true,
        "parameters": [
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url 'https://id.amiqus.co/api/v2/records/%7Bid%7D/archive?expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D/archive',\n  qs: {expand: 'ARRAY_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D/archive?expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D/archive');\n$request->setRequestMethod('POST');\n$request->setQuery(new http\\QueryString([\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/records/{id}/expire": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique record identifier."
        }
      ],
      "post": {
        "summary": "Expire a record",
        "description": "Expire a record.",
        "operationId": "post-records-id-expire",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Record"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Record not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url 'https://id.amiqus.co/api/v2/records/%7Bid%7D/expire?expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D/expire',\n  qs: {expand: 'ARRAY_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D/expire?expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D/expire');\n$request->setRequestMethod('POST');\n$request->setQuery(new http\\QueryString([\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/records/{id}/download": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId"
        }
      ],
      "get": {
        "summary": "Download a record",
        "description": "Download a record.",
        "operationId": "get-records-id-download",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/records/%7Bid%7D/download \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D/download',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D/download\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D/download');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/records/{id}/steps": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId"
        }
      ],
      "get": {
        "summary": "List all steps for a record",
        "description": "List all steps for a record.",
        "operationId": "get-records-id-steps",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "check",
                  "form",
                  "document",
                  "review"
                ]
              }
            },
            "examples": {
              "one": {
                "value": [
                  "check"
                ],
                "summary": "Expand one step type"
              },
              "multiple": {
                "value": [
                  "check",
                  "form"
                ],
                "summary": "Expand multiple step types"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/RecordSteps"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "step",
                      "id": 2,
                      "type": "check.photo_id",
                      "preferences": {
                        "report_type": "standard",
                        "face": true,
                        "liveness": true,
                        "facial_similarity": false,
                        "live_document": false,
                        "docs": [
                          "passport",
                          "driving_licence",
                          "national_id"
                        ],
                        "issuing_countries": null,
                        "right_to_work": null,
                        "right_to_rent": null
                      },
                      "check": 82342,
                      "cost": 1,
                      "completed_at": null
                    },
                    {
                      "object": "step",
                      "id": 3,
                      "type": "document.request",
                      "preferences": {
                        "title": "Utility bill",
                        "instructions": "A utility bill dated within the last three months."
                      },
                      "document": 23123,
                      "cost": 0,
                      "completed_at": null
                    },
                    {
                      "object": "step",
                      "id": 4,
                      "type": "form",
                      "form": "4bd9bfca-e61d-4a68-99b3-ca61a02f650f",
                      "cost": 0,
                      "completed_at": null
                    }
                  ],
                  "total": 3,
                  "count": 3,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/records/%7Bid%7D/steps?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=check' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D/steps',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE', expand: 'check'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D/steps?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=check\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D/steps');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'expand' => 'check'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/records/{id}/documents": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId"
        }
      ],
      "get": {
        "summary": "List all documents for a record",
        "description": "List all documents for a record.",
        "operationId": "get-records-id-documents",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "attachments"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/RecordDocument"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "returned": {
                    "summary": "Sent document with a return requirement",
                    "description": "A sent document requested to be returned, with it's completed returned document.",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "record_document",
                          "id": 3245,
                          "type": "sent",
                          "name": "3e337df9-872a-4753-b86a-87cb535ee16d.pdf",
                          "status": "complete",
                          "config": {
                            "require_return": true,
                            "require_confirmation": false,
                            "instructions": "Non-disclosure agreement",
                            "return_message": "Please sign and return the NDA."
                          },
                          "source": {
                            "type": "record",
                            "id": 456884
                          },
                          "attachments": [
                            {
                              "object": "attachment",
                              "id": 1267,
                              "name": "1d420ac7-a87a-444a-936b-dc29991ab8ed.pdf",
                              "original": "NDA-final.pdf",
                              "type": "application/pdf",
                              "size": 74590,
                              "av_status": "clean",
                              "created_at": "2022-08-24T14:15:22Z",
                              "updated_at": "2022-08-24T14:15:22Z"
                            }
                          ],
                          "created_at": "2022-08-24T14:15:22Z",
                          "updated_at": "2022-08-24T14:15:22Z",
                          "completed_at": "2022-08-25T11:02:13Z"
                        },
                        {
                          "object": "record_document",
                          "id": 3389,
                          "type": "returned",
                          "name": "35adbb44-be59-450c-bc41-fb32bded8e86.pdf",
                          "status": "complete",
                          "config": null,
                          "source": {
                            "type": "record_document",
                            "id": 3245
                          },
                          "attachments": [
                            {
                              "object": "attachment",
                              "id": 1484,
                              "name": "35adbb44-be59-450c-bc41-fb32bded8e86.pdf",
                              "original": "NDA-final (signed).pdf",
                              "type": "application/pdf",
                              "size": 78448,
                              "av_status": "clean",
                              "created_at": "2022-08-25T11:02:13Z",
                              "updated_at": "2022-08-25T11:02:13Z"
                            }
                          ],
                          "created_at": "2022-08-24T14:15:22Z",
                          "updated_at": "2022-08-25T11:02:13Z",
                          "completed_at": "2022-08-25T11:02:13Z"
                        }
                      ],
                      "total": 2,
                      "count": 2,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "sent": {
                    "summary": "Sent document",
                    "description": "A document sent that has not yet been downloaded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "record_document",
                          "id": 3015,
                          "type": "sent",
                          "name": "7081ef74-44e8-4ee4-9371-023b5a146639.pdf",
                          "status": "pending",
                          "config": {
                            "require_return": false,
                            "require_confirmation": false,
                            "instructions": "Terms and conditions of rental agreement.",
                            "return_message": null
                          },
                          "source": {
                            "type": "record",
                            "id": 442103
                          },
                          "attachments": [
                            {
                              "object": "attachment",
                              "id": 1267,
                              "name": "8162343a-9478-46fb-a342-a1de74e8da5f.pdf",
                              "original": "TOCs.pdf",
                              "type": "application/pdf",
                              "size": 84564,
                              "av_status": "clean",
                              "created_at": "2022-08-11T10:12:01Z",
                              "updated_at": "2022-08-11T10:12:01Z"
                            }
                          ],
                          "created_at": "2022-08-11T10:12:01Z",
                          "updated_at": "2022-08-11T10:12:01Z",
                          "completed_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "sent_collapsed": {
                    "summary": "Sent document (collapsed attachments)",
                    "description": "Sent document without expanded attachments",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "record_document",
                          "id": 3015,
                          "type": "sent",
                          "name": "7081ef74-44e8-4ee4-9371-023b5a146639.pdf",
                          "status": "pending",
                          "config": {
                            "require_return": false,
                            "require_confirmation": false,
                            "instructions": "Terms and conditions of rental agreement.",
                            "return_message": null
                          },
                          "source": {
                            "type": "record",
                            "id": 442103
                          },
                          "attachments": [
                            1267
                          ],
                          "created_at": "2022-08-11T10:12:01Z",
                          "updated_at": "2022-08-11T10:12:01Z",
                          "completed_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "requested": {
                    "summary": "Requested document",
                    "description": "A request for a document to be uploaded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "record_document",
                          "id": 5481,
                          "type": "requested",
                          "name": "3e337df9-872a-4753-b86a-87cb535ee16d.pdf",
                          "status": "pending",
                          "config": {
                            "instructions": "A utility bill dated within the last three months."
                          },
                          "source": {
                            "type": "record",
                            "id": 3247
                          },
                          "attachments": null,
                          "created_at": "2019-08-24T14:15:22Z",
                          "updated_at": "2019-08-24T14:15:22Z",
                          "completed_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/records/%7Bid%7D/documents?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D/documents',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE', expand: 'ARRAY_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D/documents?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D/documents');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/checks/{id}": {
      "get": {
        "summary": "Retrieve a check",
        "description": "Retrieve a check.",
        "operationId": "get-checks-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/resourceId",
            "description": "Unique check identifier"
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "record",
                  "response"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Check-2"
                },
                "examples": {
                  "pending": {
                    "summary": "Pending",
                    "description": "A check that has not yet been completed.",
                    "value": {
                      "object": "check",
                      "id": 82342,
                      "type": "identity",
                      "record": 983434,
                      "status": "pending",
                      "response": null,
                      "allow_replay": true,
                      "allow_cancel": true,
                      "requires_consent": true,
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z"
                    }
                  },
                  "photo_id": {
                    "summary": "Photo ID",
                    "description": "Expanded response: Photo ID check type\n",
                    "value": {
                      "object": "check",
                      "id": 82342,
                      "type": "identity",
                      "record": 983434,
                      "status": "accepted",
                      "response": {
                        "object": "check_response.photo_id",
                        "status": "complete",
                        "result": "clear",
                        "reports": [
                          {
                            "type": "document",
                            "status": "complete",
                            "result": "clear",
                            "breakdown": {
                              "age_validation": {
                                "result": "clear",
                                "breakdown": {
                                  "minimum_accepted_age": {
                                    "result": "clear"
                                  }
                                }
                              },
                              "compromised_document": {
                                "result": "clear",
                                "breakdown": {
                                  "document_database": {
                                    "result": "clear"
                                  },
                                  "repeat_attempts": {
                                    "result": "clear"
                                  }
                                }
                              },
                              "data_comparison": {
                                "result": "clear",
                                "breakdown": {
                                  "first_name": {
                                    "result": "clear"
                                  },
                                  "last_name": {
                                    "result": "clear"
                                  },
                                  "date_of_birth": {
                                    "result": "clear"
                                  }
                                }
                              },
                              "data_consistency": {
                                "result": "clear",
                                "breakdown": {
                                  "issuing_country": {
                                    "result": "clear"
                                  },
                                  "document_numbers": {
                                    "result": "clear"
                                  },
                                  "nationality": {
                                    "result": "clear"
                                  },
                                  "gender": {
                                    "result": "clear"
                                  },
                                  "document_type": {
                                    "result": "clear"
                                  },
                                  "date_of_expiry": {
                                    "result": "clear"
                                  },
                                  "date_of_birth": {
                                    "result": "clear"
                                  },
                                  "last_name": {
                                    "result": "clear"
                                  },
                                  "first_name": {
                                    "result": "clear"
                                  }
                                }
                              },
                              "data_validation": {
                                "result": "clear",
                                "breakdown": {
                                  "mrz": {
                                    "result": "clear"
                                  },
                                  "document_expiration": {
                                    "result": "clear"
                                  },
                                  "expiry_date": {
                                    "result": "clear"
                                  },
                                  "date_of_birth": {
                                    "result": "clear"
                                  },
                                  "gender": {
                                    "result": "clear"
                                  },
                                  "document_numbers": {
                                    "result": "clear"
                                  }
                                }
                              },
                              "image_integrity": {
                                "result": "clear",
                                "breakdown": {
                                  "supported_document": {
                                    "result": "clear"
                                  }
                                },
                                "image_quality": {
                                  "result": "clear",
                                  "properties": {
                                    "glare_on_photo": {
                                      "result": "clear"
                                    },
                                    "blurred_photo": {
                                      "result": "clear"
                                    },
                                    "covered_photo": {
                                      "result": "clear"
                                    },
                                    "other_photo_issue": {
                                      "result": "clear"
                                    },
                                    "incorrect_side": {
                                      "result": "clear"
                                    },
                                    "cut_off_document": {
                                      "result": "clear"
                                    },
                                    "no_document_in_image": {
                                      "result": "clear"
                                    },
                                    "two_documents_uploaded": {
                                      "result": "clear"
                                    }
                                  },
                                  "colour_picture": {
                                    "result": "clear"
                                  },
                                  "conclusive_document_quality": {
                                    "result": "clear",
                                    "properties": {
                                      "watermarks_digital_text_overlay": {
                                        "result": "clear"
                                      },
                                      "punctured_document": {
                                        "result": "clear"
                                      },
                                      "obscured_security_features": {
                                        "result": "clear"
                                      },
                                      "obscured_data_points": {
                                        "result": "clear"
                                      },
                                      "missing_back": {
                                        "result": "clear"
                                      },
                                      "digital_document": {
                                        "result": "clear"
                                      },
                                      "corner_removed": {
                                        "result": "clear"
                                      },
                                      "abnormal_document_features": {
                                        "result": "clear"
                                      }
                                    }
                                  }
                                }
                              },
                              "issuing_authority": {
                                "result": "clear",
                                "breakdown": {
                                  "nfc_passive_authentication": {
                                    "result": "clear"
                                  },
                                  "nfc_active_authentication": {
                                    "result": "clear"
                                  }
                                }
                              },
                              "police_record": {
                                "result": "clear"
                              },
                              "visual_authenticity": {
                                "result": "clear",
                                "breakdown": {
                                  "face_detection": {
                                    "result": "clear"
                                  },
                                  "digital_tampering": {
                                    "result": "clear"
                                  },
                                  "original_document_present": {
                                    "result": "clear",
                                    "properties": {
                                      "screenshot": {
                                        "result": "clear"
                                      },
                                      "document_on_printed_paper": {
                                        "result": "clear"
                                      },
                                      "photo_of_screen": {
                                        "result": "clear"
                                      },
                                      "scan": {
                                        "result": "clear"
                                      }
                                    }
                                  },
                                  "picture_face_integrity": {
                                    "result": "clear"
                                  },
                                  "security_features": {
                                    "result": "clear"
                                  },
                                  "fonts": {
                                    "result": "clear"
                                  },
                                  "template": {
                                    "result": "clear"
                                  }
                                }
                              }
                            },
                            "document_data": {
                              "document_type": "passport",
                              "first_name": "MARTIN",
                              "last_name": "MCFLY",
                              "middle_name": null,
                              "date_of_birth": "1968-06-12",
                              "gender": "male",
                              "document_numbers": [
                                {
                                  "type": "document_number",
                                  "value": "112233445"
                                }
                              ],
                              "issuing_authority": null,
                              "issuing_country": "GBR",
                              "issuing_state": null,
                              "issuing_date": "2019-08-24",
                              "date_of_expiry": "2039-07-01",
                              "mrz_line1": "P<GBRMMCFLY<<<<<MARTIN<<<<<<<<<<<<<<<<<<<<<<",
                              "mrz_line2": "1122334459GBR6806121M3907019<<<<<<<<<<<<<<01",
                              "mrz_line3": null,
                              "nationality": "GBR",
                              "place_of_birth": "EDINBURGH",
                              "nfc": null
                            }
                          }
                        ],
                        "media": [
                          {
                            "type": "document",
                            "attachment": {
                              "object": "attachment",
                              "id": 31785,
                              "name": "14592310-706e-4bae-9171-83db2fa9d0fb.jpg",
                              "original": "passport.jpg",
                              "type": "image/jpeg",
                              "size": 16053,
                              "av_status": "clean",
                              "created_at": "2022-05-22T08:22:12Z",
                              "updated_at": "2022-05-22T08:22:12Z"
                            },
                            "document_type": "passport",
                            "side": "front",
                            "issuing_country": "GBR",
                            "has_nfc": false
                          }
                        ]
                      },
                      "allow_replay": true,
                      "allow_cancel": true,
                      "requires_consent": true,
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z"
                    }
                  },
                  "other": {
                    "summary": "Expanded response: Unavailable check type\n",
                    "description": "A check type with an expanded response that is not yet available from the API.",
                    "value": {
                      "object": "check",
                      "id": 82342,
                      "type": "identity",
                      "record": 983434,
                      "status": "accepted",
                      "response": {
                        "object": "check_response.other"
                      },
                      "allow_replay": true,
                      "allow_cancel": true,
                      "requires_consent": true,
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Check not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/checks/%7Bid%7D?expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/checks/%7Bid%7D',\n  qs: {expand: 'ARRAY_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/checks/%7Bid%7D?expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/checks/%7Bid%7D');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/records/{id}/assignees": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique record identifier."
        }
      ],
      "get": {
        "summary": "List all assignees for a record",
        "description": "List all assignees for a record.",
        "operationId": "get-records-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Record Assignees"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/TeamMember-2"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "assignee",
                      "id": 34535,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 121,
                        "name": "Lorraine Baines",
                        "email": "lorraine@example.com",
                        "role": "owner"
                      }
                    },
                    {
                      "object": "assignee",
                      "id": 34538,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 472,
                        "name": "Dennis Jones",
                        "email": "dennis@example.com",
                        "role": "member"
                      }
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Record not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees?page=INTEGER_VALUE&limit=INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees?page=INTEGER_VALUE&limit=INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Add assignees to a record",
        "description": "Add one or more assignees to a record, merging them with existing assignees.\n\nExisting assignees to the record are not included in the response. Only added assignees to the record will be returned.\n\nTo replace assignees, refer to **[Replace assignees for a record](#operation/put-records-id-assignees)**.\n",
        "operationId": "post-records-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Record Assignees"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Assignee"
                    },
                    {
                      "type": "object",
                      "required": [
                        "type",
                        "team_member"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "team_member": {
                          "type": "integer",
                          "description": "The unique identifier of the team member to be assigned to the record."
                        },
                        "type": {
                          "type": "string",
                          "const": "team_member",
                          "description": "The type of assignee to be assigned to the record."
                        }
                      }
                    }
                  ]
                }
              },
              "example": [
                {
                  "type": "team_member",
                  "team_member": 121
                },
                {
                  "type": "team_member",
                  "team_member": 472
                }
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (one or more assignees to the record have been added)",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "total": {
                          "minimum": 1
                        },
                        "count": {
                          "minimum": 1,
                          "maximum": 100
                        },
                        "limit": {
                          "minimum": 100,
                          "const": 100
                        },
                        "data": {
                          "minItems": 1,
                          "maxItems": 100,
                          "items": {
                            "$ref": "#/components/schemas/TeamMember-2"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "assignee",
                      "id": 34535,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 121,
                        "name": "Lorraine Baines",
                        "email": "lorraine@example.com",
                        "role": "owner"
                      }
                    },
                    {
                      "object": "assignee",
                      "id": 34538,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 472,
                        "name": "Dennis Jones",
                        "email": "dennis@example.com",
                        "role": "member"
                      }
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "has_more": false,
                  "url": "https://id.amiqus.co/api/v2/records/87249/assignees"
                }
              }
            }
          },
          "204": {
            "description": "No Content (assignees to the record have been successfully deleted or there are no changes)"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Record not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema"
                },
                "example": {
                  "errors": [
                    "The submitted value must be an array of assignee objects"
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"type\":\"team_member\",\"team_member\":0}]'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: [{type: 'team_member', team_member: 0}],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify([\n  {\n    \"type\": \"team_member\",\n    \"team_member\": 0\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('[{\"type\":\"team_member\",\"team_member\":0}]');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "put": {
        "summary": "Replace assignees for a record",
        "description": "Replacing all existing assignees for a record.\n\nExisting assignees to the record that are included in the request will be part of the updated assignees to the record but they will not be shown in the response. Only added assignees will be returned.\n\nTo add additional assignees, refer to **[Add assignees for a record](#operation/post-records-id-assignees)**.\n",
        "operationId": "put-records-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Record Assignees"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Assignee"
                    },
                    {
                      "type": "object",
                      "required": [
                        "type",
                        "team_member"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "team_member": {
                          "type": "integer",
                          "description": "The unique identifier of the team member to be assigned to the record."
                        },
                        "type": {
                          "type": "string",
                          "const": "team_member",
                          "description": "The type of assignee to be assigned to the record."
                        }
                      }
                    }
                  ]
                }
              },
              "example": [
                {
                  "type": "team_member",
                  "team_member": 121
                },
                {
                  "type": "team_member",
                  "team_member": 523
                }
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (one or more assignees to the record have been replaced)",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "total": {
                          "minimum": 1
                        },
                        "count": {
                          "minimum": 1,
                          "maximum": 100
                        },
                        "limit": {
                          "minimum": 100,
                          "const": 100
                        },
                        "data": {
                          "minItems": 1,
                          "maxItems": 100,
                          "items": {
                            "$ref": "#/components/schemas/TeamMember-2"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "assignee",
                      "id": 34535,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 121,
                        "name": "Lorraine Baines",
                        "email": "lorraine@example.com",
                        "role": "owner"
                      }
                    },
                    {
                      "object": "assignee",
                      "id": 34541,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 523,
                        "name": "Clara Clayton",
                        "email": "clara@example.com",
                        "role": "owner"
                      }
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "has_more": false,
                  "url": "https://id.amiqus.co/api/v2/records/87249/assignees"
                }
              }
            }
          },
          "204": {
            "description": "No Content (no new assignees to the record have been replaced)"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Record not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema"
                },
                "example": {
                  "errors": [
                    "The submitted value must be an array of assignee objects"
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"type\":\"team_member\",\"team_member\":0}]'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: [{type: 'team_member', team_member: 0}],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify([\n  {\n    \"type\": \"team_member\",\n    \"team_member\": 0\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('[{\"type\":\"team_member\",\"team_member\":0}]');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees');\n$request->setRequestMethod('PUT');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "delete": {
        "summary": "Delete assignees for a record",
        "description": "Remove all assignees from a record.",
        "operationId": "delete-records-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Record Assignees"
        ],
        "requestBody": {
          "content": {
            "application/json": {}
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Record not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7Bid%7D/assignees');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/records/{recordId}/assignees/{assigneeId}": {
      "delete": {
        "summary": "Delete assignee for a record",
        "description": "Remove a single assignee from a record.\n\nTo list all of a record's assignees, see **[List all assignees for a record](#operation/get-records-id-assignees)**.\n",
        "operationId": "delete-records-recordId-assignees-assigneeId",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Record Assignees"
        ],
        "parameters": [
          {
            "name": "recordId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unique record identifier."
            }
          },
          {
            "name": "assigneeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Unique assignee identifier."
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {}
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Record not found",
                        "Assignee not found"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/records/%7BrecordId%7D/assignees/%7BassigneeId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/records/%7BrecordId%7D/assignees/%7BassigneeId%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/records/%7BrecordId%7D/assignees/%7BassigneeId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7BrecordId%7D/assignees/%7BassigneeId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/teams/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique team identifier."
        }
      ]
    },
    "/teams/{teamId}/members": {
      "get": {
        "summary": "List all team members",
        "description": "List all team members.",
        "operationId": "get-teams-teamId-members",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/TeamMember"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "team_member",
                      "id": 121,
                      "name": "Lorraine Baines",
                      "email": "lorraine@example.com",
                      "role": "owner"
                    },
                    {
                      "object": "team_member",
                      "id": 472,
                      "name": "Dennis Jones",
                      "email": "dennis@example.com",
                      "role": "member"
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/teams/%7BteamId%7D/members \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/teams/%7BteamId%7D/members',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/teams/%7BteamId%7D/members\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/teams/%7BteamId%7D/members');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/teams/{teamId}/members/{teamMemberId}": {
      "get": {
        "summary": "Retrieve a team member",
        "description": "Returns the member of a team.",
        "operationId": "get-teams-teamId-members-teamMemberId",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Teams"
        ],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "teamMemberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamMember"
                },
                "example": {
                  "object": "team_member",
                  "id": 121,
                  "name": "Lorraine Baines",
                  "email": "lorraine@example.com",
                  "role": "owner"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/teams/%7BteamId%7D/members/%7BteamMemberId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/teams/%7BteamId%7D/members/%7BteamMemberId%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/teams/%7BteamId%7D/members/%7BteamMemberId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/teams/%7BteamId%7D/members/%7BteamMemberId%7D');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/documents": {
      "get": {
        "summary": "List all documents",
        "description": "List all library documents.",
        "operationId": "get-documents",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Documents"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "attachment"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Document-5"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "single": {
                    "summary": "Single document",
                    "description": "A single document with attachment expanded.",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "document",
                          "id": 3342,
                          "name": "Non-disclosure agreement",
                          "description": "Generic non-disclosure agreement",
                          "is_enabled": true,
                          "attachment": {
                            "object": "attachment",
                            "id": 43375,
                            "name": "367452af-3931-4207-851a-adda324cd3d6.pdf",
                            "original": "NDA-final.pdf",
                            "type": "application/pdf",
                            "size": 272534,
                            "av_status": "clean",
                            "created_at": "2022-08-17T13:56:05Z",
                            "updated_at": "2022-08-17T13:56:05Z"
                          },
                          "created_at": "2022-08-17T13:56:05Z",
                          "updated_at": "2022-08-17T13:56:05Z"
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "multiple": {
                    "summary": "Multiple documents",
                    "description": "Multiple documents without attachments expanded.",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "document",
                          "id": 3342,
                          "name": "Non-disclosure agreement",
                          "description": "Generic non-disclosure agreement",
                          "is_enabled": true,
                          "attachment": 43375,
                          "created_at": "2022-08-17T13:56:05Z",
                          "updated_at": "2022-08-17T13:56:05Z"
                        },
                        {
                          "object": "document",
                          "id": 3561,
                          "name": "Rental application",
                          "description": "Rental and housing application form",
                          "is_enabled": false,
                          "attachment": 45418,
                          "created_at": "2022-09-02T11:53:34Z",
                          "updated_at": "2022-09-02T11:53:34Z"
                        }
                      ],
                      "total": 2,
                      "count": 2,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/documents?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE&expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/documents',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    enabled: 'BOOLEAN_VALUE',\n    expand: 'ARRAY_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/documents?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE&expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/documents');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'enabled' => 'BOOLEAN_VALUE',\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/templates/emails": {
      "get": {
        "summary": "List all email templates",
        "description": "List all email templates.",
        "operationId": "get-templates-emails",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/EmailTemplate"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "email_template",
                      "id": 1383,
                      "name": "NDA",
                      "description": "Non-disclosure agreement",
                      "content": "Itaque eum sint. Repudiandae odio quia doloremque fugit nisi sed. Qui omnis minima cumque minima amet minima illo.",
                      "is_enabled": true,
                      "created_at": "2022-08-24T11:26:22Z",
                      "updated_at": "2022-08-24T11:26:22Z"
                    },
                    {
                      "object": "email_template",
                      "id": 2119,
                      "name": "Onboarding",
                      "description": "A new client's onboarding request",
                      "content": "Voluptatibus repellat aspernatur dolores non voluptatem sapiente esse id.\nTenetur illo enim harum repellat ex omnis nihil iure qui.\nQui aspernatur velit aut qui qui quis. Accusantium culpa est accusantium. Qui et in sit praesentium et. Ex labore nihil sunt fugit exercitationem quis quia suscipit.",
                      "is_enabled": false,
                      "created_at": "2022-09-02T08:14:51Z",
                      "updated_at": "2022-09-02T08:14:51Z"
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/templates/emails?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/templates/emails',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE', enabled: 'BOOLEAN_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/templates/emails?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/templates/emails');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'enabled' => 'BOOLEAN_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/templates/documents": {
      "get": {
        "summary": "List all document templates",
        "description": "List all document templates.",
        "operationId": "get-templates-documents",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/DocumentTemplate"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "document_template",
                      "id": 88456,
                      "name": "Utility bill",
                      "description": "Bill dated within three months",
                      "content": "Please upload a utility bill showing your name and current address dated within the last three months.",
                      "is_enabled": true,
                      "created_at": "2022-08-27T13:03:54Z",
                      "updated_at": "2022-08-27T13:03:54Z"
                    }
                  ],
                  "total": 1,
                  "count": 1,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/templates/documents?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/templates/documents',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE', enabled: 'BOOLEAN_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/templates/documents?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/templates/documents');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'enabled' => 'BOOLEAN_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/templates/records": {
      "get": {
        "summary": "List all record templates",
        "description": "List all record templates returns a paginated list of record templates associated with the team.",
        "operationId": "get-templates-records",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/RecordTemplate"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "record_template",
                      "id": 43723,
                      "name": "Identity verification",
                      "description": "Identity verification for new clients",
                      "presets": {
                        "steps": [
                          {
                            "object": "preset_step",
                            "type": "check.photo_id",
                            "preferences": {
                              "report_type": "standard",
                              "face": true,
                              "liveness": true,
                              "facial_similarity": true,
                              "live_document": true,
                              "docs": [
                                "passport",
                                "driving_licence",
                                "national_id"
                              ],
                              "issuing_countries": null,
                              "right_to_work": null,
                              "right_to_rent": null
                            }
                          },
                          {
                            "object": "preset_step",
                            "type": "document.request",
                            "preferences": {
                              "template": 78432
                            }
                          }
                        ],
                        "notification": "email",
                        "message": "Modi praesentium incidunt optio corrupti. Error sunt et atque ut qui facere ipsa sed. Illo ut voluptas numquam sapiente.\nInventore est nisi animi et consequatur iure deserunt quam reiciendis. Dolor eligendi tempora id aut quos temporibus asperiores omnis necessitatibus. Vel vel nihil autem alias dignissimos.\nQuia dolores et sequi est rem. Neque at debitis facere ullam ut eligendi distinctio cumque itaque. Eum dignissimos ea. Reiciendis corporis hic sunt cupiditate dolor est. Saepe et qui unde earum et eum est. Qui architecto maxime ab aut dolor voluptatum qui sed consequatur.",
                        "reminder": true,
                        "is_declaration_required": false
                      },
                      "is_enabled": true,
                      "created_at": "2022-08-13T14:12:53Z",
                      "updated_at": "2022-08-13T14:12:53Z"
                    },
                    {
                      "object": "record_template",
                      "id": 43812,
                      "name": "Onboarding",
                      "description": "Onboarding for new staff members",
                      "presets": {
                        "steps": [
                          {
                            "object": "preset_step",
                            "type": "check.criminal_record",
                            "preferences": {
                              "region": "scotland",
                              "enable_payment": false
                            }
                          },
                          {
                            "object": "preset_step",
                            "type": "check.photo_id",
                            "preferences": {
                              "report_type": "standard",
                              "face": true,
                              "liveness": true,
                              "facial_similarity": true,
                              "live_document": true,
                              "docs": [
                                "passport",
                                "driving_licence"
                              ]
                            }
                          }
                        ],
                        "notification": "email",
                        "message": "Welcome to the team, please complete the onboarding steps.",
                        "reminder": false,
                        "is_declaration_required": true,
                        "assignees": [
                          623,
                          626
                        ]
                      },
                      "is_enabled": true,
                      "created_at": "2022-08-24T11:26:22Z",
                      "updated_at": "2022-08-24T11:26:22Z"
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/templates/records?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/templates/records',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE', enabled: 'BOOLEAN_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/templates/records?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/templates/records');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'enabled' => 'BOOLEAN_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/files": {
      "get": {
        "summary": "List all files",
        "description": "List all files.",
        "operationId": "get-files",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Files"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Sort results by file name, date of upload or file expiry date. Results returned in ID order by default.",
            "schema": {
              "type": "string",
              "enum": [
                "created_at",
                "updated_at",
                "expires_at"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/order_by"
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "source",
                  "created_by"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/File"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "file",
                          "id": 31788,
                          "type": "internal",
                          "source": {
                            "id": 31788,
                            "type": "client"
                          },
                          "name": "73db4d13-6c1b-40b1-94fc-2cf6d7ac22d2.pdf",
                          "attachment": {
                            "object": "attachment",
                            "id": 31782,
                            "name": "73db4d13-6c1b-40b1-94fc-2cf6d7ac22d2.pdf",
                            "original": "NDA-final.pdf",
                            "type": "application/pdf",
                            "size": 16053,
                            "av_status": "clean",
                            "created_at": "2019-08-24T14:15:22Z",
                            "updated_at": "2019-08-24T14:15:22Z"
                          },
                          "created_by": {
                            "id": 121,
                            "type": "team_member"
                          },
                          "is_deletable": true,
                          "expires_at": "2027-08-24T23:59:59Z",
                          "created_at": "2019-08-24T14:15:22Z",
                          "updated_at": "2019-08-24T14:15:22Z",
                          "redacted_at": null
                        },
                        {
                          "object": "file",
                          "id": 31431,
                          "type": "sent",
                          "source": {
                            "id": 133144,
                            "type": "record_document"
                          },
                          "name": "186a4641-337a-4a1f-86ba-0bc6d81a3ed4.pdf",
                          "attachment": {
                            "object": "attachment",
                            "id": 31431,
                            "name": "186a4641-337a-4a1f-86ba-0bc6d81a3ed4.pdf",
                            "original": "NDA-final.pdf",
                            "type": "application/pdf",
                            "size": 265434,
                            "av_status": "clean",
                            "created_at": "2020-03-11T12:43:55Z",
                            "updated_at": "2020-03-11T12:43:55Z"
                          },
                          "created_by": {
                            "id": 472,
                            "type": "team_member"
                          },
                          "is_deletable": false,
                          "expires_at": "2027-08-24T23:59:59Z",
                          "created_at": "2020-03-11T12:43:55Z",
                          "updated_at": "2020-03-11T12:43:55Z",
                          "redacted_at": "2025-11-03T10:43:22Z"
                        },
                        {
                          "object": "file",
                          "id": 31432,
                          "type": "received",
                          "source": {
                            "id": 133145,
                            "type": "record_document"
                          },
                          "name": "cd349cd8-28e9-4e71-bc46-e99726b7b914.pdf",
                          "attachment": {
                            "object": "attachment",
                            "id": 31432,
                            "name": "cd349cd8-28e9-4e71-bc46-e99726b7b914.pdf",
                            "original": "NDA-final(signed).pdf",
                            "type": "application/pdf",
                            "size": 278311,
                            "av_status": "clean",
                            "created_at": "2020-03-12T06:31:46Z",
                            "updated_at": "2020-03-12T06:31:46Z"
                          },
                          "created_by": {
                            "id": 73823,
                            "type": "client"
                          },
                          "is_deletable": false,
                          "expires_at": null,
                          "created_at": "2020-03-12T06:31:46Z",
                          "updated_at": "2020-03-12T06:31:46Z",
                          "redacted_at": null
                        },
                        {
                          "object": "file",
                          "id": 32332,
                          "type": "received",
                          "source": {
                            "id": 167,
                            "type": "client_document"
                          },
                          "name": "name-change.pdf",
                          "attachment": {
                            "object": "attachment",
                            "id": 32332,
                            "name": "72302f7e-f01c-3311-90f4-577d431de56be.pdf",
                            "original": "name-change.pdf",
                            "type": "application/pdf",
                            "size": 278311,
                            "av_status": "clean",
                            "created_at": "2021-06-12T12:31:46Z",
                            "updated_at": "2021-06-12T12:31:46Z"
                          },
                          "created_by": {
                            "id": 421,
                            "type": "team_member"
                          },
                          "is_deletable": true,
                          "expires_at": null,
                          "created_at": "2021-06-12T12:31:46Z",
                          "updated_at": "2021-06-12T12:31:46Z",
                          "redacted_at": null
                        }
                      ],
                      "total": 4,
                      "count": 4,
                      "limit": 25,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/files?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/files',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE',\n    expand: 'ARRAY_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/files?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/files');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE',\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/webhooks": {
      "get": {
        "summary": "List all webhooks",
        "description": "Returns a paginated list of webhooks.\n\nTo retrieve a webhook, refer to **[Retrieve a webhook](#operation/get-webhooks-id)**.\n",
        "operationId": "get-webhooks",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Webhook"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "webhook",
                      "id": 2154,
                      "uuid": "e4085749-1c11-4ac8-9361-df7f33c37ecb",
                      "url": "https://example.org/incoming/webhooks/amiqus",
                      "secret": "58585568aa4dc44c733bc244495fc1f2de3c2d2f56287c265274ab806f74bb34",
                      "events": [
                        "client.*",
                        "record.*"
                      ],
                      "is_enabled": true,
                      "created_at": "2022-08-24T11:26:22Z",
                      "updated_at": "2022-08-24T11:26:22Z"
                    },
                    {
                      "object": "webhook",
                      "id": 2159,
                      "url": "https://beta.example.org/webhooks/incoming",
                      "uuid": "0c416908-3a4a-4ee5-96fb-a780783e8b64",
                      "events": [
                        "*"
                      ],
                      "is_enabled": true,
                      "secret": "44c733bc56287c265274ab806f74bb34244495fc1f2de3c2d2f58585568aa4dc",
                      "created_at": "2022-08-24T12:05:53Z",
                      "updated_at": "2022-08-24T12:05:53Z"
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/webhooks?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/webhooks',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE', enabled: 'BOOLEAN_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/webhooks?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/webhooks');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'enabled' => 'BOOLEAN_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Create a webhook",
        "description": "Create a webhook.",
        "operationId": "post-webhooks",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Webhook"
                  },
                  {
                    "type": "object",
                    "required": [
                      "url",
                      "events"
                    ],
                    "properties": {
                      "is_enabled": {
                        "default": true
                      }
                    }
                  }
                ]
              },
              "example": {
                "url": "https://example.org/incoming/webhooks/amiqus",
                "events": [
                  "client.*",
                  "record.*"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                },
                "example": {
                  "object": "webhook",
                  "id": 2154,
                  "uuid": "e4085749-1c11-4ac8-9361-df7f33c37ecb",
                  "url": "https://example.org/incoming/webhooks/amiqus",
                  "secret": "58585568aa4dc44c733bc244495fc1f2de3c2d2f56287c265274ab806f74bb34",
                  "events": [
                    "client.*",
                    "record.*"
                  ],
                  "is_enabled": true,
                  "created_at": "2022-08-24T11:26:22Z",
                  "updated_at": "2022-08-24T11:26:22Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/webhooks \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"url\":\"string\",\"events\":[\"*\"],\"is_enabled\":true}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/webhooks',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {url: 'string', events: ['*'], is_enabled: true},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"url\": \"string\",\n  \"events\": [\n    \"*\"\n  ],\n  \"is_enabled\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/webhooks\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"url\":\"string\",\"events\":[\"*\"],\"is_enabled\":true}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/webhooks');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/webhooks/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique webhook identifier."
        }
      ],
      "get": {
        "summary": "Retrieve a webhook",
        "description": "Retrieve a webhook.",
        "operationId": "get-webhooks-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                },
                "example": {
                  "object": "webhook",
                  "id": 2154,
                  "uuid": "e4085749-1c11-4ac8-9361-df7f33c37ecb",
                  "url": "https://example.org/incoming/webhooks/amiqus",
                  "secret": "58585568aa4dc44c733bc244495fc1f2de3c2d2f56287c265274ab806f74bb34",
                  "events": [
                    "client.*",
                    "record.*"
                  ],
                  "is_enabled": true,
                  "created_at": "2022-08-24T11:26:22Z",
                  "updated_at": "2022-08-24T11:26:22Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Webhook not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/webhooks/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/webhooks/%7Bid%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/webhooks/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/webhooks/%7Bid%7D');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "patch": {
        "summary": "Update a webhook",
        "description": "Update a webhook.",
        "operationId": "patch-webhooks-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Webhook"
                  }
                ]
              },
              "examples": {
                "all": {
                  "summary": "URL and events",
                  "description": "Update both the URL and subscribed events.",
                  "value": {
                    "url": "https://example.org/incoming/webhooks/amiqus",
                    "events": [
                      "client.*"
                    ]
                  }
                },
                "multiple": {
                  "summary": "URL only",
                  "description": "Update only the URL.",
                  "value": {
                    "url": "https://beta.example.org/webhooks/incoming"
                  }
                },
                "disable": {
                  "summary": "Disable webhook",
                  "description": "Prevent the webhook being triggered.",
                  "value": {
                    "is_enabled": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                },
                "example": {
                  "object": "webhook",
                  "id": 2154,
                  "uuid": "e4085749-1c11-4ac8-9361-df7f33c37ecb",
                  "url": "https://example.org/incoming/webhooks/amiqus",
                  "secret": "58585568aa4dc44c733bc244495fc1f2de3c2d2f56287c265274ab806f74bb34",
                  "events": [
                    "client.*",
                    "record.*"
                  ],
                  "is_enabled": true,
                  "created_at": "2022-08-24T11:26:22Z",
                  "updated_at": "2022-08-24T11:26:22Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Webhook not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PATCH \\\n  --url https://id.amiqus.co/api/v2/webhooks/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"url\":\"string\",\"events\":[\"*\"],\"is_enabled\":true}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://id.amiqus.co/api/v2/webhooks/%7Bid%7D',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {url: 'string', events: ['*'], is_enabled: true},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"url\": \"string\",\n  \"events\": [\n    \"*\"\n  ],\n  \"is_enabled\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://id.amiqus.co/api/v2/webhooks/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"url\":\"string\",\"events\":[\"*\"],\"is_enabled\":true}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/webhooks/%7Bid%7D');\n$request->setRequestMethod('PATCH');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "delete": {
        "summary": "Delete a webhook",
        "description": "Delete a webhook.",
        "operationId": "delete-webhooks-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Webhook not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/webhooks/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/webhooks/%7Bid%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/webhooks/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/webhooks/%7Bid%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/webhooks/{id}/deliveries": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique webhook identifier."
        }
      ],
      "get": {
        "summary": "List all deliveries for a webhook",
        "description": "List all deliveries for a webhook.",
        "operationId": "get-webhooks-id-deliveries",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/WebhookDelivery"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "ping": {
                    "summary": "Ping",
                    "description": "Example of a successful delivery for a `ping` event.",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "webhook_delivery",
                          "id": 4532,
                          "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                          "event": "ping",
                          "attempts": 1,
                          "request": {
                            "url": "https://example.org/incoming/webhooks/amiqus",
                            "method": "POST",
                            "headers": {
                              "Content-Length": "1234",
                              "Host": "example.org",
                              "User-Agent": "Amiqus AmiqusID/8927532",
                              "Content-Type": "application/json",
                              "X-AQID-Signature": "I4BqQLTTfg1i24UFa9o9wS+qf+lo9BVeuBlO6tS5Y20=",
                              "X-AQID-Delivery-Id": "d7583a16-ad9e-4ec8-a53f-ffc67fd2445c"
                            },
                            "body": {
                              "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
                              "event": "ping",
                              "sent_at": "2019-08-24T14:15:22Z",
                              "data": [
                                "ping"
                              ]
                            }
                          },
                          "response": {
                            "status_code": "204",
                            "headers": {
                              "Cache-Control": "no-cache, private",
                              "Date": "Mon, 22 Aug 2022 16:20:33 GMT"
                            },
                            "body": {}
                          },
                          "last_sent_at": "2019-08-24T14:15:22Z"
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Webhook not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/webhooks/%7Bid%7D/deliveries?page=INTEGER_VALUE&limit=INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/webhooks/%7Bid%7D/deliveries',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/webhooks/%7Bid%7D/deliveries?page=INTEGER_VALUE&limit=INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/webhooks/%7Bid%7D/deliveries');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/forms": {
      "get": {
        "summary": "List all forms",
        "description": "List all forms.",
        "operationId": "get-forms",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Forms"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "created_at",
                "updated_at"
              ]
            },
            "description": "Sort results by date. Results returned in created_at order by default."
          },
          {
            "name": "order_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            },
            "description": "Order results in ascending or descending order."
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client",
                  "record"
                ]
              }
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filter by internal client forms (`internal`), or requested for completion by the client (`requested`). Includes both by default.",
            "schema": {
              "type": "string",
              "enum": [
                "internal",
                "requested"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/Form-3"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "form",
                      "id": 37344,
                      "reference": "2ddb20b8-e0e3-45ae-a638-42610b990a6a",
                      "type": "requested",
                      "client": 73212,
                      "record": 87564,
                      "name": "New starter form",
                      "description": null,
                      "instructions": null,
                      "fields": [
                        {
                          "id": "1",
                          "type": "section",
                          "label": "",
                          "fields": [
                            "2"
                          ]
                        },
                        {
                          "id": "2",
                          "type": "section",
                          "label": "Onboarding",
                          "fields": [
                            "3",
                            "4"
                          ]
                        },
                        {
                          "id": "3",
                          "type": "text",
                          "label": "Job title",
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": null
                        },
                        {
                          "id": "4",
                          "type": "radio",
                          "label": {
                            "value": "Contract type",
                            "options": [
                              "Full-time",
                              "Part-time"
                            ]
                          },
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": null
                        }
                      ],
                      "version": 1,
                      "created_at": "2022-10-11T13:41:38Z",
                      "updated_at": "2022-10-11T13:41:38Z",
                      "completed_at": null,
                      "archived_at": null
                    },
                    {
                      "object": "form",
                      "id": 37523,
                      "reference": "4fdb5ab5-f83e-4b52-926b-340e880bb030",
                      "type": "internal",
                      "client": 54812,
                      "record": null,
                      "name": "Onboarding checklist",
                      "description": "Checklist for all new employees.",
                      "instructions": null,
                      "fields": [
                        {
                          "id": "1",
                          "type": "section",
                          "label": "",
                          "fields": [
                            "2",
                            "3"
                          ]
                        },
                        {
                          "id": "2",
                          "type": "radio",
                          "label": {
                            "value": "Location",
                            "options": [
                              "Office",
                              "Remote",
                              "Hybrid"
                            ]
                          },
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": "Remote"
                        },
                        {
                          "id": "3",
                          "type": "radio",
                          "label": {
                            "value": "Department",
                            "options": [
                              "Sales",
                              "Marketing",
                              "Legal",
                              "Admin"
                            ]
                          },
                          "validation": [
                            "required"
                          ],
                          "flag": false,
                          "value": "Admin"
                        }
                      ],
                      "version": 2,
                      "created_at": "2022-11-02T15:55:38Z",
                      "updated_at": "2022-11-05T20:02:06Z",
                      "completed_at": null,
                      "archived_at": null
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/forms?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE&type=STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/forms',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE',\n    expand: 'ARRAY_VALUE',\n    type: 'STRING_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/forms?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE&type=STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/forms');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE',\n  'expand' => 'ARRAY_VALUE',\n  'type' => 'STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/form-templates": {
      "get": {
        "summary": "List all form templates",
        "description": "List all form templates.",
        "operationId": "get-form-templates",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "enabled",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/FormTemplate"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "form_template",
                      "id": 45533,
                      "reference": "9b81f60f-2165-4e2c-b748-6c3071053e66",
                      "name": "New starter form",
                      "description": null,
                      "instructions": null,
                      "fields": [
                        {
                          "id": "1",
                          "type": "section",
                          "label": "",
                          "fields": [
                            "2"
                          ]
                        },
                        {
                          "id": "2",
                          "type": "section",
                          "label": "Onboarding",
                          "fields": [
                            "3",
                            "4"
                          ]
                        },
                        {
                          "id": "3",
                          "type": "text",
                          "label": "Job title",
                          "validation": [
                            "required"
                          ]
                        },
                        {
                          "id": "4",
                          "type": "radio",
                          "label": {
                            "value": "Contract type",
                            "options": [
                              "Full-time",
                              "Part-time"
                            ]
                          },
                          "validation": [
                            "required"
                          ]
                        }
                      ],
                      "version": 4,
                      "is_enabled": true,
                      "created_at": "2022-08-24T11:26:22Z",
                      "updated_at": "2022-08-24T11:26:22Z",
                      "archived_at": null
                    }
                  ],
                  "total": 1,
                  "count": 1,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/form-templates?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/form-templates',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE', enabled: 'BOOLEAN_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/form-templates?page=INTEGER_VALUE&limit=INTEGER_VALUE&enabled=BOOLEAN_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/form-templates');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'enabled' => 'BOOLEAN_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Create a form template",
        "description": "Create a form template.",
        "operationId": "post-form-templates",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Templates"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/FormTemplate"
                  },
                  {
                    "type": "object",
                    "required": [
                      "name",
                      "fields"
                    ],
                    "properties": {
                      "is_enabled": {
                        "default": true
                      }
                    }
                  }
                ]
              },
              "examples": {
                "simple": {
                  "summary": "Simple",
                  "description": "A simple form with two required fields inside a section.",
                  "value": {
                    "name": "New starter form",
                    "fields": [
                      {
                        "id": "1",
                        "type": "section",
                        "label": "",
                        "fields": [
                          "2"
                        ]
                      },
                      {
                        "id": "2",
                        "type": "section",
                        "label": "Onboarding",
                        "fields": [
                          "3",
                          "4"
                        ]
                      },
                      {
                        "id": "3",
                        "type": "text",
                        "label": "Job title",
                        "validation": [
                          "required"
                        ]
                      },
                      {
                        "id": "4",
                        "type": "radio",
                        "label": {
                          "value": "Contract type",
                          "options": [
                            "Full-time",
                            "Part-time"
                          ]
                        },
                        "validation": [
                          "required"
                        ]
                      }
                    ]
                  }
                },
                "advanced": {
                  "summary": "Advanced",
                  "description": "An advanced form with multiple sections, fields and mixed validation requirements.",
                  "value": {
                    "name": "Property requirements",
                    "description": null,
                    "fields": [
                      {
                        "id": "2",
                        "type": "section",
                        "label": "",
                        "fields": [
                          "3",
                          "7",
                          "12"
                        ]
                      },
                      {
                        "id": "3",
                        "type": "section",
                        "label": "Current property",
                        "fields": [
                          "4",
                          "8"
                        ]
                      },
                      {
                        "id": "4",
                        "type": "radio",
                        "validation": [
                          "required"
                        ],
                        "label": {
                          "value": "Ownership",
                          "options": [
                            "Rented",
                            "Home-owner (outright)",
                            "Home-owner (mortgaged)",
                            "Other"
                          ]
                        }
                      },
                      {
                        "id": "7",
                        "type": "section",
                        "label": "Requirements",
                        "fields": [
                          "11",
                          "10"
                        ]
                      },
                      {
                        "id": "8",
                        "type": "text",
                        "label": "Duration",
                        "description": "The number of months you've been a resident at your current property.",
                        "validation": [
                          "required"
                        ]
                      },
                      {
                        "id": "10",
                        "type": "text",
                        "label": "Bedrooms",
                        "description": "Enter the minimum number of bedrooms required.",
                        "validation": [
                          "required"
                        ]
                      },
                      {
                        "id": "11",
                        "type": "checkbox",
                        "label": {
                          "value": "Requirements",
                          "options": [
                            "Garden",
                            "Driveway",
                            "New Home"
                          ]
                        },
                        "description": "Tick any specific requirements."
                      },
                      {
                        "id": "12",
                        "type": "textarea",
                        "label": "Notes",
                        "description": "Provide any additional details that might be useful."
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormTemplate"
                },
                "example": {
                  "object": "form_template",
                  "id": 45533,
                  "reference": "9b81f60f-2165-4e2c-b748-6c3071053e66",
                  "name": "New starter form",
                  "description": null,
                  "instructions": null,
                  "fields": [
                    {
                      "id": "1",
                      "type": "section",
                      "label": "",
                      "fields": [
                        "2"
                      ]
                    },
                    {
                      "id": "2",
                      "type": "section",
                      "label": "Onboarding",
                      "fields": [
                        "3",
                        "4"
                      ]
                    },
                    {
                      "id": "3",
                      "type": "text",
                      "label": "Job title",
                      "validation": [
                        "required"
                      ]
                    },
                    {
                      "id": "4",
                      "type": "radio",
                      "label": {
                        "value": "Contract type",
                        "options": [
                          "Full-time",
                          "Part-time"
                        ]
                      },
                      "validation": [
                        "required"
                      ]
                    }
                  ],
                  "version": 4,
                  "is_enabled": true,
                  "created_at": "2022-08-24T11:26:22Z",
                  "updated_at": "2022-08-24T11:26:22Z",
                  "archived_at": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/form-templates \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"description\":null,\"instructions\":{},\"fields\":[{\"id\":\"string\",\"type\":\"section\",\"label\":\"string\",\"fields\":[\"string\"]},{\"id\":\"string\",\"type\":\"section\",\"label\":\"string\",\"fields\":[\"string\"]}],\"is_enabled\":true}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/form-templates',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {\n    name: 'string',\n    description: null,\n    instructions: {},\n    fields: [\n      {id: 'string', type: 'section', label: 'string', fields: ['string']},\n      {id: 'string', type: 'section', label: 'string', fields: ['string']}\n    ],\n    is_enabled: true\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"name\": \"string\",\n  \"description\": null,\n  \"instructions\": {},\n  \"fields\": [\n    {\n      \"id\": \"string\",\n      \"type\": \"section\",\n      \"label\": \"string\",\n      \"fields\": [\n        \"string\"\n      ]\n    },\n    {\n      \"id\": \"string\",\n      \"type\": \"section\",\n      \"label\": \"string\",\n      \"fields\": [\n        \"string\"\n      ]\n    }\n  ],\n  \"is_enabled\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/form-templates\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"name\":\"string\",\"description\":null,\"instructions\":{},\"fields\":[{\"id\":\"string\",\"type\":\"section\",\"label\":\"string\",\"fields\":[\"string\"]},{\"id\":\"string\",\"type\":\"section\",\"label\":\"string\",\"fields\":[\"string\"]}],\"is_enabled\":true}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/form-templates');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/form-templates/{reference}": {
      "parameters": [
        {
          "name": "reference",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "summary": "Retrieve a form template",
        "description": "Retrieve a form template.",
        "operationId": "get-form-templates-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Templates"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormTemplate"
                },
                "example": {
                  "object": "form_template",
                  "id": 45533,
                  "reference": "9b81f60f-2165-4e2c-b748-6c3071053e66",
                  "name": "New starter form",
                  "description": null,
                  "instructions": null,
                  "fields": [
                    {
                      "id": "1",
                      "type": "section",
                      "label": "",
                      "fields": [
                        "2"
                      ]
                    },
                    {
                      "id": "2",
                      "type": "section",
                      "label": "Onboarding",
                      "fields": [
                        "3",
                        "4"
                      ]
                    },
                    {
                      "id": "3",
                      "type": "text",
                      "label": "Job title",
                      "validation": [
                        "required"
                      ]
                    },
                    {
                      "id": "4",
                      "type": "radio",
                      "label": {
                        "value": "Contract type",
                        "options": [
                          "Full-time",
                          "Part-time"
                        ]
                      },
                      "validation": [
                        "required"
                      ]
                    }
                  ],
                  "version": 4,
                  "is_enabled": true,
                  "created_at": "2022-08-24T11:26:22Z",
                  "updated_at": "2022-08-24T11:26:22Z",
                  "archived_at": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url https://id.amiqus.co/api/v2/form-templates/%7Breference%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/form-templates/%7Breference%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/form-templates/%7Breference%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/form-templates/%7Breference%7D');\n$request->setRequestMethod('GET');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "patch": {
        "summary": "Update a form template",
        "description": "Update a form template.",
        "operationId": "patch-form-templates-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Templates"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "minProperties": 1,
                "$ref": "#/components/schemas/FormTemplate"
              },
              "examples": {
                "fields": {
                  "summary": "Add fields",
                  "description": "Update the \"New starter form\" adding a new multple choice answer.",
                  "value": {
                    "fields": [
                      {
                        "id": "1",
                        "type": "section",
                        "label": "",
                        "fields": [
                          "2"
                        ]
                      },
                      {
                        "id": "2",
                        "type": "section",
                        "label": "Onboarding",
                        "fields": [
                          "3",
                          "4"
                        ]
                      },
                      {
                        "id": "3",
                        "type": "text",
                        "label": "Job title",
                        "validation": [
                          "required"
                        ]
                      },
                      {
                        "id": "4",
                        "type": "radio",
                        "label": {
                          "value": "Contract type",
                          "options": [
                            "Full-time",
                            "Part-time",
                            "Contractor"
                          ]
                        },
                        "validation": [
                          "required"
                        ]
                      }
                    ]
                  }
                },
                "disable": {
                  "summary": "Disable form",
                  "description": "Disable the \"New starter form\".",
                  "value": {
                    "is_enabled": false
                  }
                },
                "details": {
                  "summary": "Form details",
                  "description": "Update name and description details.",
                  "value": {
                    "name": "New starter form (internship)",
                    "description": "New starter onboarding sent to all internship applicants."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FormTemplate"
                },
                "example": {
                  "object": "form_template",
                  "id": 45533,
                  "reference": "9b81f60f-2165-4e2c-b748-6c3071053e66",
                  "name": "New starter form",
                  "description": null,
                  "instructions": null,
                  "fields": [
                    {
                      "id": "1",
                      "type": "section",
                      "label": "",
                      "fields": [
                        "2"
                      ]
                    },
                    {
                      "id": "2",
                      "type": "section",
                      "label": "Onboarding",
                      "fields": [
                        "3",
                        "4"
                      ]
                    },
                    {
                      "id": "3",
                      "type": "text",
                      "label": "Job title",
                      "validation": [
                        "required"
                      ]
                    },
                    {
                      "id": "4",
                      "type": "radio",
                      "label": {
                        "value": "Contract type",
                        "options": [
                          "Full-time",
                          "Part-time",
                          "Contractor"
                        ]
                      },
                      "validation": [
                        "required"
                      ]
                    }
                  ],
                  "version": 5,
                  "is_enabled": true,
                  "created_at": "2022-08-24T11:26:22Z",
                  "updated_at": "2022-09-12T09:06:45Z",
                  "archived_at": null
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PATCH \\\n  --url https://id.amiqus.co/api/v2/form-templates/%7Breference%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"description\":null,\"instructions\":{},\"fields\":[{\"id\":\"string\",\"type\":\"section\",\"label\":\"string\",\"fields\":[\"string\"]},{\"id\":\"string\",\"type\":\"section\",\"label\":\"string\",\"fields\":[\"string\"]}],\"is_enabled\":true}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://id.amiqus.co/api/v2/form-templates/%7Breference%7D',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {\n    name: 'string',\n    description: null,\n    instructions: {},\n    fields: [\n      {id: 'string', type: 'section', label: 'string', fields: ['string']},\n      {id: 'string', type: 'section', label: 'string', fields: ['string']}\n    ],\n    is_enabled: true\n  },\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"name\": \"string\",\n  \"description\": null,\n  \"instructions\": {},\n  \"fields\": [\n    {\n      \"id\": \"string\",\n      \"type\": \"section\",\n      \"label\": \"string\",\n      \"fields\": [\n        \"string\"\n      ]\n    },\n    {\n      \"id\": \"string\",\n      \"type\": \"section\",\n      \"label\": \"string\",\n      \"fields\": [\n        \"string\"\n      ]\n    }\n  ],\n  \"is_enabled\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://id.amiqus.co/api/v2/form-templates/%7Breference%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"name\":\"string\",\"description\":null,\"instructions\":{},\"fields\":[{\"id\":\"string\",\"type\":\"section\",\"label\":\"string\",\"fields\":[\"string\"]},{\"id\":\"string\",\"type\":\"section\",\"label\":\"string\",\"fields\":[\"string\"]}],\"is_enabled\":true}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/form-templates/%7Breference%7D');\n$request->setRequestMethod('PATCH');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "delete": {
        "summary": "Delete a form template",
        "description": "Delete a form template.",
        "operationId": "delete-form-templates-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Templates"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "$ref": "#/components/responses/403"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/form-templates/%7Breference%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/form-templates/%7Breference%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/form-templates/%7Breference%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/form-templates/%7Breference%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/steps": {
      "get": {
        "summary": "List all steps",
        "description": "List all steps available for use.",
        "operationId": "get-steps",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Steps"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/AvailableSteps"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "available_step",
                      "type": "check.identity",
                      "costs": [
                        1
                      ]
                    },
                    {
                      "object": "available_step",
                      "type": "check.photo_id",
                      "costs": [
                        1,
                        2,
                        3,
                        4
                      ]
                    },
                    {
                      "object": "available_step",
                      "type": "check.watchlist",
                      "costs": [
                        2,
                        3,
                        4
                      ]
                    },
                    {
                      "object": "available_step",
                      "type": "document.request",
                      "costs": [
                        0
                      ]
                    },
                    {
                      "object": "available_step",
                      "type": "document.transfer",
                      "costs": [
                        0
                      ]
                    }
                  ],
                  "total": 5,
                  "count": 5,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/steps?page=INTEGER_VALUE&limit=INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/steps',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/steps?page=INTEGER_VALUE&limit=INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/steps');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Validate steps",
        "description": "Validate steps and return costs.",
        "operationId": "post-steps",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Steps"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "steps"
                ],
                "properties": {
                  "steps": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/RecordStepsWrite"
                    },
                    "minItems": 1
                  }
                }
              },
              "examples": {
                "simple": {
                  "summary": "Simple",
                  "description": "Steps containing an identity check and a standard Photo ID check with passport and driving licence document types enabled.",
                  "value": {
                    "steps": [
                      {
                        "type": "check.identity"
                      },
                      {
                        "type": "check.photo_id",
                        "preferences": {
                          "report_type": "standard",
                          "docs": [
                            "passport",
                            "driving_licence"
                          ]
                        }
                      }
                    ]
                  }
                },
                "advanced": {
                  "summary": "Advanced",
                  "description": "Steps containing checks, documents and forms.",
                  "value": {
                    "steps": [
                      {
                        "type": "check.photo_id",
                        "preferences": {
                          "report_type": "standard",
                          "facial_similarity": true,
                          "live_document": true,
                          "docs": [
                            "passport"
                          ],
                          "issuing_countries": null,
                          "right_to_work": "GBR"
                        }
                      },
                      {
                        "type": "document.request",
                        "preferences": {
                          "template": 88456
                        }
                      },
                      {
                        "type": "document.transfer",
                        "preferences": {
                          "template": 3316,
                          "returned": true,
                          "instructions": "Rental agreement",
                          "return_message": "Please sign and return the rental agreement."
                        }
                      },
                      {
                        "type": "document.transfer",
                        "preferences": {
                          "name": "Non-disclosure agreement",
                          "attachment": 7432
                        }
                      },
                      {
                        "type": "form",
                        "preferences": {
                          "form": "61085d27-676e-47ae-a3b6-ae4e5d857fc1"
                        }
                      },
                      {
                        "type": "form",
                        "preferences": {
                          "form": "e2019279-8c53-47ee-a910-e5048300b334"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidatedSteps"
                },
                "examples": {
                  "simple": {
                    "summary": "Simple",
                    "description": "Validated steps containing an identity check and a standard Photo ID check with passport and driving licence document types enabled.",
                    "value": {
                      "object": "validated_steps",
                      "steps": [
                        {
                          "object": "validated_step",
                          "type": "check.identity",
                          "cost": 2
                        },
                        {
                          "object": "validated_step",
                          "type": "check.photo_id",
                          "cost": 2
                        }
                      ]
                    }
                  },
                  "advanced": {
                    "summary": "Advanced",
                    "description": "Validated steps containing a check, document request, document transfers and forms.",
                    "value": {
                      "object": "validated_steps",
                      "steps": [
                        {
                          "object": "validated_step",
                          "type": "check.photo_id",
                          "cost": 2
                        },
                        {
                          "object": "validated_step",
                          "type": "document.request",
                          "cost": 0
                        },
                        {
                          "object": "validated_step",
                          "type": "document.transfer",
                          "cost": 0
                        },
                        {
                          "object": "validated_step",
                          "type": "document.transfer",
                          "cost": 0
                        },
                        {
                          "object": "validated_step",
                          "type": "form",
                          "cost": 0
                        },
                        {
                          "object": "validated_step",
                          "type": "form",
                          "cost": 0
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/steps \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"steps\":[{\"type\":\"check.credit\"}]}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/steps',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {steps: [{type: 'check.credit'}]},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"steps\": [\n    {\n      \"type\": \"check.credit\"\n    }\n  ]\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/steps\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"steps\":[{\"type\":\"check.credit\"}]}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/steps');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/attachments": {
      "post": {
        "summary": "Create an attachment",
        "description": "Create an attachment.",
        "operationId": "post-attachments",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Attachments"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "attachment"
                ],
                "properties": {
                  "attachment": {
                    "type": "string",
                    "format": "binary",
                    "description": "Supported file types: pdf, docx, doc, xlsx, xls, csv, txt, jpg, png, tiff, zip.\n\nFile size limit: 100MB.\n"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attachment"
                },
                "example": {
                  "object": "attachment",
                  "id": 31782,
                  "name": "14592310-706e-4bae-9171-83db2fa9d0fb.pdf",
                  "original": "NDA.pdf",
                  "type": "application/pdf",
                  "size": 16053,
                  "av_status": "clean",
                  "created_at": "2023-01-13T11:54:24Z",
                  "updated_at": "2023-01-13T11:54:24Z"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/attachments \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: multipart/form-data' \\\n  --form attachment=string"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/attachments',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'multipart/form-data'\n  },\n  formData: {attachment: 'string'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = new FormData();\ndata.append(\"attachment\", \"string\");\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/attachments\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->addForm([\n  'attachment' => 'string'\n], null);\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/attachments');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/attachments/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "The unique attachment identifier."
        }
      ],
      "delete": {
        "summary": "Delete an attachment",
        "description": "Delete an attachment\n\nOnly unassigned attachment can be deleted.\n",
        "operationId": "delete-attachments-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Attachments"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Attachment not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/attachments/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/attachments/%7Bid%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/attachments/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/attachments/%7Bid%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/attachments/{id}/redact": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "The unique attachment identifier."
        }
      ],
      "put": {
        "summary": "Redact an attachment",
        "description": "Replace an attachment with a generic \"This file has been removed due to a data deletion request\" .png image. The file name will be updated to append \"redacted\" and other information retained.\n\nOnly attachments that are of type `record_document` or uploaded as part of a form are eligible for redaction.\n",
        "operationId": "put-attachments-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Attachments"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Attachment"
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "attachment",
                      "id": 31782,
                      "name": "14592310-706e-4bae-9171-83db2fa9d0fb.pdf",
                      "original": "NDAredacted.pdf-redacted.png",
                      "type": "image/png",
                      "size": 5645,
                      "av_status": "clean",
                      "created_at": "2023-01-13T11:54:24Z",
                      "updated_at": "2023-01-14T11:54:24Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Attachment not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/schema"
                },
                "example": {
                  "errors": [
                    "Attachment {id} cannot be redacted"
                  ]
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PUT \\\n  --url https://id.amiqus.co/api/v2/attachments/%7Bid%7D/redact \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PUT',\n  url: 'https://id.amiqus.co/api/v2/attachments/%7Bid%7D/redact',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PUT\", \"https://id.amiqus.co/api/v2/attachments/%7Bid%7D/redact\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/attachments/%7Bid%7D/redact');\n$request->setRequestMethod('PUT');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/sdk_token": {
      "post": {
        "summary": "Create an SDK token",
        "description": "Create an SDK token.",
        "operationId": "post-sdk_token",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Other Resources"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "record_id"
                ],
                "$ref": "#/components/schemas/SdkToken"
              },
              "example": {
                "record_id": 44568
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SdkToken"
                },
                "example": {
                  "object": "sdk_token",
                  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjQ5OTEzNzYwMCwiZXhwIjo0OTkxMzc2NjAsIm1hcnR5IjoiU291bmRzIHByZXR0eSBoZWF2eS4iLCJkb2MiOiJXZWlnaHQgaGFzIG5vdGhpbmcgdG8gZG8gd2l0aCBpdC4iLCLwn5GLIjoiVGhpcyBpcyBub3QgYSB2YWxpZCBTREsgVG9rZW4uIn0.j2jAeX_MpagkS7qvBjF9uYYIawP_uvEPqnftEW9wDe8"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/sdk_token \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"record_id\":0}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/sdk_token',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {record_id: 0},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"record_id\": 0\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/sdk_token\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"record_id\":0}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/sdk_token');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/checks/{checkId}/employment/activities/{activityUuid}/evidence": {
      "parameters": [
        {
          "name": "checkId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer",
            "description": "Unique check identifier."
          }
        },
        {
          "name": "activityUuid",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid",
            "description": "Unique employment activity identifier."
          }
        }
      ]
    },
    "/cases": {
      "get": {
        "summary": "List all cases",
        "description": "List all cases.\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "get-cases",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "reference",
                "client.name.first_name",
                "client.name.last_name",
                "created_at",
                "updated_at",
                "archived_at"
              ],
              "description": "Sort results by name, reference, client name or date. Results returned in created_at order by default."
            }
          },
          {
            "name": "order_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "description": "Order results in ascending or descending order. Results returned in ascending order by default."
            }
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client",
                  "items",
                  "assignees"
                ]
              }
            }
          },
          {
            "name": "status",
            "description": "Filter cases by their current status.\n\n**Note:** `pending` is deprecated.\n",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ClientCaseStatus"
              }
            },
            "examples": {
              "one": {
                "value": [
                  "approved"
                ],
                "summary": "Filter by a single status."
              },
              "multiple": {
                "value": [
                  "approved",
                  "rejected"
                ],
                "summary": "Filter by multiple statuses."
              }
            }
          },
          {
            "name": "visibility",
            "description": "Filter cases by their current visibility. Both \"active\" and \"archived\" cases are returned by default.",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "created_by",
            "description": "Filter cases created by team member user ID",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "assigned_to",
            "description": "Filter cases assigned to a team member user ID",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "boolean",
                  "enum": [
                    false
                  ],
                  "description": "Filter unassigned cases"
                }
              ]
            }
          },
          {
            "name": "client",
            "description": "Filter cases by associated client ID",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "client_visibility",
            "description": "Filter cases by the visibility of their associated client. By default cases are returned for both active and archived clients.",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          },
          {
            "name": "reference",
            "description": "Filter cases by reference",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "description": "Search for cases by case name and client name (first, middle and last). Search is case-insensitive and fuzzy.",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/ClientCase"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "case",
                          "id": 8723,
                          "name": "Full-time onboarding",
                          "reference": "AQFT123",
                          "status": "pending",
                          "client": 73845,
                          "items": [
                            587,
                            698
                          ],
                          "assignees": [
                            187,
                            947
                          ],
                          "created_at": "2022-05-22T08:22:12Z",
                          "updated_at": "2022-05-22T08:22:12Z",
                          "archived_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "client_expanded": {
                    "summary": "Client expanded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "case",
                          "id": 8723,
                          "name": "Full-time onboarding",
                          "reference": "AQFT123",
                          "status": "pending",
                          "client": {
                            "object": "client",
                            "id": 73845,
                            "status": "pending",
                            "name": {
                              "object": "name",
                              "title": "mr",
                              "other_title": null,
                              "first_name": "Martin",
                              "middle_name": "Seamus",
                              "last_name": "McFly",
                              "name": "Martin McFly",
                              "full_name": "Martin Seamus McFly",
                              "complete_name": "Mr Martin Seamus McFly"
                            },
                            "email": "marty@example.com",
                            "landline": null,
                            "mobile": null,
                            "dob": null,
                            "reference": null,
                            "national_insurance_number": null,
                            "is_deletable": true,
                            "deletion_date": "2026-01-14",
                            "created_at": "2022-05-21T14:15:22Z",
                            "updated_at": "2022-05-21T14:15:22Z",
                            "archived_at": null
                          },
                          "items": [
                            587,
                            698
                          ],
                          "assignees": [
                            187,
                            947
                          ],
                          "created_at": "2022-05-22T08:22:12Z",
                          "updated_at": "2022-05-22T08:22:12Z",
                          "archived_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "items_expanded": {
                    "summary": "Items expanded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "case",
                          "id": 8723,
                          "name": "Full-time onboarding",
                          "reference": "AQFT123",
                          "status": "pending",
                          "client": 73845,
                          "items": [
                            {
                              "object": "case_item",
                              "id": 587,
                              "entity": {
                                "id": 7845,
                                "type": "record"
                              },
                              "created_at": "2022-05-22T08:22:12Z",
                              "updated_at": "2022-05-22T08:22:12Z"
                            },
                            {
                              "object": "case_item",
                              "id": 698,
                              "entity": {
                                "id": 4587,
                                "type": "record"
                              },
                              "created_at": "2022-05-22T08:22:12Z",
                              "updated_at": "2022-05-22T08:22:12Z"
                            }
                          ],
                          "assignees": [
                            187,
                            947
                          ],
                          "created_at": "2022-05-22T08:22:12Z",
                          "updated_at": "2022-05-22T08:22:12Z",
                          "archived_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "assignees_expanded": {
                    "summary": "Assignees expanded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "case",
                          "id": 8723,
                          "name": "Full-time onboarding",
                          "reference": "AQFT123",
                          "status": "pending",
                          "client": 73845,
                          "items": [
                            587,
                            698
                          ],
                          "assignees": {
                            "object": "list",
                            "data": [
                              {
                                "object": "team_member",
                                "id": 187,
                                "name": "Ross Green",
                                "email": "ross.green@example.com",
                                "role": "member"
                              },
                              {
                                "object": "team_member",
                                "id": 947,
                                "name": "Wayne Murray",
                                "email": "wayne.murray@example.com",
                                "role": "read-only"
                              }
                            ],
                            "total": 2,
                            "count": 2,
                            "limit": 10,
                            "has_more": false,
                            "url": "https://id.amiqus.co/api/v2/cases/8723/assignees"
                          },
                          "created_at": "2022-05-22T08:22:12Z",
                          "updated_at": "2022-05-22T08:22:12Z",
                          "archived_at": null
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/cases?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE&status=approved&visibility=STRING_VALUE&created_by=INTEGER_VALUE&assigned_to=QUERY_VALUE&client=INTEGER_VALUE&client_visibility=STRING_VALUE&reference=STRING_VALUE&search=STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/cases',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE',\n    expand: 'ARRAY_VALUE',\n    status: 'approved',\n    visibility: 'STRING_VALUE',\n    created_by: 'INTEGER_VALUE',\n    assigned_to: 'QUERY_VALUE',\n    client: 'INTEGER_VALUE',\n    client_visibility: 'STRING_VALUE',\n    reference: 'STRING_VALUE',\n    search: 'STRING_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/cases?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE&status=approved&visibility=STRING_VALUE&created_by=INTEGER_VALUE&assigned_to=QUERY_VALUE&client=INTEGER_VALUE&client_visibility=STRING_VALUE&reference=STRING_VALUE&search=STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/cases');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE',\n  'expand' => 'ARRAY_VALUE',\n  'status' => 'approved',\n  'visibility' => 'STRING_VALUE',\n  'created_by' => 'INTEGER_VALUE',\n  'assigned_to' => 'QUERY_VALUE',\n  'client' => 'INTEGER_VALUE',\n  'client_visibility' => 'STRING_VALUE',\n  'reference' => 'STRING_VALUE',\n  'search' => 'STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Create a case",
        "description": "Create a case.\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "post-cases",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Cases"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "client"
                ],
                "properties": {
                  "client": {
                    "type": "integer",
                    "description": "The unique client identifier."
                  },
                  "name": {
                    "type": "string",
                    "description": "The case name."
                  },
                  "reference": {
                    "type": "string",
                    "description": "The case reference."
                  }
                }
              },
              "example": {
                "client": 7832,
                "name": "Full-time onboarding",
                "reference": "AQFT123"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientCase"
                },
                "example": {
                  "object": "case",
                  "id": 8723,
                  "name": "Full-time onboarding",
                  "reference": "AQFT123",
                  "status": "action_required",
                  "client": 7832,
                  "items": null,
                  "assignees": null,
                  "created_at": "2022-05-22T08:22:12Z",
                  "updated_at": "2022-05-22T08:22:12Z",
                  "archived_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/cases \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"client\":0,\"name\":\"string\",\"reference\":\"string\"}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/cases',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {client: 0, name: 'string', reference: 'string'},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"client\": 0,\n  \"name\": \"string\",\n  \"reference\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/cases\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"client\":0,\"name\":\"string\",\"reference\":\"string\"}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/cases');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/cases/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "The unique case identifier."
        }
      ],
      "get": {
        "summary": "Retrieve a case",
        "description": "Retrieve a case.\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "get-cases-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "client",
                  "items",
                  "assignees"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientCase"
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "case",
                      "id": 8723,
                      "name": "Full-time onboarding",
                      "reference": "AQFT123",
                      "status": "pending",
                      "client": 73845,
                      "items": [
                        587,
                        698
                      ],
                      "assignees": [
                        187,
                        947
                      ],
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z",
                      "archived_at": null
                    }
                  },
                  "client_expanded": {
                    "summary": "Client expanded",
                    "value": {
                      "object": "case",
                      "id": 8723,
                      "name": "Full-time onboarding",
                      "reference": "AQFT123",
                      "status": "pending",
                      "client": {
                        "object": "client",
                        "id": 73845,
                        "status": "pending",
                        "name": {
                          "object": "name",
                          "title": "mr",
                          "other_title": null,
                          "first_name": "Martin",
                          "middle_name": "Seamus",
                          "last_name": "McFly",
                          "name": "Martin McFly",
                          "full_name": "Martin Seamus McFly",
                          "complete_name": "Mr Martin Seamus McFly"
                        },
                        "email": "marty@example.com",
                        "landline": null,
                        "mobile": null,
                        "dob": null,
                        "reference": null,
                        "national_insurance_number": null,
                        "is_deletable": true,
                        "deletion_date": "2026-01-14",
                        "created_at": "2022-05-21T14:15:22Z",
                        "updated_at": "2022-05-21T14:15:22Z",
                        "archived_at": null
                      },
                      "items": [
                        587,
                        698
                      ],
                      "assignees": [
                        187,
                        947
                      ],
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z",
                      "archived_at": null
                    }
                  },
                  "items_expanded": {
                    "summary": "Items expanded",
                    "value": {
                      "object": "case",
                      "id": 8723,
                      "name": "Full-time onboarding",
                      "reference": "AQFT123",
                      "status": "pending",
                      "client": 73845,
                      "items": [
                        {
                          "object": "case_item",
                          "id": 587,
                          "entity": {
                            "id": 7845,
                            "type": "record"
                          },
                          "created_at": "2022-05-22T08:22:12Z",
                          "updated_at": "2022-05-22T08:22:12Z"
                        },
                        {
                          "object": "case_item",
                          "id": 698,
                          "entity": {
                            "id": 4587,
                            "type": "record"
                          },
                          "created_at": "2022-05-22T08:22:12Z",
                          "updated_at": "2022-05-22T08:22:12Z"
                        }
                      ],
                      "assignees": [
                        187,
                        947
                      ],
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z",
                      "archived_at": null
                    }
                  },
                  "assignees_expanded": {
                    "summary": "Assignees expanded",
                    "value": {
                      "object": "case",
                      "id": 8723,
                      "name": "Full-time onboarding",
                      "reference": "AQFT123",
                      "status": "pending",
                      "client": 73845,
                      "items": [
                        587,
                        698
                      ],
                      "assignees": {
                        "object": "list",
                        "data": [
                          {
                            "object": "team_member",
                            "id": 187,
                            "name": "Ross Green",
                            "email": "ross.green@example.com",
                            "role": "member"
                          },
                          {
                            "object": "team_member",
                            "id": 947,
                            "name": "Wayne Murray",
                            "email": "wayne.murray@example.com",
                            "role": "read-only"
                          }
                        ],
                        "total": 2,
                        "count": 2,
                        "limit": 10,
                        "has_more": false,
                        "url": "https://id.amiqus.co/api/v2/cases/8723/assignees"
                      },
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z",
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Case not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/cases/%7Bid%7D?expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/cases/%7Bid%7D',\n  qs: {expand: 'ARRAY_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/cases/%7Bid%7D?expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/cases/%7Bid%7D');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "patch": {
        "summary": "Update a case",
        "description": "Update the details of a case.\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "patch-cases-id",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Cases"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The case name."
                  },
                  "reference": {
                    "type": [
                      "null",
                      "string"
                    ],
                    "description": "The case reference."
                  },
                  "is_archived": {
                    "type": "boolean",
                    "description": "Allows toggling of archived state."
                  }
                }
              },
              "examples": {
                "basic": {
                  "summary": "Basic",
                  "description": "Update the case name and reference.",
                  "value": {
                    "name": "Part-time onboarding",
                    "reference": "AQPT123"
                  }
                },
                "archive": {
                  "summary": "Archive",
                  "description": "Archive the case.",
                  "value": {
                    "is_archived": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientCase"
                },
                "example": {
                  "object": "case",
                  "id": 8723,
                  "name": "Part-time onboarding",
                  "reference": "AQPT123",
                  "status": "pending",
                  "client": 7832,
                  "items": [
                    587,
                    698
                  ],
                  "assignees": [
                    187,
                    947
                  ],
                  "created_at": "2022-05-22T08:22:12Z",
                  "updated_at": "2022-05-22T08:22:12Z",
                  "archived_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Case not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PATCH \\\n  --url https://id.amiqus.co/api/v2/cases/%7Bid%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"name\":\"string\",\"reference\":null,\"is_archived\":true}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://id.amiqus.co/api/v2/cases/%7Bid%7D',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {name: 'string', reference: null, is_archived: true},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"name\": \"string\",\n  \"reference\": null,\n  \"is_archived\": true\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://id.amiqus.co/api/v2/cases/%7Bid%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"name\":\"string\",\"reference\":null,\"is_archived\":true}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/cases/%7Bid%7D');\n$request->setRequestMethod('PATCH');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/cases/{id}/items": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "The unique case identifier."
        }
      ],
      "get": {
        "summary": "List all case items",
        "description": "Returns a paginated list of all case items.\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "get-cases-id-items",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Case Items"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "entity"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/ClientCaseItem"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "case_item",
                          "id": 578,
                          "entity": {
                            "id": 73845,
                            "type": "record"
                          },
                          "created_at": "2022-05-21T12:15:31Z",
                          "updated_at": "2022-05-21T12:15:31Z"
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "entity_expanded": {
                    "summary": "Entity expanded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "case_item",
                          "id": 578,
                          "entity": {
                            "object": "record",
                            "id": 983434,
                            "status": "pending",
                            "perform_url": "https://id.amiqus.co/i/0vz32B9CZpO1yLsKPdy9q",
                            "email": "marty@example.com",
                            "client": 73845,
                            "name": {
                              "object": "name",
                              "title": "mr",
                              "other_title": null,
                              "first_name": "Martin",
                              "middle_name": "Seamus",
                              "last_name": "McFly",
                              "name": "Martin McFly",
                              "full_name": "Martin Seamus McFly",
                              "complete_name": "Mr Martin Seamus McFly"
                            },
                            "steps": [
                              {
                                "object": "step",
                                "id": 2,
                                "type": "check.photo_id",
                                "preferences": {
                                  "report_type": "standard",
                                  "face": true,
                                  "liveness": true,
                                  "facial_similarity": false,
                                  "live_document": false,
                                  "docs": [
                                    "passport",
                                    "driving_licence",
                                    "national_id"
                                  ],
                                  "issuing_countries": null,
                                  "right_to_work": null,
                                  "right_to_rent": null
                                },
                                "check": 82342,
                                "cost": 1,
                                "completed_at": null
                              },
                              {
                                "object": "step",
                                "id": 3,
                                "type": "document.request",
                                "preferences": {
                                  "title": "Utility bill",
                                  "instructions": "A utility bill dated within the last three months."
                                },
                                "document": 23123,
                                "cost": 0,
                                "completed_at": null
                              },
                              {
                                "object": "step",
                                "id": 4,
                                "type": "form",
                                "form": "4bd9bfca-e61d-4a68-99b3-ca61a02f650f",
                                "cost": 0,
                                "completed_at": null
                              }
                            ],
                            "has_reminders": true,
                            "created_at": "2022-05-22T08:22:12Z",
                            "updated_at": "2022-05-22T08:22:12Z",
                            "expired_at": "2022-06-01T08:22:12Z",
                            "archived_at": null,
                            "is_declaration_required": false,
                            "declaration_confirmed_at": null
                          },
                          "created_at": "2022-05-21T12:15:31Z",
                          "updated_at": "2022-05-21T12:15:31Z"
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Case not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/cases/%7Bid%7D/items?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/cases/%7Bid%7D/items',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE', expand: 'ARRAY_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/cases/%7Bid%7D/items?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/cases/%7Bid%7D/items');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "patch": {
        "summary": "Update items for a case",
        "description": "Add one or more items to a case, merging them with existing items. Only newly added items are returned.\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "patch-cases-id-items",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Case Items"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "minItems": 1,
                "maxItems": 100,
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "type"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The unique identifier of the item to be added to the case."
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "record"
                      ],
                      "description": "The type of item to be added to the case."
                    }
                  }
                }
              },
              "example": [
                {
                  "id": 983434,
                  "type": "record"
                }
              ]
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/List"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/ClientCaseItem"
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "object": "case_item",
                      "id": 578,
                      "entity": {
                        "id": 983434,
                        "type": "record"
                      },
                      "created_at": "2022-05-22T08:22:12Z",
                      "updated_at": "2022-05-22T08:22:12Z"
                    }
                  ],
                  "total": 1,
                  "count": 1,
                  "limit": 100,
                  "has_more": false,
                  "url": "https://id.amiqus.co/api/v2/cases/8723/items"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Case not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request PATCH \\\n  --url https://id.amiqus.co/api/v2/cases/%7Bid%7D/items \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '[{\"id\":0,\"type\":\"record\"}]'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'PATCH',\n  url: 'https://id.amiqus.co/api/v2/cases/%7Bid%7D/items',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: [{id: 0, type: 'record'}],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify([\n  {\n    \"id\": 0,\n    \"type\": \"record\"\n  }\n]);\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"PATCH\", \"https://id.amiqus.co/api/v2/cases/%7Bid%7D/items\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('[{\"id\":0,\"type\":\"record\"}]');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/cases/%7Bid%7D/items');\n$request->setRequestMethod('PATCH');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/cases/{id}/reviews": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "The unique case identifier."
        }
      ],
      "get": {
        "summary": "List all reviews for a case",
        "description": "Returns a paginated list of reviews for a single case.\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "get-cases-id-reviews",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Cases"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "reviewed_by"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/ClientCaseReview"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "case_review",
                          "id": 2698,
                          "reviewed_by": 7832,
                          "status": "approved",
                          "from_status": "pending",
                          "created_at": "2022-05-22T08:22:12Z",
                          "updated_at": "2022-05-22T08:22:12Z"
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "reviewed_by_expanded": {
                    "summary": "Reviewed by expanded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "case_review",
                          "id": 2698,
                          "reviewed_by": {
                            "object": "team_member",
                            "id": 7832,
                            "name": "Lorraine Baines",
                            "email": "lorraine@example.com",
                            "role": "member"
                          },
                          "status": "approved",
                          "from_status": "pending",
                          "created_at": "2022-05-22T08:22:12Z",
                          "updated_at": "2022-05-22T08:22:12Z"
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Case not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/cases/%7Bid%7D/reviews?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/cases/%7Bid%7D/reviews',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE', expand: 'ARRAY_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/cases/%7Bid%7D/reviews?page=INTEGER_VALUE&limit=INTEGER_VALUE&expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/cases/%7Bid%7D/reviews');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Create a case review",
        "description": "Review a case and update its status\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "post-cases-id-reviews",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Cases"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "status"
                ],
                "$ref": "#/components/schemas/ClientCaseReview"
              },
              "example": {
                "status": "approved"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientCaseReview"
                },
                "example": {
                  "object": "case_review",
                  "id": 2698,
                  "reviewed_by": 7832,
                  "status": "approved",
                  "from_status": "pending",
                  "created_at": "2022-05-22T08:22:12Z",
                  "updated_at": "2022-05-22T08:22:12Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Case not found"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url https://id.amiqus.co/api/v2/cases/%7Bid%7D/reviews \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"status\":\"pending\",\"from_status\":\"pending\"}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/cases/%7Bid%7D/reviews',\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {status: 'pending', from_status: 'pending'},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"status\": \"pending\",\n  \"from_status\": \"pending\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/cases/%7Bid%7D/reviews\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"status\":\"pending\",\"from_status\":\"pending\"}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/cases/%7Bid%7D/reviews');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/cases/{id}/assignees": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "Unique case identifier"
        }
      ],
      "get": {
        "summary": "List all assignees for a case",
        "description": "Returns a paginated list of the case assignees.\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "get-cases-id-assignees",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Case Assignees"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/Assignee"
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "enum": [
                                      "team_member"
                                    ]
                                  },
                                  "team_member": {
                                    "$ref": "#/components/schemas/TeamMember"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "object": "paginated_list",
                  "data": [
                    {
                      "object": "assignee",
                      "id": 34535,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 121,
                        "name": "Lorraine Baines",
                        "email": "lorraine@example.com",
                        "role": "member"
                      }
                    },
                    {
                      "object": "assignee",
                      "id": 34538,
                      "type": "team_member",
                      "team_member": {
                        "object": "team_member",
                        "id": 472,
                        "name": "Dennis Jones",
                        "email": "dennis@example.com",
                        "role": "member"
                      }
                    }
                  ],
                  "total": 2,
                  "count": 2,
                  "limit": 100,
                  "current_page": 1,
                  "total_pages": 1,
                  "links": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "default": "Case not found"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/cases/%7Bid%7D/assignees?page=INTEGER_VALUE&limit=INTEGER_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/cases/%7Bid%7D/assignees',\n  qs: {page: 'INTEGER_VALUE', limit: 'INTEGER_VALUE'},\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/cases/%7Bid%7D/assignees?page=INTEGER_VALUE&limit=INTEGER_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/cases/%7Bid%7D/assignees');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/cases/{caseId}/items/{itemId}": {
      "delete": {
        "summary": "Remove item from a case",
        "description": "Remove a single item from a case.\n\nTo list all of a case's items, see **[List all items for a case](#operation/get-cases-id-items)**.\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "delete-cases-caseId-items-itemId",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Case Items"
        ],
        "parameters": [
          {
            "name": "caseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The unique case identifier."
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "The unique case item identifier."
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Case not found",
                        "Case item not found"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request DELETE \\\n  --url https://id.amiqus.co/api/v2/cases/%7BcaseId%7D/items/%7BitemId%7D \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'DELETE',\n  url: 'https://id.amiqus.co/api/v2/cases/%7BcaseId%7D/items/%7BitemId%7D',\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"DELETE\", \"https://id.amiqus.co/api/v2/cases/%7BcaseId%7D/items/%7BitemId%7D\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/cases/%7BcaseId%7D/items/%7BitemId%7D');\n$request->setRequestMethod('DELETE');\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/records/{recordId}/steps/{stepId}/reviews": {
      "parameters": [
        {
          "name": "recordId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer",
            "description": "The unique record identifier."
          }
        },
        {
          "name": "stepId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer",
            "description": "The unique record step identifier."
          }
        }
      ],
      "get": {
        "summary": "List all reviews for a record step",
        "description": "List all reviews for a record step.",
        "operationId": "get-records-recordId-steps-stepId-reviews",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "created_at",
                "updated_at"
              ]
            },
            "description": "Sort results by date. Results returned based on the `created_at` timestamp by default"
          },
          {
            "name": "order_by",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Order results in ascending or descending order. Results returned in ascending order by default"
          },
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "reviewed_by"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/PaginatedList"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "items": {
                            "$ref": "#/components/schemas/StepReview"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "step_review",
                          "id": 2698,
                          "reviewed_by": 7832,
                          "status": "approved",
                          "from_status": "pending",
                          "message": "All documents checked and reviewed",
                          "created_at": "2023-01-22T08:22:12Z",
                          "updated_at": "2023-01-22T08:22:12Z"
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  },
                  "reviewed_by_expanded": {
                    "summary": "Reviewed by expanded",
                    "value": {
                      "object": "paginated_list",
                      "data": [
                        {
                          "object": "step_review",
                          "id": 2698,
                          "reviewed_by": {
                            "object": "team_member",
                            "id": 472,
                            "name": "Dennis Jones",
                            "email": "dennis@example.com",
                            "role": "member"
                          },
                          "status": "approved",
                          "from_status": "pending",
                          "message": "All documents checked and reviewed",
                          "created_at": "2023-01-22T08:22:12Z",
                          "updated_at": "2023-01-22T08:22:12Z"
                        }
                      ],
                      "total": 1,
                      "count": 1,
                      "limit": 100,
                      "current_page": 1,
                      "total_pages": 1,
                      "links": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Record not found",
                        "Record step not found"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/records/%7BrecordId%7D/steps/%7BstepId%7D/reviews?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/records/%7BrecordId%7D/steps/%7BstepId%7D/reviews',\n  qs: {\n    page: 'INTEGER_VALUE',\n    limit: 'INTEGER_VALUE',\n    sort_by: 'STRING_VALUE',\n    order_by: 'STRING_VALUE',\n    expand: 'ARRAY_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/records/%7BrecordId%7D/steps/%7BstepId%7D/reviews?page=INTEGER_VALUE&limit=INTEGER_VALUE&sort_by=STRING_VALUE&order_by=STRING_VALUE&expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7BrecordId%7D/steps/%7BstepId%7D/reviews');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'page' => 'INTEGER_VALUE',\n  'limit' => 'INTEGER_VALUE',\n  'sort_by' => 'STRING_VALUE',\n  'order_by' => 'STRING_VALUE',\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      },
      "post": {
        "summary": "Create a review for a record step",
        "description": "Create a review for a record step.",
        "operationId": "post-records-recordId-steps-stepId-reviews",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Records"
        ],
        "parameters": [
          {
            "name": "expand",
            "in": "query",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "reviewed_by"
                ]
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "$ref": "#/components/schemas/StepReviewStatus"
                  },
                  "message": {
                    "type": "string",
                    "description": "Required if `status: rejected`\n",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                }
              },
              "example": {
                "status": "approved",
                "message": "All documents checked and reviewed"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StepReview"
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "step_review",
                      "id": 2698,
                      "reviewed_by": 7832,
                      "status": "approved",
                      "from_status": "pending",
                      "message": "All documents checked and reviewed",
                      "created_at": "2023-01-22T08:22:12Z",
                      "updated_at": "2023-01-22T08:22:12Z"
                    }
                  },
                  "reviewed_by_expanded": {
                    "summary": "Reviewed by expanded",
                    "value": {
                      "object": "step_review",
                      "id": 2698,
                      "reviewed_by": {
                        "object": "team_member",
                        "id": 7832,
                        "name": "Dennis Jones",
                        "email": "dennis@example.com",
                        "role": "member"
                      },
                      "status": "approved",
                      "from_status": "pending",
                      "message": "All documents checked and reviewed",
                      "created_at": "2023-01-22T08:22:12Z",
                      "updated_at": "2023-01-22T08:22:12Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "enum": [
                        "Record not found",
                        "Record step not found"
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/422"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request POST \\\n  --url 'https://id.amiqus.co/api/v2/records/%7BrecordId%7D/steps/%7BstepId%7D/reviews?expand=ARRAY_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \\\n  --header 'content-type: application/json' \\\n  --data '{\"status\":\"pending\",\"message\":\"string\"}'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://id.amiqus.co/api/v2/records/%7BrecordId%7D/steps/%7BstepId%7D/reviews',\n  qs: {expand: 'ARRAY_VALUE'},\n  headers: {\n    Authorization: 'Bearer REPLACE_BEARER_TOKEN',\n    'content-type': 'application/json'\n  },\n  body: {status: 'pending', message: 'string'},\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = JSON.stringify({\n  \"status\": \"pending\",\n  \"message\": \"string\"\n});\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"POST\", \"https://id.amiqus.co/api/v2/records/%7BrecordId%7D/steps/%7BstepId%7D/reviews?expand=ARRAY_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\nxhr.setRequestHeader(\"content-type\", \"application/json\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$body = new http\\Message\\Body;\n$body->append('{\"status\":\"pending\",\"message\":\"string\"}');\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/records/%7BrecordId%7D/steps/%7BstepId%7D/reviews');\n$request->setRequestMethod('POST');\n$request->setBody($body);\n\n$request->setQuery(new http\\QueryString([\n  'expand' => 'ARRAY_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',\n  'content-type' => 'application/json'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/aggregates/case-status": {
      "get": {
        "summary": "Case status",
        "description": "Get an aggregate of case statuses.\n\n_Cases may not be enabled for all teams._\n",
        "operationId": "get-aggregates-case-status",
        "security": [
          {
            "personal_token": []
          },
          {
            "oauth": []
          }
        ],
        "tags": [
          "Aggregates"
        ],
        "parameters": [
          {
            "name": "assigned_to",
            "description": "Filter cases assigned to a team member ID",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "boolean",
                  "const": false,
                  "description": "Filter unassigned cases"
                }
              ]
            }
          },
          {
            "name": "start_date",
            "description": "Filter case statuses updated on or after a given date",
            "allowReserved": true,
            "example": "2024-01-02T12:00:00Z",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end_date",
            "description": "Filter case statuses updated on or before a given date",
            "allowReserved": true,
            "example": "2024-03-21T14:00:00Z",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "visibility",
            "description": "Filter cases by their current visibility. Both \"active\" and \"archived\" cases are returned by default.",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "archived"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ClientCaseStatusAggregate"
                    }
                  ]
                },
                "examples": {
                  "default": {
                    "summary": "Default",
                    "value": {
                      "object": "case_status_aggregate",
                      "aggregates": [
                        {
                          "status": "pending",
                          "count": 23
                        },
                        {
                          "status": "on_hold",
                          "count": 0
                        },
                        {
                          "status": "approved",
                          "count": 59
                        },
                        {
                          "status": "rejected",
                          "count": 5
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/401"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell + Curl",
            "source": "curl --request GET \\\n  --url 'https://id.amiqus.co/api/v2/aggregates/case-status?assigned_to=QUERY_VALUE&start_date=2024-01-02T12%3A00%3A00Z&end_date=2024-03-21T14%3A00%3A00Z&visibility=STRING_VALUE' \\\n  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'"
          },
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'GET',\n  url: 'https://id.amiqus.co/api/v2/aggregates/case-status',\n  qs: {\n    assigned_to: 'QUERY_VALUE',\n    start_date: '2024-01-02T12:00:00Z',\n    end_date: '2024-03-21T14:00:00Z',\n    visibility: 'STRING_VALUE'\n  },\n  headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Javascript + Xhr",
            "source": "const data = null;\n\nconst xhr = new XMLHttpRequest();\nxhr.withCredentials = true;\n\nxhr.addEventListener(\"readystatechange\", function () {\n  if (this.readyState === this.DONE) {\n    console.log(this.responseText);\n  }\n});\n\nxhr.open(\"GET\", \"https://id.amiqus.co/api/v2/aggregates/case-status?assigned_to=QUERY_VALUE&start_date=2024-01-02T12%3A00%3A00Z&end_date=2024-03-21T14%3A00%3A00Z&visibility=STRING_VALUE\");\nxhr.setRequestHeader(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\");\n\nxhr.send(data);"
          },
          {
            "lang": "Php + Http2",
            "source": "<?php\n\n$client = new http\\Client;\n$request = new http\\Client\\Request;\n\n$request->setRequestUrl('https://id.amiqus.co/api/v2/aggregates/case-status');\n$request->setRequestMethod('GET');\n$request->setQuery(new http\\QueryString([\n  'assigned_to' => 'QUERY_VALUE',\n  'start_date' => '2024-01-02T12:00:00Z',\n  'end_date' => '2024-03-21T14:00:00Z',\n  'visibility' => 'STRING_VALUE'\n]));\n\n$request->setHeaders([\n  'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'\n]);\n\n$client->enqueue($request)->send();\n$response = $client->getResponse();\n\necho $response->getBody();"
          }
        ]
      }
    },
    "/integrations/types/{id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/resourceId",
          "description": "The unique integrations type identifier."
        }
      ]
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Description of the error."
          }
        }
      },
      "User": {
        "title": "User",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "user"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Unique user identifier"
          },
          "name": {
            "type": "string",
            "description": "Full or partial name\n\nThe value is not formatted (e.g. title case), and appears as written.\n"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Unique user email address"
          },
          "is_verified": {
            "type": "boolean",
            "readOnly": true,
            "description": "`true` once a new user has verified their email address\n"
          },
          "is_disabled": {
            "type": "boolean",
            "readOnly": true,
            "description": "`true` when a user account has been disabled\n\nUser accounts disabled due to failed login attempts are automatically re-enabled after a delay. Please contact support@amiqus.co for further details.\n"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the user account was created"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the user's details were last updated"
          }
        }
      },
      "PaginatedList": {
        "title": "Paginated List",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "const": "paginated_list"
          },
          "data": {
            "type": "array"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1
          },
          "current_page": {
            "type": "integer",
            "minimum": 1
          },
          "total_pages": {
            "type": "integer",
            "minimum": 1
          },
          "links": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "title": "Pagination links",
                "type": "object",
                "required": [
                  "next",
                  "previous"
                ],
                "properties": {
                  "next": {
                    "type": [
                      "null",
                      "string"
                    ],
                    "format": "url"
                  },
                  "previous": {
                    "type": [
                      "null",
                      "string"
                    ],
                    "format": "url"
                  }
                }
              }
            ]
          }
        }
      },
      "Team": {
        "title": "Team",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "team"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "identifier": {
            "type": "string"
          },
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "contact": {
            "type": "string",
            "format": "email"
          },
          "telephone": {
            "type": [
              "null",
              "string"
            ]
          },
          "tier": {
            "type": "string"
          },
          "logo": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_support_enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "archived_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "is_archived": {
            "type": "boolean",
            "description": "Allows toggling of archived state",
            "writeOnly": true
          }
        }
      },
      "TeamMember": {
        "title": "Team Member",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "team_member"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "role": {
            "oneOf": [
              {
                "type": "null",
                "description": "The value will be `null` when the team member is no longer part of the team."
              },
              {
                "type": "string",
                "enum": [
                  "assumed",
                  "owner",
                  "member",
                  "read-only",
                  "assigned-only"
                ]
              }
            ]
          }
        }
      },
      "Name": {
        "title": "Name",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "name"
          },
          "title": {
            "type": [
              "null",
              "string"
            ],
            "enum": [
              "miss",
              "ms",
              "mrs",
              "mr",
              "dr",
              "sir",
              "master",
              "mx",
              "dame",
              "lord",
              "lady",
              "prof",
              "other",
              null
            ]
          },
          "other_title": {
            "type": [
              "null",
              "string"
            ],
            "maxLength": 20,
            "description": "Required if `title: \"other\"`\n"
          },
          "first_name": {
            "type": "string",
            "maxLength": 255
          },
          "middle_name": {
            "type": [
              "null",
              "string"
            ],
            "maxLength": 255
          },
          "last_name": {
            "type": "string",
            "maxLength": 255
          },
          "name": {
            "type": "string",
            "description": "First and Last name.",
            "readOnly": true
          },
          "full_name": {
            "type": "string",
            "description": "First, Middle and Last names.",
            "readOnly": true
          },
          "complete_name": {
            "type": "string",
            "description": "Title and Full name.",
            "readOnly": true
          }
        }
      },
      "Client": {
        "title": "Client",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "client"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Unique client identifier."
          },
          "status": {
            "type": [
              "null",
              "string"
            ],
            "enum": [
              "pending",
              "approved",
              "rejected",
              null
            ],
            "x-enumDescriptions": {
              "pending": "Awaiting a decision from a team member.",
              "approved": "A team member has approved the client based on the outcome of their checks.",
              "rejected": "A team member has rejected the client based on the outcome of their checks."
            },
            "description": "A status can be set to signify a decision has been made by a team member on the outcome of the client's checks."
          },
          "name": {
            "$ref": "#/components/schemas/Name",
            "description": "The client's names.\n\nIncludes automatic compilations of the client's full name for display purposes.\n"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Client's contact email address."
          },
          "landline": {
            "type": [
              "null",
              "string"
            ],
            "description": "Client's landline telephone number."
          },
          "mobile": {
            "type": [
              "null",
              "string"
            ],
            "description": "Client's mobile telephone number."
          },
          "dob": {
            "type": [
              "null",
              "string"
            ],
            "format": "date",
            "description": "Client's date of birth."
          },
          "reference": {
            "type": [
              "null",
              "string"
            ],
            "description": "An external reference or identifier to cross-reference with your system."
          },
          "national_insurance_number": {
            "type": [
              "null",
              "string"
            ],
            "readOnly": true,
            "description": "Client's National Insurance number.\n\n_This feature may not be enabled for all teams._\n"
          },
          "is_deletable": {
            "type": "boolean",
            "readOnly": true,
            "description": "Indicates if the client can be deleted."
          },
          "deletion_date": {
            "type": [
              "null",
              "string"
            ],
            "format": "date",
            "description": "Date by which the client should be manually deleted from Amiqus."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the client was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the client's details were last updated."
          },
          "archived_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the client was archived."
          }
        }
      },
      "Address": {
        "title": "Address",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "address"
          },
          "unit": {
            "type": [
              "null",
              "string"
            ],
            "description": "Unit, flat or apartment name or number."
          },
          "house_name": {
            "type": [
              "null",
              "string"
            ],
            "description": "House or building name."
          },
          "house_number": {
            "type": [
              "null",
              "string"
            ],
            "description": "House or building number."
          },
          "street_name": {
            "type": [
              "null",
              "string"
            ],
            "description": "First line of the street name."
          },
          "second_street": {
            "type": [
              "null",
              "string"
            ],
            "description": "Second line of the street name if applicable."
          },
          "district": {
            "type": [
              "null",
              "string"
            ],
            "description": "District, town, village, suburb or equivalent."
          },
          "city": {
            "type": [
              "null",
              "string"
            ],
            "description": "City name if applicable."
          },
          "province": {
            "type": [
              "null",
              "string"
            ],
            "description": "Province, county, municipality, township or equivalent."
          },
          "postcode": {
            "type": [
              "null",
              "string"
            ],
            "description": "Postcode, zip code or equivalent."
          },
          "country": {
            "type": [
              "null",
              "string"
            ],
            "enum": [
              "AF",
              "AX",
              "AL",
              "DZ",
              "AS",
              "AD",
              "AO",
              "AI",
              "AG",
              "AR",
              "AM",
              "AW",
              "AU",
              "AT",
              "AZ",
              "BS",
              "BH",
              "BD",
              "BB",
              "BY",
              "BE",
              "BZ",
              "BJ",
              "BM",
              "BT",
              "BO",
              "BA",
              "BW",
              "BV",
              "BR",
              "IO",
              "BN",
              "BG",
              "BF",
              "BI",
              "KH",
              "CA",
              "CV",
              "KY",
              "CF",
              "TD",
              "CL",
              "CN",
              "CX",
              "CC",
              "CO",
              "KM",
              "CG",
              "CD",
              "CK",
              "CR",
              "HR",
              "CU",
              "CW",
              "CY",
              "CZ",
              "CI",
              "DK",
              "DJ",
              "DM",
              "DO",
              "EC",
              "EG",
              "SV",
              "GQ",
              "ER",
              "EE",
              "ET",
              "FK",
              "FO",
              "FJ",
              "FI",
              "FR",
              "GF",
              "PF",
              "TF",
              "GA",
              "GM",
              "GE",
              "DE",
              "GH",
              "GI",
              "GR",
              "GL",
              "GD",
              "GP",
              "GU",
              "GT",
              "GG",
              "GN",
              "GW",
              "GY",
              "HT",
              "HM",
              "VA",
              "HN",
              "HK",
              "HU",
              "IS",
              "IN",
              "ID",
              "IR",
              "IQ",
              "IE",
              "IM",
              "IL",
              "IT",
              "JM",
              "JP",
              "JE",
              "JO",
              "KZ",
              "KE",
              "KI",
              "KP",
              "XK",
              "KW",
              "KG",
              "LA",
              "LV",
              "LB",
              "LS",
              "LR",
              "LY",
              "LI",
              "LT",
              "LU",
              "MO",
              "MK",
              "MG",
              "MW",
              "MY",
              "MV",
              "ML",
              "MT",
              "MH",
              "MQ",
              "MR",
              "MU",
              "YT",
              "MX",
              "FM",
              "MD",
              "MC",
              "MN",
              "ME",
              "MS",
              "MA",
              "MZ",
              "MM",
              "NA",
              "NR",
              "NP",
              "NL",
              "AN",
              "NC",
              "NZ",
              "NI",
              "NE",
              "NG",
              "NU",
              "NF",
              "MP",
              "NO",
              "OM",
              "PK",
              "PS",
              "PW",
              "PA",
              "PG",
              "PY",
              "PE",
              "PH",
              "PN",
              "PL",
              "PT",
              "PR",
              "QA",
              "CM",
              "RE",
              "RO",
              "RU",
              "RW",
              "BL",
              "SH",
              "KN",
              "LC",
              "MF",
              "PM",
              "WS",
              "SM",
              "ST",
              "SA",
              "SN",
              "RS",
              "SC",
              "SL",
              "SG",
              "SX",
              "SK",
              "SI",
              "SB",
              "SO",
              "ZA",
              "GS",
              "KR",
              "SS",
              "ES",
              "LK",
              "VC",
              "SD",
              "SR",
              "SJ",
              "SZ",
              "SE",
              "CH",
              "SY",
              "TW",
              "TJ",
              "TZ",
              "TH",
              "TL",
              "TG",
              "TK",
              "TO",
              "TT",
              "TN",
              "TR",
              "TM",
              "TC",
              "TV",
              "UG",
              "UA",
              "AE",
              "GB",
              "US",
              "UM",
              "UY",
              "UZ",
              "VU",
              "VE",
              "VN",
              "VG",
              "VI",
              "WF",
              "EH",
              "YE",
              "YU",
              "ZM",
              "ZW"
            ],
            "description": "ISO3601 alpha-2 country code."
          }
        }
      },
      "Assignee": {
        "title": "Assignee",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "assignee"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "The assignee ID"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "TeamMember-2": {
        "title": "Team Member Assignee",
        "allOf": [
          {
            "$ref": "#/components/schemas/Assignee"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "team_member"
              },
              "team_member": {
                "type": "object",
                "$ref": "#/components/schemas/TeamMember"
              }
            }
          }
        ]
      },
      "List": {
        "title": "List",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array"
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1
          },
          "has_more": {
            "type": "boolean"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "schema": {
        "type": "object",
        "additionalProperties": {
          "type": "array",
          "minItems": 1,
          "description": "Each property may contain more than one validation error\n\nThe property name references to the property's dot-notated path within the request body:\n\n**Request body**\n```json\n{\n  \"fields\": {\n    \"type\": false\n  }\n}\n```\n\n**Response**\n```json\n{\n  \"fields.type\": ['Value must be a string']\n}\n```\n",
          "items": {
            "type": "string"
          }
        }
      },
      "Organisation": {
        "title": "Organisation",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "organisation"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Unique organisation identifier"
          },
          "status": {
            "type": [
              "null",
              "string"
            ],
            "enum": [
              "pending",
              "approved",
              "rejected",
              null
            ],
            "x-enumDescriptions": {
              "pending": "Awaiting a decision from a team member.",
              "approved": "A team member has approved the organisation based on the outcome of its checks.",
              "rejected": "A team member has rejected the organisation based on the outcome of its checks."
            },
            "description": "A status can be set to signify a decision has been made by a team member on the outcome of the organisation's checks."
          },
          "name": {
            "type": "string",
            "maximum": 255,
            "description": "Organisation or company name\nThe value is not formatted (e.g. title case), and appears as written.\n"
          },
          "company_number": {
            "type": [
              "null",
              "string"
            ],
            "maximum": 255,
            "description": "The company registration number or reference"
          },
          "jurisdiction": {
            "type": [
              "null",
              "string"
            ],
            "enum": [
              "ae_az",
              "us_al",
              "us_ak",
              "al",
              "us_az",
              "us_ar",
              "aw",
              "au",
              "bs",
              "bh",
              "bd",
              "bb",
              "by",
              "be",
              "bz",
              "bm",
              "bo",
              "br",
              "bg",
              "us_ca",
              "kh",
              "ca",
              "us_co",
              "us_ct",
              "hr",
              "cw",
              "cy",
              "us_de",
              "dk",
              "us_dc",
              "do",
              "ae_du",
              "fi",
              "us_fl",
              "fr",
              "gf",
              "us_ga",
              "de",
              "gi",
              "gr",
              "gl",
              "gp",
              "gg",
              "us_hi",
              "hk",
              "is",
              "us_id",
              "in",
              "us_in",
              "us_ia",
              "ir",
              "ie",
              "im",
              "il",
              "jm",
              "jp",
              "je",
              "us_ks",
              "us_ky",
              "lv",
              "li",
              "us_la",
              "lu",
              "us_me",
              "my",
              "mt",
              "mq",
              "us_md",
              "us_ma",
              "mu",
              "yt",
              "mx",
              "us_mi",
              "us_mn",
              "us_ms",
              "us_mo",
              "md",
              "us_mt",
              "me",
              "mm",
              "us_ne",
              "nl",
              "us_nv",
              "ca_nb",
              "us_nh",
              "us_nj",
              "us_nm",
              "us_ny",
              "nz",
              "ca_nl",
              "us_nc",
              "us_nd",
              "no",
              "ca_ns",
              "us_oh",
              "us_ok",
              "us_or",
              "pk",
              "pa",
              "us_pa",
              "pl",
              "ca_pe",
              "pr",
              "ca_qc",
              "us_ri",
              "ro",
              "rw",
              "re",
              "bl",
              "mf",
              "pm",
              "sg",
              "sk",
              "si",
              "za",
              "us_sc",
              "us_sd",
              "es",
              "se",
              "ch",
              "tj",
              "tz",
              "us_tn",
              "us_tx",
              "th",
              "to",
              "tn",
              "ug",
              "ua",
              "gb",
              "us_ut",
              "vu",
              "us_vt",
              "vn",
              "us_va",
              "us_wa",
              "us_wv",
              "us_wi",
              "us_wy"
            ],
            "description": "The country code or region where the company is registered.\n\nRequired if `company_number` is provided.\n"
          },
          "reference": {
            "type": [
              "null",
              "string"
            ],
            "maxLength": 255,
            "description": "An external reference or identifier to cross-reference with your system."
          },
          "address": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Address"
              }
            ],
            "description": "The organisation's registered address.\n\nThe full object must be provided on update — partial updates are not supported. Set to `null` to unset.\n"
          },
          "incorporated_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date",
            "description": "Date the organisation was incorporated."
          },
          "assignees": {
            "readOnly": true,
            "x-expandable": true,
            "description": "The team members assigned to the organisation. `null` when no team members are assigned, including when the relationship is expanded.\n\nReturned as an array of up to 25 team member identifiers unless expanded with `expand=assignees`. When expanded, only the first page of assignees is returned — use the list's `url` to retrieve the rest.\n",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "minItems": 1,
                "maxItems": 25,
                "items": {
                  "type": "integer",
                  "description": "The unique team member identifier."
                }
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/List"
                  },
                  {
                    "properties": {
                      "data": {
                        "items": {
                          "$ref": "#/components/schemas/TeamMember"
                        }
                      }
                    }
                  }
                ]
              }
            ]
          },
          "clients": {
            "readOnly": true,
            "x-expandable": true,
            "description": "The clients belonging to the organisation. `null` when the organisation has no clients, including when the relationship is expanded.\n\nReturned as an array of up to 25 client identifiers unless expanded with `expand=clients`. When expanded, only the first page of clients is returned — use the list's `url` to retrieve the rest.\n",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "minItems": 1,
                "maxItems": 25,
                "items": {
                  "type": "integer",
                  "description": "The unique client identifier."
                }
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/List"
                  },
                  {
                    "properties": {
                      "data": {
                        "items": {
                          "$ref": "#/components/schemas/Client"
                        }
                      }
                    }
                  }
                ]
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the organisation was created"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the organisation's details were last updated"
          },
          "archived_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the organisation was archived."
          }
        }
      },
      "RecordStatus": {
        "type": "string",
        "enum": [
          "pending",
          "started",
          "complete",
          "incomplete",
          "waiting",
          "failed",
          "empty",
          "paused",
          "amendments",
          "reviewed"
        ],
        "description": "The overall status of the record.\n\nStatus is determined by the combined states of a record's steps, expiry and review.\n"
      },
      "Step": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "step",
            "readOnly": true
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "type": {
            "type": "string"
          }
        }
      },
      "Check": {
        "title": "Check",
        "type": "object"
      },
      "CallcreditCallReport": {
        "title": "TransUnion",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.credit"
              }
            }
          }
        ]
      },
      "Record": {
        "title": "Record",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "record"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "The unique record identifier."
          },
          "status": {
            "$ref": "#/components/schemas/RecordStatus",
            "x-enumDescriptions": {
              "pending": "Active without any completed steps",
              "started": "Active with at least one completed step",
              "complete": "All steps completed",
              "incomplete": "Expired with at least one completed step",
              "waiting": "At least one check step is awaiting results",
              "failed": "_Deprecated_",
              "empty": "Expired without any completed steps",
              "paused": "At least one paused check step",
              "amendments": "Pending record amendment approval or rejection",
              "reviewed": "Record marked as having been reviewed"
            }
          },
          "perform_url": {
            "description": "The unique URL to complete the record steps in a browser.",
            "oneOf": [
              {
                "type": "string",
                "format": "url"
              },
              {
                "type": "boolean",
                "enum": [
                  false
                ],
                "description": "Value is `false` when none of the steps are available for submission due to completion, expiry or for any other reason."
              }
            ],
            "readOnly": true
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Contact email address for this record.\n\nNew request and reminder emails (if enabled) and completion receipts are sent to this email address. It is a snapshot of the client email address taken at the time the record was created or re-sent.\n"
          },
          "client": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Client"
              },
              {
                "type": "integer",
                "description": "Unique client identifier."
              }
            ]
          },
          "name": {
            "$ref": "#/components/schemas/Name",
            "description": "The client's names.\n\nThis is a snapshot taken at the time the record was created, therefore it might not match the clients current\nname if it has since been changed.\n"
          },
          "steps": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/RecordSteps"
            },
            "description": "List of complete and incomplete steps."
          },
          "has_reminders": {
            "type": "boolean",
            "description": "Denotes the presence/absence of email reminders."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the record was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the record's details were last updated or a step was completed."
          },
          "expired_at": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time that the record will expire."
          },
          "archived_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the record was archived."
          },
          "is_declaration_required": {
            "type": "boolean",
            "default": false,
            "description": "Denotes the presence/absence of a team's custom declaration in a record. Available where feature enabled on team only."
          },
          "declaration_confirmed_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the declaration was accepted. Available where feature enabled on team only."
          }
        }
      },
      "CheckStatus": {
        "type": "string",
        "enum": [
          "pending",
          "submitted",
          "accepted",
          "rejected",
          "refer",
          "failed",
          "paused"
        ]
      },
      "BreakdownResult": {
        "type": "object",
        "properties": {
          "result": {
            "description": "The overall result of the properties checked in this breakdown. Where no result is returned the value will be `null`. Where an invalid value is returned the default is `consider`.",
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "clear",
                  "consider"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "SubBreakdownResult": {
        "type": "object",
        "properties": {
          "result": {
            "description": "The result of the individual sub-breakdown property. Where no result is returned the value will be `null`. Where an invalid value is returned the default is `consider`.",
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "clear",
                  "consider"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "DocumentType": {
        "oneOf": [
          {
            "type": "string",
            "enum": [
              "passport",
              "driving_licence",
              "national_identity_card",
              "immigration_status_document",
              "indigenous_card",
              "municipality_identity_card",
              "national_health_insurance_card",
              "passport_card",
              "private_operators_card",
              "proof_of_citizenship",
              "residence_permit",
              "service_id_card",
              "tax_id",
              "visa",
              "voter_id",
              "work_permit",
              "other"
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "DocumentNfcData": {
        "title": "NFC Document",
        "type": "object",
        "properties": {
          "document_type": {
            "$ref": "#/components/schemas/DocumentType"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "full_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "date_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "gender": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "male",
                  "female"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "document_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "personal_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "nationality": {
            "description": "ISO 3166 alpha-3 country code.",
            "anyOf": [
              {
                "type": "string",
                "minLength": 3,
                "maxLength": 3
              },
              {
                "type": "null"
              }
            ]
          },
          "place_of_birth": {
            "type": [
              "string",
              "null"
            ]
          },
          "issuing_authority": {
            "type": [
              "string",
              "null"
            ]
          },
          "issuing_country": {
            "description": "ISO 3166 alpha-3 country code.",
            "anyOf": [
              {
                "type": "string",
                "minLength": 3,
                "maxLength": 3
              },
              {
                "type": "null"
              }
            ]
          },
          "issuing_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "date_of_expiry": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "mrz_line_1": {
            "type": [
              "string",
              "null"
            ]
          },
          "mrz_line_2": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DocumentData": {
        "title": "Document",
        "type": "object",
        "properties": {
          "document_type": {
            "x-exclude-audience": "wallet",
            "$ref": "#/components/schemas/DocumentType"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "middle_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "date_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "gender": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "male",
                  "female"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "document_numbers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "document_number",
                    "personal_number",
                    "other"
                  ]
                },
                "value": {
                  "type": "string"
                }
              }
            }
          },
          "issuing_authority": {
            "type": [
              "string",
              "null"
            ]
          },
          "issuing_country": {
            "description": "ISO 3166 alpha-3 country code.",
            "anyOf": [
              {
                "type": "string",
                "minLength": 3,
                "maxLength": 3
              },
              {
                "type": "null"
              }
            ]
          },
          "issuing_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "issuing_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "date_of_expiry": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "mrz_line1": {
            "type": [
              "string",
              "null"
            ]
          },
          "mrz_line2": {
            "type": [
              "string",
              "null"
            ]
          },
          "mrz_line3": {
            "type": [
              "string",
              "null"
            ]
          },
          "nationality": {
            "description": "ISO 3166 alpha-3 country code.",
            "anyOf": [
              {
                "type": "string",
                "minLength": 3,
                "maxLength": 3
              },
              {
                "type": "null"
              }
            ]
          },
          "place_of_birth": {
            "type": [
              "string",
              "null"
            ]
          },
          "nfc": {
            "description": "If a document's NFC chip was scanned for this report, the data extracted from it will be included here.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentNfcData"
              },
              {
                "type": "null",
                "description": "The document either didn't have NFC or its NFC chip was not scanned."
              }
            ]
          }
        }
      },
      "Document": {
        "title": "Document",
        "properties": {
          "type": {
            "const": "document"
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "complete"
            ]
          },
          "result": {
            "type": "string",
            "enum": [
              "clear",
              "consider",
              "suspected",
              "rejected"
            ],
            "description": "* `clear` - All verifications pass. There are no indications the document is fraudulent.\n* `consider` - Some verifications did not pass. Doesn't necessarily point to a suspected document (for example, expired document).\n* `suspected` - Document shows signs of suspect fraud.\n* `rejected` - Unable to process the document image, or the document isn't supported. Also if the age of the applicant is too low.\n"
          },
          "breakdown": {
            "description": "A detailed breakdown of the report's verifications used to determine the overall result.",
            "properties": {
              "age_validation": {
                "description": "Whether the age calculated from the document's date of birth is greater than or equal to the minimum accepted age. The minimum accepted age is 16 years.",
                "anyOf": [
                  {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BreakdownResult"
                      },
                      {
                        "properties": {
                          "breakdown": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "minimum_accepted_age": {
                                    "description": "Whether the minimum accepted age was met.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  {
                    "type": "null",
                    "description": "Age validation was not checked."
                  }
                ]
              },
              "compromised_document": {
                "description": "Whether the image of the document has been previously flagged as compromised.",
                "anyOf": [
                  {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BreakdownResult"
                      },
                      {
                        "properties": {
                          "breakdown": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "document_database": {
                                    "description": "Whether the document is known to be compromised.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "repeat_attempts": {
                                    "description": "Whether the document has been reused in a suspicious way.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  {
                    "type": "null",
                    "description": "Compromised document was not checked."
                  }
                ]
              },
              "data_comparison": {
                "description": "Whether the data provided by the client matches the data extracted from the document.",
                "anyOf": [
                  {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BreakdownResult"
                      },
                      {
                        "properties": {
                          "breakdown": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "first_name": {
                                    "description": "Whether the client's first name matched the value extracted from the document.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "last_name": {
                                    "description": "Whether the client's last name matched the value extracted from the document.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "date_of_birth": {
                                    "description": "Whether the client's date of birth matched the value extracted from the document.\n\nIf the document didn't contain a date of birth, no comparison was made and the result is `null`.\n",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  {
                    "type": "null",
                    "description": "Data comparison was not checked."
                  }
                ]
              },
              "data_consistency": {
                "description": "Whether data represented in multiple places on the document is consistent. For example, between MRZ lines and OCR extracted text on passports.\n\nIf a document's NFC chip is scanned, data consistency is not checked so property value is `null`.\n",
                "anyOf": [
                  {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BreakdownResult"
                      },
                      {
                        "properties": {
                          "breakdown": {
                            "description": "Where a breakdown property result is `null`, the field wasn't present in at least two places on the document.",
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "issuing_country": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "document_numbers": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "nationality": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "gender": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "document_type": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "date_of_expiry": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "date_of_birth": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "last_name": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "first_name": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  {
                    "type": "null",
                    "description": "Data consistency was not checked."
                  }
                ]
              },
              "data_validation": {
                "description": "Whether the format and length of the fields are correct for that document type.",
                "anyOf": [
                  {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BreakdownResult"
                      },
                      {
                        "properties": {
                          "breakdown": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "mrz": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "document_expiration": {
                                    "description": "Whether the document has expired.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "expiry_date": {
                                    "description": "Whether the format of the expiry date is invalid.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "date_of_birth": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "gender": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "document_numbers": {
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  {
                    "type": "null",
                    "description": "Data validation was not checked."
                  }
                ]
              },
              "image_integrity": {
                "description": "Whether the document was of sufficient quality to perform validation.\n\nIf a document's NFC chip is scanned, image integrity is not checked so property value is `null`.\n",
                "anyOf": [
                  {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BreakdownResult"
                      },
                      {
                        "properties": {
                          "breakdown": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "supported_document": {
                                    "description": "Whether the submitted document is a supported type.",
                                    "type": "object",
                                    "properties": {
                                      "result": {
                                        "type": "string",
                                        "enum": [
                                          "clear",
                                          "unidentified"
                                        ]
                                      }
                                    }
                                  },
                                  "image_quality": {
                                    "description": "Whether the image of the document's data points and features were clear.\n\nA `consider` result means that parts of the image were obscured, unclear, damaged or missing.\n\nAn `unidentified` result means that not enough quality is present in the image to be processed.\n",
                                    "type": "object",
                                    "properties": {
                                      "result": {
                                        "type": "string",
                                        "enum": [
                                          "clear",
                                          "consider",
                                          "unidentified"
                                        ]
                                      },
                                      "properties": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "dark_photo": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "glare_on_photo": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "blurred_photo": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "covered_photo": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "other_photo_issue": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "damaged_document": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "incorrect_side": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "cut_off_document": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "no_document_in_image": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "two_documents_uploaded": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  "colour_picture": {
                                    "description": "Whether the document image was in colour. Black and white images are flagged with a `consider` result.",
                                    "type": "object",
                                    "properties": {
                                      "result": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "clear",
                                              "consider"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  },
                                  "conclusive_document_quality": {
                                    "description": "Is the document of sufficient quality to perform a fraud inspection. A `consider` result means that we cannot positively say the document is fraudulent or not.",
                                    "type": "object",
                                    "properties": {
                                      "result": {
                                        "anyOf": [
                                          {
                                            "type": "string",
                                            "enum": [
                                              "clear",
                                              "consider"
                                            ]
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "properties": {
                                        "anyOf": [
                                          {
                                            "type": "object",
                                            "properties": {
                                              "watermarks_digital_text_overlay": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "punctured_document": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "obscured_security_features": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "obscured_data_points": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "missing_back": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "digital_document": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "corner_removed": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              },
                                              "abnormal_document_features": {
                                                "$ref": "#/components/schemas/SubBreakdownResult"
                                              }
                                            }
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    }
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  {
                    "type": "null",
                    "description": "Image integrity was not checked."
                  }
                ]
              },
              "issuing_authority": {
                "description": "Whether data on the document matches the issuing authority data.\n\nIf a document's NFC chip is not scanned the property value is `null`.\n",
                "anyOf": [
                  {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BreakdownResult"
                      },
                      {
                        "properties": {
                          "breakdown": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "nfc_passive_authentication": {
                                    "description": "Whether the document NFC chip is original or cloned.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "nfc_active_authentication": {
                                    "description": "Whether the document NFC chip data has been tampered with.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  {
                    "type": "null",
                    "description": "Issuing authority was not checked."
                  }
                ]
              },
              "police_record": {
                "description": "Whether the document has been identified as lost, stolen or otherwise compromised. Applies to all UK documents or any document that has been reported stolen in the UK.",
                "anyOf": [
                  {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BreakdownResult"
                      }
                    ]
                  },
                  {
                    "type": "null",
                    "description": "Police record was not checked."
                  }
                ]
              },
              "visual_authenticity": {
                "description": "Whether visual (non-textual) elements are correct for this specific document type.\n\nIf a document's NFC chip is scanned, data consistency is not checked so property value is `null`.\n",
                "anyOf": [
                  {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/BreakdownResult"
                      },
                      {
                        "properties": {
                          "breakdown": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "face_detection": {
                                    "description": "No face was detected on the document.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "digital_tampering": {
                                    "description": "Indication of digital tampering in the image (for example, name was altered).",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "original_document_present": {
                                    "description": "The document was not present when the photo was taken. For example, a photo of an image of a document or a photo of a digital screen.",
                                    "allOf": [
                                      {
                                        "$ref": "#/components/schemas/BreakdownResult"
                                      },
                                      {
                                        "properties": {
                                          "properties": {
                                            "anyOf": [
                                              {
                                                "type": "object",
                                                "properties": {
                                                  "screenshot": {
                                                    "description": "Image is a digital screenshot.",
                                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                                  },
                                                  "document_on_printed_paper": {
                                                    "description": "Image is a photo of a printed image of a document.",
                                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                                  },
                                                  "photo_of_screen": {
                                                    "description": "Image is a photo of a digital screen.",
                                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                                  },
                                                  "scan": {
                                                    "description": "Image of document was captured using a scanner (not a photo of a document).",
                                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                                  }
                                                }
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        }
                                      }
                                    ]
                                  },
                                  "picture_face_integrity": {
                                    "description": "The pictures of the person identified on the document show signs of tampering or alteration. In most cases this will focus on the primary picture yet it may also apply to the secondary and tertiary pictures when documents contain them.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "security_features": {
                                    "description": "Security features expected on the document are missing or are incorrect.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "fonts": {
                                    "description": "Fonts on the document don't match the expected ones.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  },
                                  "template": {
                                    "description": "The document doesn't match the expected template for the document type and country it is from.",
                                    "$ref": "#/components/schemas/SubBreakdownResult"
                                  }
                                }
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  {
                    "type": "null",
                    "description": "Visual authenticity was not checked."
                  }
                ]
              }
            }
          },
          "document_data": {
            "description": "Data extracted from the document.",
            "anyOf": [
              {
                "$ref": "#/components/schemas/DocumentData"
              },
              {
                "type": "null",
                "description": "No data could be extracted from the document."
              }
            ]
          }
        }
      },
      "FacialSimilarityMotion": {
        "title": "Facial Similarity Motion",
        "properties": {
          "type": {
            "const": "facial_similarity_motion"
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "complete"
            ]
          },
          "result": {
            "type": "string",
            "enum": [
              "clear",
              "consider"
            ],
            "description": "* `clear` - All verifications pass.\n* `consider` - Some verifications did not pass.\n"
          },
          "breakdown": {
            "description": "A detailed breakdown of the report's verifications used to determine the overall result.",
            "properties": {
              "face_comparison": {
                "description": "Whether the face in the document matches the face in the motion capture.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BreakdownResult"
                  },
                  {
                    "properties": {
                      "breakdown": {
                        "type": "object",
                        "properties": {
                          "face_match": {
                            "description": "Comparison between face in document and motion capture was sufficient.",
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/SubBreakdownResult"
                              },
                              {
                                "properties": {
                                  "properties": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "score": {
                                            "type": "number",
                                            "format": "float",
                                            "description": "Similarity between face in document and motion capture, where 1 is a perfect match.",
                                            "minimum": 0,
                                            "maximum": 1
                                          }
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                ]
              },
              "image_integrity": {
                "description": "Whether the quality and integrity of the uploaded files were sufficient to perform a face comparison.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BreakdownResult"
                  },
                  {
                    "properties": {
                      "breakdown": {
                        "type": "object",
                        "properties": {
                          "face_detected": {
                            "description": "A single face of good enough quality was found in both the document image and the motion capture.",
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/SubBreakdownResult"
                              }
                            ]
                          },
                          "source_integrity": {
                            "description": "Whether the motion capture is trustworthy, e.g. not from a fake webcam.",
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/SubBreakdownResult"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                ]
              },
              "visual_authenticity": {
                "description": "Whether the person in the motion capture is real and that actions were performed live.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BreakdownResult"
                  },
                  {
                    "properties": {
                      "breakdown": {
                        "type": "object",
                        "properties": {
                          "liveness_detected": {
                            "description": "Whether the liveness actions were correctly executed by the data subject.",
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/SubBreakdownResult"
                              }
                            ]
                          },
                          "spoofing_detection": {
                            "description": "Whether the motion capture is not a spoof, e.g. video of a digital screen.",
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/SubBreakdownResult"
                              },
                              {
                                "properties": {
                                  "properties": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "score": {
                                            "type": "number",
                                            "format": "float",
                                            "description": "Probability motion capture is genuine, where 1 is highest confidence it is genuine.",
                                            "minimum": 0,
                                            "maximum": 1
                                          }
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      },
      "FacialSimilarityPhoto": {
        "title": "Facial Similarity Photo",
        "properties": {
          "type": {
            "const": "facial_similarity_photo"
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "complete"
            ]
          },
          "result": {
            "type": "string",
            "enum": [
              "clear",
              "consider"
            ],
            "description": "* `clear` - All verifications pass.\n* `consider` - Some verifications did not pass.\n"
          },
          "breakdown": {
            "description": "A detailed breakdown of the report's verifications used to determine the overall result.",
            "properties": {
              "face_comparison": {
                "description": "Whether the face in the document matches the face in the photo.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BreakdownResult"
                  },
                  {
                    "properties": {
                      "breakdown": {
                        "type": "object",
                        "properties": {
                          "face_match": {
                            "description": "Comparison between face in document and photo was sufficient.",
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/SubBreakdownResult"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                ]
              },
              "image_integrity": {
                "description": "Whether the quality and integrity of the uploaded files were sufficient to perform a face comparison.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BreakdownResult"
                  },
                  {
                    "properties": {
                      "breakdown": {
                        "type": "object",
                        "properties": {
                          "face_detected": {
                            "description": "A single face of good enough quality was found in both the document image and the photo.",
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/SubBreakdownResult"
                              }
                            ]
                          },
                          "source_integrity": {
                            "description": "Whether the photo is trustworthy, e.g. not digitally manipulated, from a fake webcam, an old photo.",
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/SubBreakdownResult"
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                ]
              },
              "visual_authenticity": {
                "description": "Whether the person in the photo appears to be real.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BreakdownResult"
                  },
                  {
                    "properties": {
                      "breakdown": {
                        "type": "object",
                        "properties": {
                          "spoofing_detection": {
                            "description": "Whether the photo is not a spoof, e.g. photo of a digital screen or printed photo.",
                            "allOf": [
                              {
                                "$ref": "#/components/schemas/SubBreakdownResult"
                              },
                              {
                                "properties": {
                                  "properties": {
                                    "anyOf": [
                                      {
                                        "type": "object",
                                        "properties": {
                                          "score": {
                                            "type": "number",
                                            "format": "float",
                                            "description": "Probability photo is genuine, where 1 is highest confidence it is genuine.",
                                            "minimum": 0,
                                            "maximum": 1
                                          }
                                        }
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      },
      "Attachment": {
        "title": "Attachment",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "attachment"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "readOnly": true
          },
          "original": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "readOnly": true
          },
          "size": {
            "type": "integer",
            "readOnly": true
          },
          "av_status": {
            "type": "string",
            "readOnly": true,
            "enum": [
              "pending",
              "clean",
              "infected",
              "error",
              "unsupported"
            ],
            "x-enumDescriptions": {
              "pending": "Awaiting scanning",
              "clean": "No virus detected",
              "infected": "Virus detected",
              "error": "Failed to scan",
              "unsupported": "File could not be scanned due to password protection or encryption"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "Document-2": {
        "title": "Document",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "document"
          },
          "attachment": {
            "$ref": "#/components/schemas/Attachment"
          },
          "document_type": {
            "$ref": "#/components/schemas/DocumentType"
          },
          "side": {
            "description": "For documents with more than one side, e.g. UK DVLA driving licence.\n\nSome documents with only one side may still include a \"front\" value, e.g. UK passport.\n",
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "front",
                  "back"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "issuing_country": {
            "description": "ISO 3166 alpha-3 country code.",
            "oneOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 3
              },
              {
                "type": "null"
              }
            ]
          },
          "has_nfc": {
            "type": "boolean",
            "description": "If the document has an NFC chip and its chip was scanned."
          }
        }
      },
      "Person": {
        "title": "Person",
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "photo",
              "motion_capture"
            ]
          },
          "attachment": {
            "$ref": "#/components/schemas/Attachment"
          }
        }
      },
      "Response": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "check_response.photo_id"
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "complete"
            ]
          },
          "result": {
            "type": "string",
            "enum": [
              "clear",
              "consider"
            ],
            "description": "* `clear` - All reports returned clear.\n* `consider` - At least one report contains a consider result.\n"
          },
          "reports": {
            "description": "The reports performed for this Photo ID check.",
            "anyOf": [
              {
                "title": "Completed Reports",
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Document"
                    },
                    {
                      "$ref": "#/components/schemas/FacialSimilarityMotion"
                    },
                    {
                      "$ref": "#/components/schemas/FacialSimilarityPhoto"
                    },
                    {
                      "title": "Other",
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "other",
                          "description": "This report type is not yet available from the API."
                        }
                      }
                    }
                  ]
                }
              },
              {
                "type": "null",
                "description": "The reports for this check have not yet been processed."
              }
            ]
          },
          "media": {
            "anyOf": [
              {
                "type": "array",
                "title": "Uploaded Media",
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Document-2"
                    },
                    {
                      "$ref": "#/components/schemas/Person"
                    }
                  ]
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "CheckResponse": {
        "title": "Check Response",
        "anyOf": [
          {
            "title": "Photo ID",
            "$ref": "#/components/schemas/Response"
          },
          {
            "title": "Other",
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "enum": [
                  "check_response.other"
                ],
                "description": "The response for this check type is not yet available from the API."
              }
            }
          }
        ]
      },
      "Check-2": {
        "title": "Check",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "const": "check"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "banking_information",
              "credit",
              "criminal_record",
              "dummy",
              "hscni_access_ni",
              "identity",
              "nhs_esr",
              "photo_id",
              "reference",
              "thorntons_onboarding",
              "video"
            ]
          },
          "record": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Record"
              },
              {
                "type": "integer"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CheckStatus"
          },
          "response": {
            "readOnly": true,
            "x-expandable": true,
            "description": "🚧 Check responses are still in beta. Available data may be incomplete or differ from the specification. Contact developers@amiqus.co to report inconsistencies.\n",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CheckResponse"
              },
              {
                "type": "boolean",
                "enum": [
                  true
                ],
                "description": "Value is `true` when there is an expandable response available."
              },
              {
                "type": "null",
                "description": "Value is `null` when there is no expandable response available.\n"
              }
            ]
          },
          "allow_replay": {
            "type": "boolean"
          },
          "allow_cancel": {
            "type": "boolean"
          },
          "requires_consent": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RecordCheck": {
        "type": "object",
        "properties": {
          "check": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Check-2"
              },
              {
                "type": "integer"
              }
            ]
          }
        }
      },
      "StepReviewStatus": {
        "title": "Step Review Status",
        "type": "string",
        "enum": [
          "pending",
          "approved",
          "rejected"
        ],
        "description": "The review status of a record's step.\n\n- `pending`: Awaiting approval or rejection.\n- `approved`: Reviewed and authorised.\n- `rejected`: Reviewed and dismissed.\n"
      },
      "StepReview": {
        "title": "Step Review",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "step_review"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "The unique step review identifier."
          },
          "reviewed_by": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "type": "integer",
                "description": "The unique team member identifier."
              },
              {
                "$ref": "#/components/schemas/TeamMember"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/StepReviewStatus"
          },
          "from_status": {
            "readOnly": true,
            "$ref": "#/components/schemas/StepReviewStatus",
            "description": "The previous status of the review."
          },
          "message": {
            "type": [
              "null",
              "string"
            ],
            "minLength": 1,
            "maxLength": 1000,
            "description": "An optional message attached to the review."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the review was added."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the review details were last updated."
          }
        }
      },
      "Metadata": {
        "type": "object",
        "properties": {
          "review": {
            "readOnly": true,
            "x-expandable": true,
            "description": "Return the most recent step review, if any.\n\nTo retrieve all step reviews, refer to the **[List all reviews for a record step](#operation/get-records-recordId-steps-stepId-reviews)**.\n",
            "oneOf": [
              {
                "type": "null",
                "description": "A `null` value indicates that the step is pending review."
              },
              {
                "type": "boolean",
                "enum": [
                  false
                ],
                "description": "The value is `false` when a step can not be reviewed."
              },
              {
                "type": "integer",
                "description": "The unique step review identifier."
              },
              {
                "$ref": "#/components/schemas/StepReview"
              }
            ]
          },
          "cost": {
            "type": "integer",
            "minimum": 0,
            "readOnly": true
          },
          "completed_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "EquifaxCredit": {
        "title": "Equifax",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.credit"
              }
            }
          }
        ]
      },
      "CriminalRecord": {
        "title": "Criminal record",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.criminal_record"
              }
            }
          }
        ]
      },
      "CriminalRecord-2": {
        "type": "object",
        "required": [
          "preferences"
        ],
        "properties": {
          "preferences": {
            "type": "object",
            "oneOf": [
              {
                "title": "Disclosure Scotland",
                "required": [
                  "region"
                ],
                "properties": {
                  "region": {
                    "type": "string",
                    "const": "scotland"
                  },
                  "enable_payment": {
                    "title": "Pass on fee",
                    "description": "Require the person to pay for the processing of this check.",
                    "type": "boolean"
                  }
                }
              },
              {
                "title": "DBS: Basic",
                "required": [
                  "region",
                  "type"
                ],
                "properties": {
                  "region": {
                    "type": "string",
                    "const": "england"
                  },
                  "type": {
                    "type": "string",
                    "const": "basic"
                  },
                  "enable_payment": {
                    "title": "Pass on fee",
                    "description": "Require the person to pay for the processing of this check.",
                    "type": "boolean"
                  }
                }
              },
              {
                "title": "DBS: Standard",
                "required": [
                  "region",
                  "type"
                ],
                "properties": {
                  "region": {
                    "type": "string",
                    "const": "england"
                  },
                  "type": {
                    "type": "string",
                    "const": "standard"
                  },
                  "free_volunteer": {
                    "title": "Reduced rate COVID-19 application",
                    "description": "This check will cost 1 credit for eligible roles when responding to COVID-19.",
                    "type": "boolean",
                    "readOnly": true,
                    "deprecated": true
                  },
                  "enable_payment": {
                    "title": "Pass on fee",
                    "description": "Require the person to pay for the processing of this check.",
                    "type": "boolean"
                  }
                }
              },
              {
                "title": "DBS: Enhanced",
                "required": [
                  "region",
                  "type"
                ],
                "properties": {
                  "region": {
                    "type": "string",
                    "const": "england"
                  },
                  "type": {
                    "type": "string",
                    "const": "enhanced"
                  },
                  "free_volunteer": {
                    "title": "Reduced rate COVID-19 application",
                    "description": "This check will cost 1 credit for eligible roles when responding to COVID-19.",
                    "type": "boolean",
                    "readOnly": true,
                    "deprecated": true
                  },
                  "enable_payment": {
                    "title": "Pass on fee",
                    "description": "Require the person to pay for the processing of this check.",
                    "type": "boolean"
                  }
                }
              }
            ]
          }
        }
      },
      "Dummy": {
        "title": "Dummy",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.dummy"
              }
            }
          }
        ]
      },
      "Dummy-2": {
        "type": "object",
        "properties": {
          "preferences": {
            "type": "object",
            "properties": {
              "payment_amount": {
                "description": "The amount the person will pay for the processing of this check.\n\n`null` if person is not required to pay for the processing of this check.\n",
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000,
                    "description": "Value is a cent integer, e.g. 1437 → 14.37\n"
                  }
                ]
              },
              "credit_cost": {
                "description": "The number of credits deducted to run this check.\n\n`null` if the default credit cost should be used to run the check.\n",
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  }
                ]
              },
              "cancel": {
                "type": "boolean",
                "description": "Let this check be cancelled while in a `paused` state."
              },
              "replay": {
                "type": "boolean",
                "description": "Enable \"re-submit\" action when check has failed."
              },
              "state": {
                "type": "string",
                "description": "Automatically set the check status without carrying out a request.",
                "default": "pending",
                "enum": [
                  "pending",
                  "accepted",
                  "rejected",
                  "refer",
                  "failed",
                  "paused"
                ]
              }
            }
          }
        }
      },
      "Thorntons": {
        "title": "Thorntons Onboarding",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.thorntons_onboarding"
              }
            }
          }
        ]
      },
      "HscniAccessNi": {
        "title": "HSCNI Access NI",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.hscni_access_ni"
              }
            }
          }
        ]
      },
      "HscniAccessNi-2": {
        "type": "object",
        "required": [
          "preferences"
        ],
        "properties": {
          "preferences": {
            "type": "object",
            "required": [
              "type",
              "pin_number"
            ],
            "oneOf": [
              {
                "title": "Standard",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "standard"
                  },
                  "pin_number": {
                    "type": "string",
                    "format": "integer",
                    "minLength": 6,
                    "maxLength": 6
                  }
                }
              },
              {
                "title": "Enhanced",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "enhanced"
                  },
                  "pin_number": {
                    "type": "string",
                    "format": "integer",
                    "minLength": 6,
                    "maxLength": 6
                  }
                }
              },
              {
                "title": "Enhanced with barring",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "enhanced_barring"
                  },
                  "barring_adults": {
                    "title": "Adults",
                    "description": "Include adult barring lists.\n\nRequired if `barring_children: false`\n",
                    "type": "boolean",
                    "default": false
                  },
                  "barring_children": {
                    "title": "Children",
                    "description": "Include child barring lists.\n\nRequired if `barring_adults: false`\n",
                    "type": "boolean",
                    "default": false
                  },
                  "pin_number": {
                    "type": "string",
                    "format": "integer",
                    "minLength": 6,
                    "maxLength": 6
                  }
                }
              }
            ]
          }
        }
      },
      "CallcreditCallValidate": {
        "title": "TransUnion",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.identity"
              }
            }
          }
        ]
      },
      "EquifaxIdentity": {
        "title": "Equifax",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.identity"
              }
            }
          }
        ]
      },
      "NhsEsr": {
        "title": "NHS ESR",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.nhs_esr"
              }
            }
          }
        ]
      },
      "NhsEsr-2": {
        "type": "object",
        "required": [
          "preferences"
        ],
        "properties": {
          "preferences": {
            "type": "object",
            "minProperties": 1,
            "properties": {
              "GMC": {
                "type": "boolean",
                "description": "General Medical Council (GMC)"
              },
              "NMC": {
                "type": "boolean",
                "description": "Nursing and Midwifery Council (NMC)"
              },
              "HCP": {
                "type": "boolean",
                "description": "Health and Care Professions Council (HCPC)"
              },
              "GDC": {
                "type": "boolean",
                "description": "General Dental Council (GDC)"
              },
              "GPC": {
                "type": "boolean",
                "description": "General Pharmaceutical Council (GPhC or GPC)"
              }
            }
          }
        }
      },
      "Onfido": {
        "title": "Photo ID",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "check.photo_id"
                ]
              }
            }
          }
        ]
      },
      "RightToWorkOptions": {
        "oneOf": [
          {
            "type": "string",
            "enum": [
              "GBR"
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "RightToRentOptions": {
        "oneOf": [
          {
            "type": "string",
            "enum": [
              "GBR"
            ]
          },
          {
            "type": "null"
          }
        ]
      },
      "Onfido-2": {
        "type": "object",
        "required": [
          "preferences"
        ],
        "properties": {
          "preferences": {
            "oneOf": [
              {
                "title": "Document verification",
                "type": "object",
                "required": [
                  "report_type",
                  "docs"
                ],
                "properties": {
                  "report_type": {
                    "type": "string",
                    "const": "standard"
                  },
                  "face": {
                    "type": "boolean",
                    "deprecated": true,
                    "readOnly": true,
                    "default": false,
                    "description": "Request a photograph of this person to compare against their ID document."
                  },
                  "liveness": {
                    "type": "boolean",
                    "deprecated": true,
                    "readOnly": true,
                    "default": false,
                    "description": "Ask this person to present a unique code when taking their photograph to help verify they are the one carrying out the check."
                  },
                  "facial_similarity": {
                    "type": "boolean",
                    "default": false,
                    "description": "Biometric analysis to verify document ownership, compared against a photo or motion video of the person performing the request.\n\n**Costs +1 Additional credit**\n"
                  },
                  "live_document": {
                    "type": "boolean",
                    "default": false,
                    "description": "Ask this person to take a photo of their document with a smartphone or tablet device.\n\n_This feature may not be enabled for all teams._\n"
                  },
                  "docs": {
                    "type": "array",
                    "minItems": 1,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "passport",
                        "driving_licence",
                        "national_id"
                      ]
                    }
                  },
                  "issuing_countries": {
                    "description": "Accept documents issued by only these countries.",
                    "oneOf": [
                      {
                        "type": "array",
                        "minItems": 1,
                        "uniqueItems": true,
                        "items": {
                          "type": "string",
                          "enum": [
                            "GBR",
                            "IRL"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "right_to_work": {
                    "$ref": "#/components/schemas/RightToWorkOptions",
                    "description": "For right to work in the UK (`GBR`), the `docs` property must include a `passport`.\n"
                  },
                  "right_to_rent": {
                    "$ref": "#/components/schemas/RightToRentOptions",
                    "description": "For right to rent in the UK (`GBR`), the `docs` property must include a `passport`.\n"
                  }
                }
              },
              {
                "title": "Biometric",
                "type": "object",
                "required": [
                  "report_type"
                ],
                "properties": {
                  "report_type": {
                    "type": "string",
                    "const": "biometric"
                  },
                  "issuing_countries": {
                    "description": "Accept documents issued by only these countries.",
                    "oneOf": [
                      {
                        "type": "array",
                        "minItems": 1,
                        "uniqueItems": true,
                        "items": {
                          "type": "string",
                          "enum": [
                            "GBR",
                            "IRL"
                          ]
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "allow_fallback": {
                    "type": "boolean",
                    "default": false,
                    "description": "If the person does not have a passport with a working NFC chip, allow them to continue to verify their other ID document."
                  },
                  "right_to_work": {
                    "$ref": "#/components/schemas/RightToWorkOptions"
                  },
                  "right_to_rent": {
                    "$ref": "#/components/schemas/RightToRentOptions"
                  }
                }
              }
            ]
          }
        }
      },
      "EmploymentReferencing": {
        "title": "Employment referencing",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.employment_referencing"
              }
            }
          }
        ]
      },
      "Common": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "timeframe": {
            "type": "integer",
            "description": "The number of years of required activity history.",
            "minimum": 1,
            "maximum": 10
          },
          "gap_threshold": {
            "type": "integer",
            "description": "Maximum number of days between activities before an explanation is required.\n",
            "minimum": 7,
            "maximum": 182,
            "multipleOf": 7
          },
          "supporting_evidence": {
            "type": [
              "null",
              "array"
            ],
            "description": "Activity types requiring supporting evidence.\n\n_This feature may not be enabled for all teams._\n",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "employment",
                "self_employment",
                "education",
                "gap"
              ]
            }
          }
        }
      },
      "VerificationMethod": {
        "title": "Verification Method",
        "type": "string",
        "enum": [
          "instant_and_manual"
        ],
        "x-enumDescriptions": {
          "instant_and_manual": "Combines instant digital verification with manual references."
        }
      },
      "EmploymentReferencing-2": {
        "type": "object",
        "required": [
          "preferences"
        ],
        "properties": {
          "preferences": {
            "required": [
              "type",
              "timeframe",
              "gap_threshold"
            ],
            "oneOf": [
              {
                "title": "Standard",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Common"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "standard"
                      },
                      "verification_method": {
                        "description": "Controls the verification method used to confirm employment. When `null` or not set, defaults to manual references only.",
                        "oneOf": [
                          {
                            "type": "null"
                          },
                          {
                            "$ref": "#/components/schemas/VerificationMethod"
                          }
                        ]
                      }
                    }
                  }
                ]
              },
              {
                "title": "Automated",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Common"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "automated_references"
                      },
                      "verification_method": {
                        "description": "Controls the verification method used to confirm employment. When `null` or not set, defaults to manual references only.",
                        "oneOf": [
                          {
                            "type": "null"
                          },
                          {
                            "$ref": "#/components/schemas/VerificationMethod"
                          }
                        ]
                      },
                      "review_references": {
                        "type": "boolean",
                        "description": "Review reference details before they are sent to referees.\n\n_This feature may not be enabled for all teams._\n"
                      },
                      "referee_form": {
                        "type": [
                          "null",
                          "string"
                        ],
                        "format": "uuid",
                        "description": "Add a form reference UUID to include a form to collect more details from referees.\n"
                      }
                    }
                  }
                ]
              },
              {
                "title": "Instant verification",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Common"
                  },
                  {
                    "properties": {
                      "type": {
                        "const": "instant_verification",
                        "description": "Verifies exclusively through instant digital verification."
                      }
                    }
                  }
                ]
              }
            ]
          }
        }
      },
      "Reference": {
        "title": "Employment history",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.reference"
              }
            }
          }
        ]
      },
      "Reference-2": {
        "type": "object",
        "required": [
          "preferences"
        ],
        "properties": {
          "preferences": {
            "type": "object",
            "required": [
              "years"
            ],
            "properties": {
              "years": {
                "type": "integer",
                "description": "Length of employment history.",
                "minimum": 1,
                "maximum": 10
              }
            }
          }
        }
      },
      "TrueLayer": {
        "title": "Banking information",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.banking_information"
              }
            }
          }
        ]
      },
      "TrueLayer-2": {
        "type": "object",
        "properties": {
          "preferences": {
            "type": "object",
            "properties": {
              "balance": {
                "type": "boolean",
                "default": false,
                "description": "Include balances for each connected account."
              },
              "transactions": {
                "default": false,
                "oneOf": [
                  {
                    "type": "integer",
                    "enum": [
                      1,
                      3,
                      6,
                      12
                    ],
                    "description": "Months of transactions to fetch for each connected account."
                  },
                  {
                    "type": "boolean",
                    "enum": [
                      false
                    ],
                    "description": "Do not retrieve transactions for each connected account."
                  }
                ]
              },
              "custom_form_template_id": {
                "type": "integer",
                "description": "Collect custom form answers as part of this check before connecting accounts.\n\nMust be a valid custom form template ID.\n"
              }
            }
          }
        }
      },
      "Video": {
        "title": "Face capture",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.video"
              }
            }
          }
        ]
      },
      "Watchlist": {
        "title": "Watchlist",
        "allOf": [
          {
            "$ref": "#/components/schemas/Check"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "check.watchlist"
              }
            }
          }
        ]
      },
      "SearchProfile": {
        "type": "string",
        "enum": [
          "sanctions",
          "peps_sanctions",
          "peps_sanctions_media",
          "peps_sanctions_media_extended"
        ]
      },
      "Watchlist-2": {
        "type": "object",
        "properties": {
          "preferences": {
            "type": "object",
            "properties": {
              "silent": {
                "type": "boolean",
                "default": true,
                "description": "When `false` this person will be asked to confirm their details and agree before the check is run, otherwise they will not be notified.\nIf this check is used in a request with other check types then this setting will be ignored as all other\nchecks require details confirmation.\n\n_Setting this preference may not be available for all teams._\n"
              },
              "monitor": {
                "description": "Continually monitor changes to the check results for one or three years.",
                "default": false,
                "oneOf": [
                  {
                    "type": "integer",
                    "enum": [
                      1,
                      3
                    ],
                    "description": "Continually monitor changes to the check results for one or three years.\n\n**Costs 1–2 additional credits**\n"
                  },
                  {
                    "type": "boolean",
                    "enum": [
                      false
                    ],
                    "description": "Disable ongoing monitoring."
                  }
                ]
              },
              "search_profile": {
                "$ref": "#/components/schemas/SearchProfile",
                "description": "Specifies the search profile to use for the watchlist check.\n\n**PEPs, sanctions and adverse media : +1 additional credit**\\\n**PEPs and sanctions and only : +1 additional credit**\n",
                "default": "peps_sanctions_media"
              },
              "all_entity_types": {
                "type": "boolean",
                "default": false,
                "description": "Include results for organisations, vessels, aircraft and other non-individual entities.\nThis will broaden the search and may return more results.\n"
              }
            }
          }
        }
      },
      "Request": {
        "title": "Document Request",
        "type": "object",
        "properties": {
          "type": {
            "const": "document.request"
          }
        }
      },
      "Request-2": {
        "type": "object",
        "required": [
          "title",
          "instructions"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "instructions": {
            "type": "string"
          }
        }
      },
      "RecordDocument": {
        "title": "RecordDocument",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "record_document"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "requested",
              "sent",
              "returned"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "complete"
            ]
          },
          "config": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "title": "Document Request",
                "required": [
                  "instructions"
                ],
                "properties": {
                  "instructions": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "object",
                "title": "Document Transfer",
                "properties": {
                  "require_return": {
                    "type": "boolean",
                    "default": false
                  },
                  "require_confirmation": {
                    "type": "boolean",
                    "default": false
                  },
                  "instructions": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "return_message": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Required if `require_return: true`\n"
                  }
                }
              }
            ]
          },
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "record",
                  "record_document"
                ]
              },
              "id": {
                "type": "integer"
              }
            }
          },
          "attachments": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Attachment"
                    },
                    {
                      "type": "integer"
                    }
                  ]
                }
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "completed_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "Transfer": {
        "title": "Document Transfer",
        "type": "object",
        "properties": {
          "type": {
            "const": "document.transfer"
          }
        }
      },
      "Transfer-2": {
        "type": "object",
        "properties": {
          "require_return": {
            "type": "boolean",
            "default": false
          },
          "require_confirmation": {
            "type": "boolean",
            "default": false
          },
          "instructions": {
            "type": [
              "null",
              "string"
            ]
          },
          "return_message": {
            "description": "Required if `require_return: true`\n",
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "Form": {
        "title": "Form",
        "type": "object",
        "properties": {
          "type": {
            "const": "form"
          }
        }
      },
      "ClientForm": {
        "title": "Client Form",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "client_form"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "reference": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "description": "Forms are either for internal data collection (`internal`), or are requested for completion by the client (`requested`).",
            "enum": [
              "internal",
              "requested"
            ]
          },
          "client": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Client"
              },
              {
                "type": "integer"
              }
            ]
          },
          "record": {
            "description": "Always `null` when `type: internal`",
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Record"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "instructions": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Document-3"
              }
            ]
          },
          "fields": {
            "type": "array",
            "description": "The first field must always be a Section. Any Fields not present in a Section are omitted.",
            "minItems": 2,
            "maxItems": 200,
            "items": {
              "$ref": "#/components/schemas/CollectorFields"
            }
          },
          "version": {
            "type": "integer",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "completed_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "archived_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "RecordSteps": {
        "title": "Record Steps",
        "anyOf": [
          {
            "title": "Credit report",
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Step"
                  },
                  {
                    "$ref": "#/components/schemas/CallcreditCallReport"
                  },
                  {
                    "$ref": "#/components/schemas/RecordCheck"
                  },
                  {
                    "$ref": "#/components/schemas/Metadata"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Step"
                  },
                  {
                    "$ref": "#/components/schemas/EquifaxCredit"
                  },
                  {
                    "$ref": "#/components/schemas/RecordCheck"
                  },
                  {
                    "$ref": "#/components/schemas/Metadata"
                  }
                ]
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/CriminalRecord"
              },
              {
                "$ref": "#/components/schemas/CriminalRecord-2"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Dummy"
              },
              {
                "$ref": "#/components/schemas/Dummy-2"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Thorntons"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/HscniAccessNi"
              },
              {
                "$ref": "#/components/schemas/HscniAccessNi-2"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "title": "Identity report",
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Step"
                  },
                  {
                    "$ref": "#/components/schemas/CallcreditCallValidate"
                  },
                  {
                    "$ref": "#/components/schemas/RecordCheck"
                  },
                  {
                    "$ref": "#/components/schemas/Metadata"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Step"
                  },
                  {
                    "$ref": "#/components/schemas/EquifaxIdentity"
                  },
                  {
                    "$ref": "#/components/schemas/RecordCheck"
                  },
                  {
                    "$ref": "#/components/schemas/Metadata"
                  }
                ]
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/NhsEsr"
              },
              {
                "$ref": "#/components/schemas/NhsEsr-2"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Onfido"
              },
              {
                "$ref": "#/components/schemas/Onfido-2"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/EmploymentReferencing"
              },
              {
                "$ref": "#/components/schemas/EmploymentReferencing-2"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Reference"
              },
              {
                "$ref": "#/components/schemas/Reference-2"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/TrueLayer"
              },
              {
                "$ref": "#/components/schemas/TrueLayer-2"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Video"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Watchlist"
              },
              {
                "$ref": "#/components/schemas/Watchlist-2"
              },
              {
                "$ref": "#/components/schemas/RecordCheck"
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Request"
              },
              {
                "type": "object",
                "properties": {
                  "preferences": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/Request-2"
                      }
                    ]
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "document": {
                    "readOnly": true,
                    "x-expandable": true,
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/RecordDocument"
                      },
                      {
                        "type": "integer"
                      }
                    ]
                  }
                }
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Transfer"
              },
              {
                "type": "object",
                "properties": {
                  "preferences": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/Transfer-2"
                      }
                    ]
                  },
                  "document": {
                    "readOnly": true,
                    "x-expandable": true,
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/RecordDocument"
                      },
                      {
                        "type": "integer"
                      }
                    ]
                  }
                }
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Form"
              },
              {
                "type": "object",
                "properties": {
                  "form": {
                    "readOnly": true,
                    "x-expandable": true,
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ClientForm"
                      },
                      {
                        "type": "string",
                        "format": "uuid",
                        "title": "Form reference"
                      }
                    ]
                  }
                }
              },
              {
                "$ref": "#/components/schemas/Metadata"
              }
            ]
          }
        ]
      },
      "Bold": {
        "title": "Bold",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "bold"
          }
        }
      },
      "Link": {
        "title": "Link",
        "type": "object",
        "required": [
          "type",
          "attrs"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "link"
          },
          "attrs": {
            "type": "object",
            "required": [
              "href",
              "target"
            ],
            "properties": {
              "href": {
                "type": "string"
              },
              "target": {
                "type": "string"
              },
              "class": {
                "type": [
                  "null",
                  "string"
                ]
              }
            }
          }
        }
      },
      "Text": {
        "anyOf": [
          {
            "title": "Plain Text",
            "type": "object",
            "required": [
              "type",
              "text"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "text"
              },
              "text": {
                "type": "string"
              }
            }
          },
          {
            "title": "Marked Text",
            "type": "object",
            "required": [
              "type",
              "marks",
              "text"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "text"
              },
              "marks": {
                "type": "array",
                "minItems": 1,
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Bold"
                    },
                    {
                      "$ref": "#/components/schemas/Link"
                    }
                  ]
                }
              },
              "text": {
                "type": "string"
              }
            }
          }
        ]
      },
      "Paragraph": {
        "title": "TipTap Paragraph",
        "type": "object",
        "required": [
          "type",
          "content"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "paragraph"
          },
          "content": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/Text"
            }
          }
        }
      },
      "Nodes": {
        "title": "TipTap Nodes",
        "anyOf": [
          {
            "$ref": "#/components/schemas/Paragraph"
          },
          {
            "$ref": "#/components/schemas/BulletList"
          },
          {
            "$ref": "#/components/schemas/OrderedList"
          }
        ]
      },
      "ListItem": {
        "title": "TipTap List Item",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "listItem"
          },
          "content": {
            "type": "array",
            "minItems": 1,
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/Nodes"
                }
              ]
            }
          }
        }
      },
      "BulletList": {
        "title": "TipTap Bullet List",
        "type": "object",
        "required": [
          "type",
          "content"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "bulletList"
          },
          "content": {
            "type": "array",
            "minItems": 1,
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ListItem"
                }
              ]
            }
          }
        }
      },
      "OrderedList": {
        "title": "TipTap Ordered List",
        "type": "object",
        "required": [
          "type",
          "attrs",
          "content"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "orderedList"
          },
          "attrs": {
            "type": "object",
            "required": [
              "start"
            ],
            "properties": {
              "start": {
                "type": "integer"
              }
            }
          },
          "content": {
            "type": "array",
            "minItems": 1,
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ListItem"
                }
              ]
            }
          }
        }
      },
      "Document-3": {
        "title": "TipTap Document",
        "type": "object",
        "required": [
          "type",
          "content"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "doc"
          },
          "content": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/Nodes"
            }
          }
        }
      },
      "Field": {
        "type": "object",
        "required": [
          "id",
          "type"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "Section": {
        "title": "Section",
        "allOf": [
          {
            "$ref": "#/components/schemas/Field"
          },
          {
            "type": "object",
            "required": [
              "label",
              "fields"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "section"
              },
              "label": {
                "type": "string"
              },
              "fields": {
                "type": "array",
                "description": "List of field IDs.",
                "minItems": 1,
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ]
      },
      "Dynamic": {
        "type": "object",
        "properties": {
          "show_if": {
            "description": "An object keyed by the field ID of a **Single Choice** or **Multiple Choice** field and its desired value to activate this field. Cannot be used if this field is present in another field's `show_if` property.\n",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "minProperties": 1,
                "additionalProperties": {
                  "title": "Field value",
                  "type": "string"
                }
              }
            ]
          }
        }
      },
      "Heading": {
        "title": "Heading",
        "allOf": [
          {
            "$ref": "#/components/schemas/Field"
          },
          {
            "type": "object",
            "required": [
              "label"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "heading"
              },
              "label": {
                "type": "string"
              }
            }
          },
          {
            "$ref": "#/components/schemas/Dynamic"
          }
        ]
      },
      "Paragraph-2": {
        "title": "Paragraph",
        "allOf": [
          {
            "$ref": "#/components/schemas/Field"
          },
          {
            "type": "object",
            "required": [
              "json_content"
            ],
            "properties": {
              "type": {
                "type": "string",
                "const": "rich_text"
              },
              "json_content": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Document-3"
                  }
                ]
              }
            }
          },
          {
            "$ref": "#/components/schemas/Dynamic"
          }
        ]
      },
      "Validation": {
        "type": "object",
        "properties": {
          "validation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "required"
                  ]
                }
              }
            ]
          }
        }
      },
      "Input": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Field"
          },
          {
            "type": "object",
            "required": [
              "label"
            ],
            "properties": {
              "label": {
                "type": "string"
              },
              "description": {
                "type": [
                  "null",
                  "string"
                ]
              }
            }
          },
          {
            "$ref": "#/components/schemas/Validation"
          },
          {
            "$ref": "#/components/schemas/Dynamic"
          }
        ]
      },
      "ShortAnswer": {
        "title": "Short Answer",
        "allOf": [
          {
            "$ref": "#/components/schemas/Input"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "text"
              }
            }
          }
        ]
      },
      "Input-2": {
        "type": "object",
        "properties": {
          "flag": {
            "type": "boolean"
          }
        }
      },
      "ShortAnswer-2": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ShortAnswer"
          },
          {
            "$ref": "#/components/schemas/Input-2"
          },
          {
            "type": "object",
            "properties": {
              "value": {
                "type": [
                  "null",
                  "string"
                ]
              }
            }
          }
        ]
      },
      "LongAnswer": {
        "title": "Long Answer",
        "allOf": [
          {
            "$ref": "#/components/schemas/Input"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "textarea"
              }
            }
          }
        ]
      },
      "LongAnswer-2": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LongAnswer"
          },
          {
            "$ref": "#/components/schemas/Input-2"
          },
          {
            "type": "object",
            "properties": {
              "value": {
                "type": [
                  "null",
                  "string"
                ]
              }
            }
          }
        ]
      },
      "MultiInput": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Field"
          },
          {
            "type": "object",
            "required": [
              "label"
            ],
            "properties": {
              "label": {
                "type": "object"
              },
              "description": {
                "type": [
                  "null",
                  "string"
                ]
              }
            }
          },
          {
            "$ref": "#/components/schemas/Validation"
          },
          {
            "$ref": "#/components/schemas/Dynamic"
          }
        ]
      },
      "Choice": {
        "title": "Choice",
        "allOf": [
          {
            "type": "object",
            "required": [
              "value",
              "options"
            ],
            "properties": {
              "value": {
                "type": "string"
              },
              "options": {
                "type": "array",
                "minItems": 2,
                "uniqueItems": true,
                "items": {
                  "type": "string"
                }
              }
            }
          }
        ]
      },
      "SingleChoice": {
        "title": "Single Choice",
        "allOf": [
          {
            "$ref": "#/components/schemas/MultiInput"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "radio"
              },
              "label": {
                "$ref": "#/components/schemas/Choice"
              }
            }
          }
        ]
      },
      "SingleChoice-2": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SingleChoice"
          },
          {
            "$ref": "#/components/schemas/Input-2"
          },
          {
            "type": "object",
            "properties": {
              "value": {
                "type": [
                  "null",
                  "string"
                ]
              }
            }
          }
        ]
      },
      "MultipleChoice": {
        "title": "Multiple Choice",
        "allOf": [
          {
            "$ref": "#/components/schemas/MultiInput"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "checkbox"
              },
              "label": {
                "$ref": "#/components/schemas/Choice"
              }
            }
          }
        ]
      },
      "MultipleChoice-2": {
        "allOf": [
          {
            "$ref": "#/components/schemas/MultipleChoice"
          },
          {
            "$ref": "#/components/schemas/Input-2"
          },
          {
            "type": "object",
            "properties": {
              "value": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                ]
              }
            }
          }
        ]
      },
      "Manual": {
        "title": "Manual",
        "type": "object",
        "required": [
          "label",
          "description"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "document"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "Document-4": {
        "title": "Document",
        "allOf": [
          {
            "$ref": "#/components/schemas/Field"
          },
          {
            "$ref": "#/components/schemas/Manual"
          },
          {
            "$ref": "#/components/schemas/Validation"
          },
          {
            "$ref": "#/components/schemas/Dynamic"
          },
          {
            "$ref": "#/components/schemas/Input-2"
          },
          {
            "type": "object",
            "properties": {
              "value": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  }
                ]
              }
            }
          }
        ]
      },
      "CollectorFields": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/Section"
          },
          {
            "$ref": "#/components/schemas/Heading"
          },
          {
            "$ref": "#/components/schemas/Paragraph-2"
          },
          {
            "$ref": "#/components/schemas/ShortAnswer-2"
          },
          {
            "$ref": "#/components/schemas/LongAnswer-2"
          },
          {
            "$ref": "#/components/schemas/SingleChoice-2"
          },
          {
            "$ref": "#/components/schemas/MultipleChoice-2"
          },
          {
            "$ref": "#/components/schemas/Document-4"
          }
        ]
      },
      "ClientDocument": {
        "title": "Client Document",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "client_document"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "client": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "$ref": "#/components/schemas/Client"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "config": {
            "readOnly": true,
            "type": "object",
            "required": [
              "instructions"
            ],
            "properties": {
              "instructions": {
                "type": "string"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "ClientFile": {
        "title": "Client File",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "client_file"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "readOnly": true,
            "enum": [
              "internal",
              "sent",
              "received"
            ]
          },
          "source": {
            "readOnly": true,
            "x-expandable": true,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "check",
                      "client",
                      "client_form",
                      "client_document",
                      "record_document"
                    ]
                  }
                }
              },
              {
                "$ref": "#/components/schemas/Check-2"
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Client"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "status": {
                        "oneOf": [
                          {
                            "type": "null"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "pending",
                              "approved",
                              "rejected"
                            ]
                          }
                        ]
                      }
                    }
                  }
                ]
              },
              {
                "$ref": "#/components/schemas/ClientForm"
              },
              {
                "$ref": "#/components/schemas/ClientDocument"
              },
              {
                "$ref": "#/components/schemas/RecordDocument"
              }
            ]
          },
          "name": {
            "type": "string",
            "minimum": 1,
            "maximum": 255
          },
          "attachment": {
            "$ref": "#/components/schemas/Attachment",
            "readOnly": true
          },
          "created_by": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "client",
                      "team_member"
                    ]
                  }
                }
              },
              {
                "$ref": "#/components/schemas/Client"
              },
              {
                "$ref": "#/components/schemas/TeamMember"
              }
            ]
          },
          "is_deletable": {
            "type": "boolean",
            "readOnly": true,
            "description": "Indicates whether the client file can be deleted."
          },
          "expires_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "description": "The date and time an uploaded file expires."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "redacted_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "The date and time the file was redacted by the user.\nPlease note that not all files can be redacted.\nFor example a file that is part of a check.\n"
          }
        }
      },
      "name": {
        "type": "string",
        "minimum": 1,
        "maximum": 255
      },
      "expires_at": {
        "type": [
          "null",
          "string"
        ],
        "format": "date-time",
        "description": "The date and time an uploaded file expires."
      },
      "ClientCorrection": {
        "title": "Client Correction",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "client_correction"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Unique client correction identifier."
          },
          "client": {
            "readOnly": true,
            "description": "The client associated with this correction.",
            "x-expandable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Client"
              },
              {
                "type": "integer",
                "description": "Unique client identifier."
              }
            ]
          },
          "record": {
            "description": "The record associated with this correction.",
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Record"
              },
              {
                "type": "integer",
                "description": "Unique record identifier."
              }
            ]
          },
          "status": {
            "description": "The status of the correction.",
            "type": "string",
            "enum": [
              "pending",
              "accepted",
              "rejected"
            ]
          },
          "correction": {
            "type": "object",
            "properties": {
              "first_name": {
                "type": "string",
                "description": "The corrected first name."
              },
              "middle_name": {
                "type": [
                  "null",
                  "string"
                ],
                "description": "The corrected middle name."
              },
              "last_name": {
                "type": "string",
                "description": "The corrected last name."
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the correction was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the correction was last updated."
          }
        }
      },
      "CreditHistory": {
        "title": "CreditHistory",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "credit_history"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "credits": {
            "type": "integer",
            "readOnly": true
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true
          },
          "causer": {
            "readOnly": true,
            "x-expandable": true,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "user",
                      "check"
                    ]
                  }
                }
              },
              {
                "$ref": "#/components/schemas/Check-2"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "RecordSettings": {
        "title": "Record Settings",
        "type": "object",
        "required": [
          "steps",
          "notification"
        ],
        "properties": {
          "steps": {
            "type": "array",
            "minItems": 1,
            "description": "Steps to be completed by the client."
          },
          "notification": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "email"
                ]
              },
              {
                "type": "boolean",
                "enum": [
                  false
                ]
              }
            ],
            "description": "Enable or disable a \"New Request\" notification to the client."
          },
          "message": {
            "type": [
              "null",
              "string"
            ],
            "maxLength": 5000,
            "description": "Include a message for client.\n\nMessage is shown to the client before they begin the first step. It is also included in an email notification, if sent.\n"
          },
          "reminder": {
            "type": "boolean",
            "default": false,
            "description": "Enable or disable email reminders.\n\nWhen enabled, the client is sent a reminder email every 2 days until all steps have been completed, the record expires or is archived.\n"
          },
          "is_declaration_required": {
            "type": "boolean",
            "default": false,
            "description": "Denotes the presence/absence of a team's custom declaration in a record. Available where feature enabled on team only."
          }
        }
      },
      "Form-2": {
        "type": "object",
        "required": [
          "preferences"
        ],
        "properties": {
          "preferences": {
            "writeOnly": true,
            "type": "object",
            "required": [
              "form"
            ],
            "properties": {
              "form": {
                "type": "string",
                "format": "uuid",
                "description": "Form template reference"
              }
            }
          }
        }
      },
      "RecordStepsWrite": {
        "title": "Record Steps",
        "anyOf": [
          {
            "title": "Credit report",
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Step"
                  },
                  {
                    "$ref": "#/components/schemas/CallcreditCallReport"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Step"
                  },
                  {
                    "$ref": "#/components/schemas/EquifaxCredit"
                  }
                ]
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/CriminalRecord"
              },
              {
                "$ref": "#/components/schemas/CriminalRecord-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Dummy"
              },
              {
                "$ref": "#/components/schemas/Dummy-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Thorntons"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/HscniAccessNi"
              },
              {
                "$ref": "#/components/schemas/HscniAccessNi-2"
              }
            ]
          },
          {
            "title": "Identity report",
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Step"
                  },
                  {
                    "$ref": "#/components/schemas/CallcreditCallValidate"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Step"
                  },
                  {
                    "$ref": "#/components/schemas/EquifaxIdentity"
                  }
                ]
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/NhsEsr"
              },
              {
                "$ref": "#/components/schemas/NhsEsr-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Onfido"
              },
              {
                "$ref": "#/components/schemas/Onfido-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/EmploymentReferencing"
              },
              {
                "$ref": "#/components/schemas/EmploymentReferencing-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Reference"
              },
              {
                "$ref": "#/components/schemas/Reference-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/TrueLayer"
              },
              {
                "$ref": "#/components/schemas/TrueLayer-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Video"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Watchlist"
              },
              {
                "$ref": "#/components/schemas/Watchlist-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Request"
              },
              {
                "type": "object",
                "required": [
                  "preferences"
                ],
                "properties": {
                  "preferences": {
                    "oneOf": [
                      {
                        "title": "New Document",
                        "$ref": "#/components/schemas/Request-2"
                      },
                      {
                        "title": "Document Template",
                        "type": "object",
                        "required": [
                          "template"
                        ],
                        "properties": {
                          "template": {
                            "type": "integer"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Transfer"
              },
              {
                "type": "object",
                "required": [
                  "preferences"
                ],
                "properties": {
                  "preferences": {
                    "oneOf": [
                      {
                        "allOf": [
                          {
                            "type": "object",
                            "title": "New Document",
                            "required": [
                              "name",
                              "attachment"
                            ],
                            "properties": {
                              "name": {
                                "type": "string"
                              },
                              "attachment": {
                                "type": "integer"
                              }
                            }
                          },
                          {
                            "$ref": "#/components/schemas/Transfer-2"
                          }
                        ]
                      },
                      {
                        "allOf": [
                          {
                            "type": "object",
                            "title": "Document Template",
                            "required": [
                              "template"
                            ],
                            "properties": {
                              "template": {
                                "type": "integer"
                              }
                            }
                          },
                          {
                            "$ref": "#/components/schemas/Transfer-2"
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/Step"
              },
              {
                "$ref": "#/components/schemas/Form"
              },
              {
                "$ref": "#/components/schemas/Form-2"
              }
            ]
          }
        ]
      },
      "Document-5": {
        "title": "Document",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "document"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "is_enabled": {
            "type": "boolean"
          },
          "attachment": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Attachment"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "EmailTemplate": {
        "title": "Email Template",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "email_template"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "is_enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "DocumentTemplate": {
        "title": "Document Template",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "description",
          "content"
        ],
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "document_template"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "is_enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "PresetStep": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "preset_step",
            "readOnly": true
          },
          "type": {
            "type": "string"
          }
        }
      },
      "PresetForm": {
        "type": "object",
        "required": [
          "preferences"
        ],
        "properties": {
          "preferences": {
            "type": "object",
            "required": [
              "form"
            ],
            "properties": {
              "form": {
                "type": "string",
                "format": "uuid",
                "description": "Form template reference"
              }
            }
          }
        }
      },
      "StepTypes": {
        "type": "string",
        "enum": [
          "check.credit",
          "check.criminal_record",
          "check.dummy",
          "check.hscni_access_ni",
          "check.identity",
          "check.nhs_esr",
          "check.banking_information",
          "check.photo_id",
          "check.employment_referencing",
          "check.reference",
          "check.thorntons_onboarding",
          "check.video",
          "check.watchlist",
          "document.request",
          "document.transfer",
          "form"
        ]
      },
      "InvalidPresetStep": {
        "title": "Invalid",
        "type": "object",
        "readOnly": true,
        "properties": {
          "object": {
            "type": "string",
            "const": "invalid_preset_step"
          },
          "type": {
            "$ref": "#/components/schemas/StepTypes"
          },
          "preferences": {
            "oneOf": [
              {
                "type": "null",
                "description": "A `null` value indicates the preferences for the invalid step could not be assessed."
              },
              {
                "type": "object",
                "additionalProperties": {
                  "description": "Can be any valid preference property value including string, number, boolean, array or object."
                }
              }
            ]
          },
          "errors": {
            "type": "object",
            "minItems": 1,
            "additionalProperties": {
              "type": "array",
              "minItems": 1,
              "description": "Each property may contain more than one validation error\n\nThe property name references to the property's dot-notated path within the corresponding `preset_step` object:\n\n**E.g. A step preference is no longer available**\n```json\n{\n  \"preferences.liveness\": ['Preference no longer available']\n}\n```\n\n**E.g. A step type is not available the team**\n```json\n{\n  \"type\": ['Step type check.watchlist is not available for this team']\n}\n```\n",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "PresetSteps": {
        "title": "Record Steps Presets",
        "anyOf": [
          {
            "title": "Credit report",
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PresetStep"
                  },
                  {
                    "$ref": "#/components/schemas/CallcreditCallReport"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PresetStep"
                  },
                  {
                    "$ref": "#/components/schemas/EquifaxCredit"
                  }
                ]
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/CriminalRecord"
              },
              {
                "$ref": "#/components/schemas/CriminalRecord-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/Dummy"
              },
              {
                "$ref": "#/components/schemas/Dummy-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/Thorntons"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/HscniAccessNi"
              },
              {
                "$ref": "#/components/schemas/HscniAccessNi-2"
              }
            ]
          },
          {
            "title": "Identity report",
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PresetStep"
                  },
                  {
                    "$ref": "#/components/schemas/CallcreditCallValidate"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/PresetStep"
                  },
                  {
                    "$ref": "#/components/schemas/EquifaxIdentity"
                  }
                ]
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/NhsEsr"
              },
              {
                "$ref": "#/components/schemas/NhsEsr-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/Onfido"
              },
              {
                "$ref": "#/components/schemas/Onfido-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/EmploymentReferencing"
              },
              {
                "$ref": "#/components/schemas/EmploymentReferencing-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/Reference"
              },
              {
                "$ref": "#/components/schemas/Reference-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/TrueLayer"
              },
              {
                "$ref": "#/components/schemas/TrueLayer-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/Video"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/Watchlist"
              },
              {
                "$ref": "#/components/schemas/Watchlist-2"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/Request"
              },
              {
                "type": "object",
                "required": [
                  "preferences"
                ],
                "properties": {
                  "preferences": {
                    "title": "Document Template",
                    "type": "object",
                    "required": [
                      "template"
                    ],
                    "properties": {
                      "template": {
                        "type": "integer"
                      }
                    }
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/Transfer"
              },
              {
                "type": "object",
                "required": [
                  "preferences"
                ],
                "properties": {
                  "preferences": {
                    "allOf": [
                      {
                        "type": "object",
                        "title": "Document Template",
                        "required": [
                          "template"
                        ],
                        "properties": {
                          "template": {
                            "type": "integer"
                          }
                        }
                      },
                      {
                        "$ref": "#/components/schemas/Transfer-2"
                      }
                    ]
                  }
                }
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/PresetStep"
              },
              {
                "$ref": "#/components/schemas/Form"
              },
              {
                "$ref": "#/components/schemas/PresetForm"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/InvalidPresetStep"
              }
            ]
          }
        ]
      },
      "RecordPresets": {
        "allOf": [
          {
            "$ref": "#/components/schemas/RecordSettings"
          },
          {
            "properties": {
              "steps": {
                "items": {
                  "$ref": "#/components/schemas/PresetSteps"
                }
              }
            }
          }
        ]
      },
      "RecordTemplate": {
        "title": "Record Template",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "description",
          "presets"
        ],
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "record_template"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": "string"
          },
          "presets": {
            "title": "Record Template Presets",
            "type": "object",
            "description": "Settings and steps configured for this template.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RecordPresets"
              },
              {
                "properties": {
                  "assignees": {
                    "type": "array",
                    "description": "IDs of team members assigned to the Record.",
                    "items": {
                      "type": "integer"
                    }
                  }
                }
              }
            ]
          },
          "is_enabled": {
            "type": "boolean",
            "default": false
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "File": {
        "title": "File",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "file"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "readOnly": true,
            "enum": [
              "internal",
              "sent",
              "received"
            ]
          },
          "source": {
            "readOnly": true,
            "x-expandable": true,
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "check",
                      "client",
                      "client_form",
                      "client_document",
                      "record_document"
                    ]
                  }
                }
              },
              {
                "$ref": "#/components/schemas/Check-2"
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Client"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "status": {
                        "oneOf": [
                          {
                            "type": "null"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "pending",
                              "approved",
                              "rejected"
                            ]
                          }
                        ]
                      }
                    }
                  }
                ]
              },
              {
                "$ref": "#/components/schemas/ClientForm"
              },
              {
                "$ref": "#/components/schemas/ClientDocument"
              },
              {
                "$ref": "#/components/schemas/RecordDocument"
              }
            ]
          },
          "name": {
            "type": "string",
            "minimum": 1,
            "maximum": 255
          },
          "attachment": {
            "$ref": "#/components/schemas/Attachment",
            "readOnly": true
          },
          "created_by": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "client",
                      "team_member"
                    ]
                  }
                }
              },
              {
                "$ref": "#/components/schemas/Client"
              },
              {
                "$ref": "#/components/schemas/TeamMember"
              }
            ]
          },
          "is_deletable": {
            "type": "boolean",
            "readOnly": true,
            "description": "Indicates whether the client file can be deleted."
          },
          "expires_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "description": "The date and time an uploaded file expires."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "redacted_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "The date and time the file was redacted by the user.\nPlease note that not all files can be redacted.\nFor example a file that is part of a check.\n"
          }
        }
      },
      "WebhookSubscribeEvents": {
        "type": "string",
        "enum": [
          "*",
          "case.*",
          "client.*",
          "form.*",
          "record.*",
          "case.approved",
          "case.archived",
          "case.created",
          "case.item_added",
          "case.item_removed",
          "case.rejected",
          "case.status",
          "case.unarchived",
          "case.updated",
          "client.archived",
          "client.created",
          "client.deleted",
          "client.organisations",
          "client.record",
          "client.status",
          "client.unarchived",
          "client.updated",
          "client.deletion_reminder_updated",
          "client.deletion_reminder_deleted",
          "client.deletion_reminder_due",
          "form.attached",
          "form.deleted",
          "form.modified",
          "form.sent",
          "form.submitted",
          "form.updated",
          "record.bounced",
          "record.created",
          "record.finished",
          "record.reviewed",
          "record.unreviewed",
          "record.updated",
          "watchlist.updated"
        ]
      },
      "Webhook": {
        "title": "Webhook",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "webhook"
          },
          "id": {
            "type": "integer",
            "description": "The unique webhook identifier.",
            "readOnly": true
          },
          "uuid": {
            "type": "string",
            "description": "The globally unique webhook identifier.",
            "format": "uuid",
            "readOnly": true
          },
          "url": {
            "type": "string",
            "description": "The webhook delivery url."
          },
          "secret": {
            "type": "string",
            "description": "Shared secret key used to sign webhook payloads.",
            "readOnly": true
          },
          "events": {
            "type": "array",
            "description": "The event or events this webhook is subscribed to. Supports wildcards; `*` all events, `client.*` all client events, etc.\n",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "$ref": "#/components/schemas/WebhookSubscribeEvents"
            }
          },
          "is_enabled": {
            "type": "boolean",
            "description": "Whether or not the webhook is currently enabled."
          },
          "created_at": {
            "type": "string",
            "description": "Date and time the webhook was created.",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "description": "Date and time the webhook was last updated.",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "WebhookDeliveryEvents": {
        "type": "string",
        "enum": [
          "case.approved",
          "case.archived",
          "case.created",
          "case.item_added",
          "case.item_removed",
          "case.rejected",
          "case.status",
          "case.unarchived",
          "case.updated",
          "client.archived",
          "client.created",
          "client.deleted",
          "client.organisations",
          "client.record",
          "client.status",
          "client.unarchived",
          "client.updated",
          "client.deletion_reminder_updated",
          "client.deletion_reminder_deleted",
          "client.deletion_reminder_due",
          "form.attached",
          "form.deleted",
          "form.modified",
          "form.sent",
          "form.submitted",
          "form.updated",
          "record.bounced",
          "record.created",
          "record.finished",
          "record.reviewed",
          "record.unreviewed",
          "record.updated",
          "watchlist.updated",
          "ping"
        ]
      },
      "WebhookDeliveryRequest": {
        "title": "Webhook Delivery Request",
        "type": "object",
        "readOnly": true,
        "properties": {
          "url": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "const": "POST"
          },
          "headers": {
            "type": "object",
            "properties": {
              "Content-Length": {
                "type": "string"
              },
              "Host": {
                "type": "string"
              },
              "User-Agent": {
                "type": "string"
              },
              "Content-Type": {
                "type": "string",
                "const": "application/json"
              },
              "X-AQID-Signature": {
                "type": "string"
              },
              "X-AQID-Delivery-Id": {
                "type": "string"
              }
            }
          },
          "body": {
            "type": "object",
            "properties": {
              "uuid": {
                "type": "string",
                "format": "uuid"
              },
              "event": {
                "$ref": "#/components/schemas/WebhookDeliveryEvents"
              },
              "sent_at": {
                "type": "string",
                "format": "date-time"
              },
              "data": {
                "anyOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "object"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                ]
              }
            }
          }
        }
      },
      "WebhookDeliveryResponse": {
        "title": "Webhook Delivery Response",
        "type": "object",
        "readOnly": true,
        "properties": {
          "status_code": {
            "type": "string"
          },
          "headers": {
            "type": "object"
          },
          "body": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              },
              {
                "type": "object"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          }
        }
      },
      "WebhookDelivery": {
        "title": "Webhook Delivery",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "webhook_delivery"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "uuid": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "event": {
            "readOnly": true,
            "$ref": "#/components/schemas/WebhookDeliveryEvents"
          },
          "attempts": {
            "type": "integer",
            "minimum": 0,
            "readOnly": true
          },
          "request": {
            "$ref": "#/components/schemas/WebhookDeliveryRequest"
          },
          "response": {
            "$ref": "#/components/schemas/WebhookDeliveryResponse"
          },
          "last_sent_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "Form-3": {
        "title": "Form",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "form"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "reference": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "description": "Forms are either for internal data collection (`internal`), or are requested for completion by the client (`requested`).",
            "enum": [
              "internal",
              "requested"
            ]
          },
          "client": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Client"
              },
              {
                "type": "integer"
              }
            ]
          },
          "record": {
            "description": "Always `null` when `type: internal`",
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Record"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "instructions": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Document-3"
              }
            ]
          },
          "fields": {
            "type": "array",
            "description": "The first field must always be a Section. Any Fields not present in a Section are omitted.",
            "minItems": 2,
            "maxItems": 200,
            "items": {
              "$ref": "#/components/schemas/CollectorFields"
            }
          },
          "version": {
            "type": "integer",
            "readOnly": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "completed_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true
          },
          "archived_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "Template": {
        "title": "Template",
        "type": "object",
        "required": [
          "template_id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "document"
          },
          "template_id": {
            "type": "integer"
          }
        }
      },
      "DocumentTemplate-2": {
        "title": "Document",
        "allOf": [
          {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Field"
                  },
                  {
                    "$ref": "#/components/schemas/Manual"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Field"
                  },
                  {
                    "$ref": "#/components/schemas/Template"
                  }
                ]
              }
            ]
          },
          {
            "$ref": "#/components/schemas/Validation"
          },
          {
            "$ref": "#/components/schemas/Dynamic"
          }
        ]
      },
      "BuilderFields": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/Section"
          },
          {
            "$ref": "#/components/schemas/Heading"
          },
          {
            "$ref": "#/components/schemas/Paragraph-2"
          },
          {
            "$ref": "#/components/schemas/ShortAnswer"
          },
          {
            "$ref": "#/components/schemas/LongAnswer"
          },
          {
            "$ref": "#/components/schemas/SingleChoice"
          },
          {
            "$ref": "#/components/schemas/MultipleChoice"
          },
          {
            "$ref": "#/components/schemas/DocumentTemplate-2"
          }
        ]
      },
      "FormTemplate": {
        "title": "Form Template",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "form_template"
          },
          "id": {
            "type": "integer",
            "readOnly": true
          },
          "reference": {
            "type": "string",
            "format": "uuid",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "maxLength": 255
          },
          "description": {
            "type": [
              "null",
              "string"
            ],
            "maxLength": 255
          },
          "instructions": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Document-3"
              }
            ]
          },
          "fields": {
            "type": "array",
            "description": "The first field must always be a Section. Any Fields not present in a Section are omitted.",
            "minItems": 2,
            "maxItems": 200,
            "items": {
              "$ref": "#/components/schemas/BuilderFields"
            }
          },
          "version": {
            "type": "integer",
            "readOnly": true
          },
          "is_enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "archived_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "AvailableStep": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "available_step",
            "readOnly": true
          },
          "type": {
            "type": "string"
          }
        }
      },
      "Costs": {
        "type": "object",
        "properties": {
          "costs": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      },
      "AvailableSteps": {
        "title": "Available Steps",
        "anyOf": [
          {
            "title": "Credit report",
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AvailableStep"
                  },
                  {
                    "$ref": "#/components/schemas/CallcreditCallReport"
                  },
                  {
                    "$ref": "#/components/schemas/Costs"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AvailableStep"
                  },
                  {
                    "$ref": "#/components/schemas/EquifaxCredit"
                  },
                  {
                    "$ref": "#/components/schemas/Costs"
                  }
                ]
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/CriminalRecord"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/Dummy"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/Thorntons"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/HscniAccessNi"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "title": "Identity report",
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AvailableStep"
                  },
                  {
                    "$ref": "#/components/schemas/CallcreditCallValidate"
                  },
                  {
                    "$ref": "#/components/schemas/Costs"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AvailableStep"
                  },
                  {
                    "$ref": "#/components/schemas/EquifaxIdentity"
                  },
                  {
                    "$ref": "#/components/schemas/Costs"
                  }
                ]
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/NhsEsr"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/Onfido"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/EmploymentReferencing"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/Reference"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/TrueLayer"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/Video"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/Watchlist"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/Request"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/Transfer"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          },
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvailableStep"
              },
              {
                "$ref": "#/components/schemas/Form"
              },
              {
                "$ref": "#/components/schemas/Costs"
              }
            ]
          }
        ]
      },
      "ValidatedSteps": {
        "title": "Validated Steps",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "validated_steps"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "const": "validated_step"
                },
                "type": {
                  "$ref": "#/components/schemas/StepTypes"
                },
                "cost": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          }
        }
      },
      "SdkToken": {
        "title": "SDK Token",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "sdk_token"
          },
          "token": {
            "type": "string",
            "description": "A JSON Web Token, valid for `60` minutes.",
            "readOnly": true
          },
          "record_id": {
            "type": "integer",
            "description": "The SDK Token is scoped for this individual Record only.",
            "writeOnly": true
          }
        }
      },
      "ClientCaseStatus": {
        "title": "Case Status",
        "type": "string",
        "enum": [
          "pending",
          "awaiting_response",
          "action_required",
          "reviewed_pending_decision",
          "approved",
          "rejected",
          "on_hold"
        ],
        "description": "The overall status of the case.\n\n- `pending`:  _Deprecated_\n- `awaiting_response`: Awaiting response from client, provider, or external party.\n- `action_required`: Awaiting team member action to progress the case.\n- `reviewed_pending_decision`: Pending final approval or rejection.\n- `approved`: Completed and approved.\n- `rejected`: Completed and rejected.\n- `on_hold`: Inactive, on hold.\n"
      },
      "ClientCaseItem": {
        "title": "Case Item",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "case_item"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "The unique case item identifier."
          },
          "entity": {
            "x-expandable": true,
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "description": "The unique entity identifier."
                  },
                  "type": {
                    "type": "string",
                    "const": "record",
                    "description": "The entity type."
                  }
                }
              },
              {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Record"
                  }
                ]
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the case item was added to the case."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the case item's details were last updated."
          }
        }
      },
      "ClientCase": {
        "title": "Case",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "case"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "The unique case identifier."
          },
          "name": {
            "type": "string",
            "description": "The case name."
          },
          "reference": {
            "type": [
              "null",
              "string"
            ],
            "description": "The case reference."
          },
          "status": {
            "$ref": "#/components/schemas/ClientCaseStatus"
          },
          "client": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "type": "integer",
                "description": "The unique client identifier."
              },
              {
                "$ref": "#/components/schemas/Client"
              }
            ]
          },
          "items": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "type": "integer",
                  "description": "The unique case item identifier."
                }
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ClientCaseItem"
                }
              }
            ]
          },
          "assignees": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "array",
                "items": {
                  "type": "integer",
                  "description": "The unique assignee identifier."
                }
              },
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/List"
                  },
                  {
                    "properties": {
                      "data": {
                        "items": {
                          "$ref": "#/components/schemas/TeamMember"
                        }
                      }
                    }
                  }
                ]
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the case was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the case's details were last updated."
          },
          "archived_at": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the case was archived."
          }
        }
      },
      "ClientCaseReview": {
        "title": "Case Review",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "readOnly": true,
            "const": "case_review"
          },
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "The unique case review identifier."
          },
          "reviewed_by": {
            "readOnly": true,
            "x-expandable": true,
            "oneOf": [
              {
                "type": "integer",
                "description": "The unique team member identifier."
              },
              {
                "$ref": "#/components/schemas/TeamMember"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ClientCaseStatus"
          },
          "from_status": {
            "readOnly": true,
            "$ref": "#/components/schemas/ClientCaseStatus",
            "description": "The previous status of the case review."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the case review was added."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "readOnly": true,
            "description": "Date and time the case review details were last updated."
          }
        }
      },
      "ClientCaseStatusAggregate": {
        "title": "Case status aggregate",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "object": {
            "type": "string",
            "const": "case_status_aggregate"
          },
          "aggregates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "$ref": "#/components/schemas/ClientCaseStatus"
                },
                "count": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "personal_token": {
        "bearerFormat": "auth-scheme",
        "description": "Bearer HTTP authentication.",
        "scheme": "bearer",
        "type": "http"
      },
      "oauth": {
        "type": "oauth2",
        "description": "OAuth2 authentication.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "/oauth/authorize",
            "tokenUrl": "/oauth/token",
            "refreshUrl": "/oauth/token",
            "scopes": {}
          }
        }
      },
      "cookie_auth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "_aqid"
      }
    },
    "responses": {
      "401": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Unauthenticated."
            }
          }
        }
      },
      "403": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Description of the error."
                }
              }
            },
            "example": {
              "message": "This action is unauthorized."
            }
          }
        }
      },
      "404": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "Not Found."
            }
          }
        }
      },
      "422": {
        "description": "Unprocessable Content",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "additionalProperties": {
                "type": "array",
                "minItems": 1,
                "description": "Each property may contain more than one validation error\n\nThe property name references to the property's dot-notated path within the request body:\n\n**Request body**\n```json\n{\n  \"fields\": {\n    \"type\": false\n  }\n}\n```\n\n**Response**\n```json\n{\n  \"fields.type\": ['Value must be a string']\n}\n```\n",
                "items": {
                  "type": "string"
                }
              }
            },
            "example": {
              "errors": [
                "At least one property is required"
              ]
            }
          }
        }
      },
      "500": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Description of the error."
                }
              }
            }
          }
        }
      },
      "410-attachment": {
        "description": "Gone",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "default": "File scan detected a virus"
                }
              }
            }
          }
        }
      },
      "423-attachment": {
        "description": "Locked",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "enum": [
                    "File scan is not yet complete",
                    "File scan could not be completed"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "resourceId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer"
        }
      },
      "page": {
        "name": "page",
        "in": "query",
        "description": "Get results starting from this page.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        }
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "description": "Number of items per page.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 25
        }
      },
      "order_by": {
        "name": "order_by",
        "in": "query",
        "description": "Order results in ascending or descending order. Results returned in ascending order by default.",
        "schema": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ]
        }
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Accounts & Access",
      "tags": [
        "User Account",
        "Your Team",
        "Teams"
      ]
    },
    {
      "name": "Clients",
      "tags": [
        "Clients",
        "Client Assignees",
        "Client Files",
        "Client Organisations"
      ]
    },
    {
      "name": "Organisations",
      "tags": [
        "Organisations",
        "Organisation Clients",
        "Organisation Assignees"
      ]
    },
    {
      "name": "Records & Steps",
      "tags": [
        "Records",
        "Record Assignees",
        "Steps",
        "Organisation Records",
        "Organisation Record Assignees"
      ]
    },
    {
      "name": "Cases & Reviews",
      "tags": [
        "Cases",
        "Case Items",
        "Case Assignees"
      ]
    },
    {
      "name": "Documents & Templates",
      "tags": [
        "Documents",
        "Templates",
        "Attachments"
      ]
    },
    {
      "name": "Other",
      "tags": [
        "Files",
        "Forms",
        "Webhooks",
        "Aggregates",
        "Service Status",
        "Other Resources"
      ]
    }
  ]
}
