Using API v2? Go to the API v2 documentation instead.
Welcome to Fourthline's API Reference!
Fourthline API
Our API is organized around REST. It has predictable resource-oriented URLs, accepts and returns JSON-encoded payloads.
It uses:
- Standard HTTP methods, e.g. POST, GET, PUT
- HTTP response codes
- Access token authentication
All API requests must be made over HTTPS. Requests sent over HTTP are rejected.
Most requests return immediately while processing continues asynchronously. Use webhooks or polling endpoints to track workflow progress and retrieve final results.
Authentication
Our API uses bearer token authentication. Every request you make must include an access token in the Authorization header.
To request access tokens, you need your Fourthline API credentials to make Create access token requests.
Environments
Sandbox
You can test our API in the sandbox environment. It closely mirrors production and is intended for integration and manual testing. It is not intended for automated or load testing.
Sandbox URL: https://api.ext-sandbox.fourthline.com
Production
When you go live with your integration, address the production environment.
Production URL: https://api.fourthline.com
Caution
Production environments do not support testing. Use the sandbox environment to test your integration.
Response codes
We use conventional HTTP response codes to indicate the success or failure of an API request.
In general, codes in the:
- 2XX range indicate success
- 4XX range indicate an error for the reason provided, e.g. a required parameter was omitted
- 5XX range indicate a rare Fourthline server error
Not all errors map cleanly onto HTTP response codes. If a valid request fails, e.g. because the country code is not supported, we return a 422 error.
| Response code | Description |
|---|---|
200 OK | The request was successful. |
201 Created | The request was successful. |
202 Accepted | The request has been accepted for processing, but processing isn't finished yet. |
204 No content | The request was successful, but the response returns no body. |
400 Bad request | The request was invalid, usually because a required parameter wasn't set. |
401 Unauthorized | Your access token is invalid. |
403 Forbidden | The request is valid, but our server refuses to respond to it. Unlike a 401 Unauthorized response, you cannot solve this by authenticating. |
404 Not found | The resource you requested doesn't exist. Troubleshooting: check your credentials and contact your Fourthline delivery manager. Check your request headers. |
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). |
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). |
422 Unprocessable entity | At least one parameter is the correct type but invalid. Troubleshooting: check your providerProcessId. |
429 Too many requests | You have sent too many requests in too short a space of time. |
5XX Server error | Something went wrong on our side. |
Testing
We provide a cURL example for each request. You can set the required and optional parameters as relevant, and then test the request from the command line.
To test our API using:
- Postman, see Postman Collections
- Other tools, download our OpenAPI Specification
OpenAPI specification
To view the OpenAPI specification of our API:
- Go to OpenAPI.
- Click fourthline-api-v1.yaml or fourthline-webhooks-v1.yaml.
Support
If you need help getting started, contact your Fourthline delivery manager.