API Response Codes

The Hevo API returns a standard HTTP response code with every response. The code tells you whether Hevo accepted your request, and whether the task you asked for is complete. If the request failed, the code also tells you whether you need to change the request before you send it again.

Refer to the following sections to understand the response codes returned by the API:

Success Codes

Hevo returns one of the following codes when it accepts your request:

CodeMeaningReturned for
200The request is complete, and the response contains the data you requested, or the resource that you created or modified.
  • Requests that read data, such as listing your Pipelines or retrieving a single Pipeline.
  • Requests that create a Pipeline or a Destination.
  • Requests that modify a Destination.
202The request is accepted, and Hevo has started the task. The task is not complete when you receive this response.
  • Requests that start a task, such as enabling, disabling, deleting, or resyncing a Pipeline.
  • Requests that modify a Pipeline or its Source.
  • Requests that change the objects selected in a Pipeline, or that cancel a Pipeline job.
  • Requests sent to the Delete a Destination endpoint.

Understanding the 202 Response Code

Some requests start a task that continues to run after Hevo sends its response. For example, when you enable a Pipeline, Hevo accepts your request, starts enabling the Pipeline, and responds immediately. The Pipeline is not enabled at the time you receive the response.

A request sent to the Enable a Pipeline endpoint returns the following:

  • A 202 response code. This confirms that Hevo has accepted your request and started enabling the Pipeline.
  • The Pipeline with its state field set to Enabling. This is the state of the Pipeline immediately after Hevo accepts your request, not the state it reaches after the task is complete.

To know when the task is complete, send a request to the Get Details of a Pipeline endpoint at regular intervals and check the state field. The task is complete when the field displays a final state, such as Initialized for a Pipeline that is replicating data. Read Understanding Pipeline States for more information about the Pipeline states and how to check them.

Client Error Codes

Hevo returns one of the following codes when it cannot process your request. In each case except a 401, the code field in the response identifies the type of failure, and the message field describes the reason for it. Read API Response Body for more information about the fields returned in an error response.

CodeMeaningWhat to do
400The request could not be processed as sent.Read the message field in the response, correct the request, and send it again.
401The API credentials are missing or not valid.Check the Access Key and the Secret Key in your request, and check that you send the request to the base URL of your region. Read Generating your API Credentials for the steps to generate them.
403Your role does not allow this action.Ask your team administrator for a role that allows it. Correcting the request does not help. Creating a Pipeline that also creates its Destination needs the permission to create a Destination as well.
404The resource does not exist, or you do not have access to it.Check the identifier in the request. A resource that you cannot access returns the same response code as one that does not exist.
409Another operation is already running on the resource, or the request needs a confirmation.If an operation is in progress, wait for it to finish and send the request again. If the message asks for a confirmation, send the request again with confirm_override set to true.
429The Source provider rejected the request because too many were sent.Wait, and then send the same request again.

A 429, and a 409 caused by an operation in progress, are the client errors that you can send again without changing your request. For the other codes, correct the request first, because sending the same request again returns the same response. Read Handling Errors for the error codes that Hevo returns in the response body, and the action to take for each one.

Server Error Codes

A response code in the 5xx range indicates that Hevo accepted your request but could not complete it. A connection test that is still running after five minutes is also returned as a 500. Send the request again after a short interval, and increase the interval with each attempt. If the requests continue to fail, contact Hevo Support and quote the error_reference_id value from the response.

A request that creates a Pipeline can create its Destination at the same time. If the request then fails, Hevo keeps the Destination that it has already saved, and the name of the Destination is now in use. Before you send the request again, list your Destinations and Pipelines to see what already exists.