Frequently Asked Errors

Below are the errors you may receive when making calls to PlanSource's API. Within the errors themselves, you may find messages/descriptions giving an explanation to what could have gone wrong, but not all errors are that clear. If the descriptions below do not answer your questions, you can reach out to your PlanSource representative that is assisting with your API testing, or you can email [email protected].

Expired Token

Expired token errors occur when the system tries to generate a token but times out. To troubleshoot this, retry to generate the token.

{
    "error": "invalid_request",
    "error_description": "token has expired"
}

400

400 error codes usually have to do with the body parameters that are being passed. If you try to pass the wrong value, leave out required fields, mess up the syntax, and/or more, you will likely get the 400 error. Check your body parameters, and make sure you are passing the correct data properly.

{
  "status": "failure",
  "errors": {
    "http_status": 400,
    "message": "A user_name or first_name and last_name is required.",
    "details": null,
    "error_code": 400
  },
  "data": []
}
{
  "status": "failure",
  "errors": {
    "http_status": 400,
    "message": "Organization(s) with code(s) 652 not found.",
    "details": null,
    "error_code": 400
  },
  "data": []
}

401

401 error codes mean the connection to PlanSource has expired due to an outdated access token. To fix this issue, try to generate another access token using the Oauth2 HTTP POST url (https://partner-dev-api.plansource.com/oauth/v2/token). These tokens only last a few minutes, so it is important to regularly generate them to remain connected.

{
  "status": "failure",
  "errors": {
    "http_status": 401,
    "message": "Signature has expired",
    "details": null,
    "error_code": "invalid_token"
  },
  "data": []
}

403

403 error codes usually occur if the access token is missing/left out of the header parameters. Make sure the parameters are correctly populated, and that the authorization header parameter includes the access token.

{
  "status": "failure",
  "errors": {
    "http_status": 403,
    "message": "Forbidden",
    "details": null,
    "error_code": null
  },
  "data": []
}

404

404 error codes normally have to do with incorrect path and/or query parameters. If the path for the API call isn't correctly written or values are left out, a 404 error will appear stating the route was not found or the elements were invalid, respectively. A quick fix for this is to check the path for the call, and to make sure that it is properly written with all values populated.

{
  "status": "failure",
  "errors": {
    "http_status": 404,
    "message": "Requested route 'ubscriber' not found",
    "details": null,
    "error_code": "route_not_found"
  }
}
{
  "status": "failure",
  "errors": {
    "http_status": 404,
    "message": "Employee not found",
    "details": null,
    "error_code": 404
  }
}
{
  "status": "failure",
  "errors": {
    "http_status": 404,
    "message": "Invalid coverage",
    "details": null,
    "error_code": 404
  }
}

422

422 error codes are similar to 400 error codes in that they occur when body parameters being passed are incorrect. The error code appears if a parameter is left out of the body parameter, and the way to fix this is by introducing the parameter back.

{
  "status": "failure",
  "errors": {
    "http_status": 422,
    "message": "Parameter 'form_completions' is required",
    "details": null,
    "error_code": null
  }
}

500

500 error codes mean an internal error occurred. This error is harder to debug because it usually is not on the developers to fix, but instead for PlanSource to investigate. Before reaching out to PlanSource, try debugging by testing other endpoints and making sure the access token is generated and not expired. If all else fails, contact your PlanSource representative that is assisting with your API testing or email [email protected].

{
  "status": "failure",
  "errors": {
    "http_status": 500,
    "message": "Internal error",
    "details": null,
    "error_code": null
  },
  "data": []
}