Lean responds with 4XX errors when there is some error in the request while 500 indicates that something is wrong on our side. Please review the documentation on the specific API you want to use to see the structure of a 4XX or 500 error response.
All responses will provide a
status that can be used to determine what to do using the following table.
|The mTLS certificate used for the API call is a valid certificate issued by Lean but does not match the certificate that is assigned to the application token you have provided in the header.
|A Lean customer object already exists for the app_user_id you have provided.
|You are making a call to a service that you do not have the correct access permission levels for.
|You are making a call to the production endpoint whereas your application only has access to the sandbox environment. Make the same API call with sandbox.leantech.me/foo instead of api.leantech.me/foo.
|This one's on us. Something has gone wrong in our system and you should let us know.
|The provided certificate is not valid.
|The HTTP method used for the API call is incorrect but the URL is correct. You've likely used a GET instead of a POST or vice versa.
|One or more parameters specified in the request body were invalid. This could be an unrecognized or misspelled key or an ill formatted value. We are always trying to be more specific with which parameter was invalid so you should contact us and tell us when you see this error so we can make a specific INVALID_[PARAMETERNAME] error for it.
|The URL specified for this request is invalid. Double check the spelling and whether you used the plural or singular of a noun.
|A parameter required for this request was not specified.
|Too many of the exact same request hit our API too quickly. We recommend an exponential backoff when retrying requests.
|The account you specified in the request body cannot be found for the entity you specified. Use the Get Accounts endpoint to ensure that the account_id specified in the request matches one of the accounts for the entity.
app_token specified in the header of the request is not recognized. You can check your app token in the Authentication page of your application dashboard.
|The app_user you are trying to retrieve the customer object for cannot be found in our system. Ensure that the app_user_id provided as a query parameter is formatted correctly.
|The customer specified in your request does not exist.
|The entity specified in your request does not exist or, when applicable does not belong to the customer also specified in the query parameter.
|The results_id specified in your query parameters does not exist.
|Your customer has not granted you permission to access the data you are requesting. You define the permissions asked for in the Link() flow in the SDK and you can query which permissions you asked for by using the Get Entity request.