Skip to main content

HTTP Status Codes

The API follows these rules for HTTP requests:

  • If you are creating new objects, use a POST.
  • If you are updating an existing object, use a PUT.
  • If you are trying to get a particular object by id, use a GET.
  • If you are trying to get a list of objects, or query for a list of objects, use a GET.
  • If you are calling an action (e.g. pay an invoice, reset a password, etc.), use a POST.

The API follows these rules for HTTP response codes:

  • If you successfully create an object, you'll get back a 201 Created HTTP response. You'll also get back a Location: header with the URL of the new object.
  • If you successfully update an object, you'll get back a 202 Accepted HTTP response. You'll also get back a Location: header with the URL of the new object.
  • If you successfully get a specific object, you'll get back a 200 OK HTTP response.
  • If you try to get a specific object that doesn't exist, you'll get back a 404 Not Found HTTP response.
  • If you query for objects, you'll get back a 200 OK HTTP response.
  • If you successfully call an action, you'll get back a 200 OK HTTP response.
  • If you do something wrong (e.g. send an invalid JSON request, hit an invalid endpoint, etc.) you will get back a 400 Bad Request HTTP response.
  • If your authentication parameters are incorrect, you will get back a 401 Unauthorized HTTP response.
  • If you exceed the REST API rate limits, you will get back a 429 Too Many Requests HTTP response.
  • If something goes wrong with ChargeOver itself, you will get back a 500 Internal Server Error HTTP response.