Swish Developer Docs
Go to websiteInstall now
  • Swish API
    • Overview
    • Authentication
    • Rate limits
    • Pagination
    • Errors
    • API Reference
      • Items
      • Lists
      • Profiles
  • Libraries
    • API Client
    • Browser
    • Node.js
    • React
Powered by GitBook
On this page
  1. Swish API

Errors

PreviousPaginationNextAPI Reference

Last updated 3 months ago

Swish uses conventional to indicate the success or failure of an API request. As a general rule:

  • Status codes in the 2xx range indicate success.

  • Status codes in the 4xx range indicate incorrect or incomplete parameters (e.g. a required parameter was omitted).

  • Status codes in the 5xx range indicate an error with Swish's servers.

Swish also outputs an error response formatted in JSON:

{
  "error": {
    "message": "Item with ID 123 not found.",​
    "error": "Not Found",
    "statusCode": 404,​
    "requestId": "123e4567-e89b-12d3-a456-426614174000"
  }
}

HTTP response status codes