Home AssignmentsFind freelance work InvoicingHow invoicing works PayoutsManage contractors SupportSupport and help
Country
Language
Create a free account

API/Error messages

Get started

Error messages

The EasyFreelance API uses HTTP status codes to indicate whether a request succeeded. The status code is the primary contract – the wording of the messages may change.

Contents
  • Codes in The 2XX series means the request was processed without errors.
  • Codes in The 4XX series means the request failed based on the information submitted.
  • Codes in The 5XX series means an error on EasyFreelance's servers.

For 4XX responses, the response also contains information in response body that describes the cause of the error.

Status codes

CodeNameMeaning
200OKThe request was processed.
201CreatedThe resource was created – for example payouts, a login link or a verification session.
400Bad RequestClient error or validation error. See the formats below.
401UnauthorizedMissing, invalid or expired token / API key.
403ForbiddenThe resource exists, but belongs to another partner.
404Not FoundThe resource does not exist, or is not linked to your partner account.
422Unprocessable EntityValidation rejected by the framework – for example a return URL that is not approved.
429Too Many RequestsThe rate limit of 500 calls per minute has been exceeded.
5XXServer ErrorAn error on our side. Try again, and get in touch if it persists.

Three formats

Which format you get depends on where in the stack the error occurs. Build your client on the status code first, and read the fields below as additional information.

1. Partner format: error

Most partner endpoints return an object with the key error. The value is either a string or a structured list.

404 Not Found
{
  "error": "User not found"
}

2. Validation error: error + data

Validation errors that occur on otherwise valid requests are structured slightly differently. These are returned with status code 400, and the response contains the field names as keys in data-object.

400 Bad Request
{
  "error": "Validation error",
  "data": {
    "email": [
      "The email has already been taken."
    ]
  }
}

3. Framework format: message + errors

Some operations go through the framework's own validator and respond with 422 with message and errors.

422 Unprocessable Entity
{
  "message": "The given data was invalid.",
  "errors": {
    "partner_return_url": [
      "The partner return url has already been registered."
    ]
  }
}

429 and Retry-After

The rate limit is shared by the entire partner account: 500 requests per minute across all /api/v1-routes. If you exceed it, you get 429, and the response may include the header Retry-After with the number of seconds until the window resets.

Note

Polling the verification status is the most common source of 429 among partners. Poll every 2–5 seconds, stop when the status is terminal, and consider employee.verified-webhook instead of frequent polling.

400 from idempotency keys

If you send the header Idempotency-key, the value must be a valid UUID – otherwise the API responds 400. If the key is already stored for your partner, the API also responds 400. See Idempotency.