Switch Developer Documentation
  • Welcome
  • ⚠️Migration to Auth0
    • Overview
    • Status
    • Switch API
      • Client Credentials Flow
      • Organization Client
      • Token Endpoint
    • OpenADR 3 VTN API
      • VTN Credentials
      • Token Endpoint
  • Getting Started
    • Concepts
    • Guides
      • How to send readings
      • Market operations
      • Conditional agreements
    • Support
  • Switch API
    • Overview
    • Terms of Use
    • Authentication
      • Client Credentials Flow
      • Organization Client
      • Token Endpoint
    • Rate Limiting
    • Errors
    • API Reference
      • Market Zones
      • Products
      • Resources
      • Meters
      • Readings
  • OpenADR 3
    • Overview
    • Authentication
      • VTN Credentials
      • Token Endpoint
    • API Reference
      • Programs
      • Events
      • Reports
      • Subscriptions
      • Vens
    • Webhooks
      • Callback URL verification
      • Domain and IP addresses
      • Best practices
    • Payloads
    • Code samples
  • Libraries
    • .NET SDK
      • SDK Reference
        • IAuthService.Auth
        • IProgramsService.Programs
        • IEventsService.Events
        • IReportsService.Reports
        • ISubscriptionsService.Subscriptions
        • IVensService.Vens
Powered by GitBook
On this page

Was this helpful?

  1. Switch API

Errors

Switch API uses conventional HTTP response codes to indicate the success or failure of an API request.

As a general rule:

  • Codes in the 2xx range indicate success.

  • Codes in the 4xx range indicate incorrect or incomplete parameters (e.g. a required parameter is missing, or an operation failed with a 3rd party, etc.).

  • Codes in the 5xx range indicate an error with Switch API servers.

Switch API returns an error message and a custom error code (not related to the HTTP status code) formatted in JSON:

{
    "errors": [
        {
            "message": "Unauthorized",
            "code": 3
        }
    ]
}
PreviousRate LimitingNextAPI Reference

Last updated 9 months ago

Was this helpful?