Error Codes
Swift uses industry-best practices to handle errors. You can expect three outcomes when interacting with our APIs. HTTP status code 2XX indicates success, 4XX indicates an error due to information provided by the client application, and 5XX indicates an error with the API provider.
Authentication API Error Codes
Here are the errors you may encounter when calling the Authentication APIs.
| Status Code | Reason Phrase | Error | Recommendations |
|---|---|---|---|
| 400 | Bad Request. | invalid_grant | Refer to Authentication to find out the correct values to use. If you are using developer tools, then check the corresponding documentation to make sure your configuration is correct. |
| 400 | Bad Request. | invalid_request | The request may contain invalid form parameters or missing mandatory parameters. Refer to Authentication to find out the correct values to use. If you are using developer tools, then check the corresponding documentation to make sure your configuration is correct. |
| 400 | Bad Request. | invalid_scope | Make sure your app contains the API product you are trying to access. If you are using a Swift-issued certificate, then make sure the certificate is granted the RBAC roles of the API. If you are using License ID and Secret, then make sure the contract is linked. Refer to API entitlements to find out the correct values to use. |
| 400 | Bad Request. | invalid_client | The refresh token is invalid or expired. The refresh token is valid for 24 hours. You can request the access token again which will return a new refresh token. |
| 401 | UnAuthorized | invalid_client | Refer to Authentication to find out the correct values to use. If you are using developer tools, then check the corresponding documentation to make sure your configuration is correct. |
| 503 | Service Unavailable | invalid_client | There is an issue on the provider side. Try again. |
Swift API Error Codes
Here are the errors you may encounter when calling the Swift APIs.
| Status Code | Reason Phrase | Severity | SwAP Code | Recommendations |
|---|---|---|---|---|
| 400 | Bad Request | Fatal | SwAP5xx | Make sure the API request conforms to the OpenAPI specification. |
| 400 | Unavailable | Fatal | SwAP522 | Make sure the x-bic provided is valid. |
| 401 | UnAuthorized | Fatal | SwAP50X | Make sure the access token provided is valid, and the API resource exists. |
| 403 | Forbidden | Fatal | SwAP503 | Make sure the correct access token is used for the API call. |
| 404 | Not Found | Fatal | SwAP506 | Make sure the resource URL is correctly defined as in the OpenAPI specification. |
| 429 | Too Many Requests | Transient | SwAP507 | Refer to Rate Limit and try again. |
| 503 | Service Unavailable | Transient | SwAP590 | The API response arrived late. Try again, if the error persists, then contact Swift Customer Support. |
| 503 | Temporarily Unavailable | Transient | SwAP599 | Try again. If the error persists, then contact Swift Customer Support. |
| 504 | Gateway Timeout | Transient | SwAP591 | The API provider cannot be reached. Contact Swift Customer Support. |
Previous page Pagination
Next pageAPI Providers