{"openapi":"3.0.0","info":{"title":"Fourthline APIs","version":"2","description":"About the API.\n\nUsing API v2? Go to the [API v2 documentation](https://docs.fourthline.com/reference/migrate-to-the-new-apis) instead.\n\nWelcome to Fourthline's API documentation.\n\nOur APIs are organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer). They have resource-oriented URLs and accept and return [JSON-encoded](http://www.json.org/) responses.\n\nThey use:\n\n* Standard HTTP methods, for example **GET**, **PATCH**, **POST**, and **PUT**\n* HTTP response codes\n* Access token authentication\n\nAll API requests must be made over **HTTPS**. Requests made over plain HTTP will fail.\n\nAll requests return an immediate response while processing continues asynchronously in our system.\n\n### Authentication\n\nFourthline API uses [bearer token authentication](https://tools.ietf.org/html/rfc6750). Every request must include an access token in the `Authorization` header.\n\nTo obtain an access token, use your Fourthline API key to call [Create access token](ref:create-access-token).\n\n### Environments\n\n#### Sandbox\n\nYou can use the Sandbox environment for integration and manual testing. The Sandbox environment closely mirrors Production, but it is not intended for performance or automated load testing.\n\n```text Sandbox URL\nhttps://api.ext-sandbox.fourthline.com\n```\n\n#### Production\n\nWhen you go live with your integration, address the Production environment.\n\n```text Production URL\nhttps://api.fourthline.com\n```\n\n<div class=\"call-out call-out__caution\">\n  <div class=\"call-out--icon\">\n    <img src=\"https://files.readme.io/310d4d3-Inline_Caution.svg\" />\n  </div>\n\n  <div>\n    <div class=\"call-out--title\">Caution</div>\n    <div class=\"call-out--text\">You <strong>cannot</strong> test in the Production environment.</div>\n  </div>\n</div>\n\n### Response codes\n\nThe API uses standard HTTP response codes to indicate request success or failure. In general, codes in the:\n\n* **2XX** codes indicate success\n* **4XX** codes indicate an error for the reason provided, for example a required parameter was omitted\n* **5XX** codes indicate a rare Fourthline server error\n\nNot all errors map cleanly onto HTTP response codes. If a valid request fails, for example because the country code is not supported, we return a 422 error.\n\n| Response code | Description |\n| :----------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| 200 OK | The request was successful. |\n| 201 Created | The request was successful. |\n| 202 Accepted | The request was accepted for processing, but processing has not completed yet. |\n| 204 No content | The request was successful, but the response returns no body. |\n| 400 Bad request | The request was invalid, usually because a required parameter wasn't set. |\n| 401 Unauthorized | Your access token is invalid. |\n| 403 Forbidden | The request is valid, but our server refuses to respond to it. <br />Unlike a 401 unauthorized response, re-authenticating will not resolve this error. |\n| 404 Not found | The resource you requested does not exist. <br />Troubleshooting: <br />• Check your credentials and contact your Fourthline delivery manager. <br />• Check your request headers. |\n| 405 Method not allowed | The HTTP method you used is not allowed for the resource, for example a `POST` request to a read-only resource. |\n| 409 Conflict | We couldn't process the request because there's a conflict in the current state of the resource, for example an editing conflict between multiple, simultaneous updates. |\n| 422 Unprocessable entity | One or more parameters are syntactically valid but contain invalid values. <br />Troubleshooting: Check your `providerProcessId`. |\n| 429 Too many requests | You have sent too many requests in too short a space of time. |\n| 5XX Server error | Something went wrong on our side. |\n\n### Testing\n\nWe provide a [cURL](https://curl.haxx.se) example for each request. You can set the required and optional parameters as relevant, and then test the request from the command line.\n\n### OpenAPI specification\n\nTo view the API v1 specifications:\n\n1. Go to [OpenAPI](https://docs.fourthline.com/v1.0/openapi).\n2. Click **fourthline-api-v1.yaml** or **fourthline-webhooks-v1.yaml**.\n\nTo view the Identity Verification API v2, AML API, QES API, and Webhooks specifications:\n\n1. Go to [OpenAPI](https://docs.fourthline.com/v2.0/openapi).\n2. Click the specification for that product.\n\n<div class=\"call-out call-out__next-steps\">\n  <div class=\"call-out--icon\">\n    <img src=\"https://files.readme.io/3610b84-Support_callout.svg\" />\n  </div>\n\n  <div>\n    <div class=\"call-out--title\">Support</div>\n    <div class=\"call-out--text\">For help getting started, contact your Fourthline delivery manager.</div>\n  </div>\n</div>\n"},"servers":[{"url":"https://api.ext-sandbox.fourthline.com","description":"Main API host. The JSON workflow report is served at **`/v2/workflows/{workflowId}/report/json`** on this host.\n"}],"tags":[{"name":"Authentication","description":"OAuth2 access tokens for the Identity Verification API v2, the AML API, and the QES API."}],"components":{"parameters":{"cacheControl":{"name":"Cache-Control","in":"header","required":false,"description":"To have the response validated by the origin server instead of reusing stored content, we strongly recommend including this parameter and setting it to `no-cache`.","schema":{"type":"string","default":"no-cache"}}}},"paths":{"/v1/oauth2/token":{"post":{"summary":"Create access token","description":"Use this endpoint to create an access token valid for **1 hour** to authenticate requests to our API.","operationId":"create-access-token","tags":["Authentication"],"parameters":[{"$ref":"#/components/parameters/cacheControl"},{"name":"Content-Type","in":"header","required":true,"description":"Set to either: <br />\n• `application/x-www-form-urlencoded` **or** <br />\n• `application/json`\n","schema":{"type":"string","enum":["application/x-www-form-urlencoded","application/json"],"example":"application/json"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["grant_type","client_id","client_secret"],"properties":{"grant_type":{"type":"string","description":"Set to `client_credentials`.","default":"client_credentials"},"client_id":{"type":"string","description":"Your unique identifier from your Fourthline [API credentials](https://docs.fourthline.com/docs/api-credentials)."},"client_secret":{"type":"string","description":"Your unique password from your Fourthline API credentials."}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["grant_type","client_id","client_secret"],"properties":{"grant_type":{"type":"string","description":"Set to `client_credentials`.","default":"client_credentials"},"client_id":{"type":"string","description":"Your unique identifier from your Fourthline [API credentials](https://docs.fourthline.com/docs/api-credentials)."},"client_secret":{"type":"string","description":"Your unique password from your Fourthline API credentials."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"examples":{"ok":{"summary":"OK","value":{"token_type":"bearer","access_token":"790f325a-48c9-4b82-bb53-c0ea128236f0","expires_in":3600}}},"schema":{"type":"object","properties":{"token_type":{"type":"string","description":"Token type (`bearer`)."},"access_token":{"type":"string","description":"Access token for API authentication."},"expires_in":{"type":"integer","description":"Expiration time in seconds."}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"examples":{"bad_request":{"summary":"Bad Request","value":{"error":"invalid_client","error_description":"Invalid client authentication."}}},"schema":{"type":"object","properties":{"error":{"type":"string","description":"A machine-readable code that identifies the type of error. <br /><br />Example: `invalid_token`"},"error_description":{"type":"string","description":"A human-readable message that explains the error in more detail. <br /><br />Example: `The access token is invalid or has expired`"}}}}}}}}}},"x-readme":{"headers":[],"explorer-enabled":false,"proxy-enabled":true,"samples-enabled":true},"x-readme-fauxas":true}