Status and Error Codes

When working with the Chargetrip API, your keys can be visible to anyone who makes an effort to look for it. That is why we recommend adding a layer of restrictions to build secure applications and prevent unauthorized use.

API Response Codes

Our API uses the following response status codes, as defined in the RFC 2616 and RFC 6568.

200The request succeeded. The client can read the body.
201The request is created. A new resource will be created.
202The request is accepted. The client has to wait until it’s done processing.
204The request has succeeded but returns no message body.
304Not modified.
400The request could not be understood by the server due to malformed syntax.
401The request requires authentication.
403The server understood the request, but is refusing to fulfill it.
404The requested resource could not be found.

API Error Objects

When an error occurs, our API returns a generic GraphQL error with an extension. Inside the extension object you can find an error description.

Authorization / Headers

  • 01
  • 02
  • 03
  • 04
  • 05
  • 06
  • 07
  • 08
  • 09
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
          { "errors": [  {   "message": "The car was not found in the database",   "locations": [   {   "line": 2,   "column": 3   }   ],   "path": [   "addReview"   ],   "extensions": {   "exception": {   "response": "CAR_NOT_FOUND",   "status": 500,   "message": "No car was found with the provided ID",   "code": "CAR_NOT_FOUND"   }   }  } ], "data": null}