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
  2. API Reference

Products

PreviousMarket ZonesNextResources

Last updated 7 months ago

Was this helpful?

Get flexibility orders

get

Required permissions: Order.Organization.ReadRequired features: Grid

Authorizations
Query parameters
organizationIdinteger · int32Required

The identifier of the organization.

marketZoneIdinteger · int32Required

The identifier of the market zone.

startstring · date-timeRequired

The start date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

endstring · date-timeRequired

The end date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

Responses
200
List of flexibility orders
application/json
400
Input data was invalid
application/json
401
Not authorized
application/json
403
Not allowed
application/json
500
Internal server error
get
GET /api/product/order/flexibility HTTP/1.1
Host: api.switchmarket.se
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": 1,
    "createdBy": 1,
    "createdAt": "2025-06-13T13:58:13.866Z",
    "expiresAt": "2025-06-13T13:58:13.866Z",
    "start": "2025-06-13T13:58:13.866Z",
    "end": "2025-06-13T13:58:13.866Z",
    "unitPrice": 1,
    "minQuantity": 1,
    "maxQuantity": 1,
    "remainingQuantity": 1,
    "productType": 0,
    "organizationId": 1,
    "resourceId": 1,
    "flexibilityOrderGroupId": 1,
    "availabilityTransactionId": 1,
    "flexibilityScheduleId": 1,
    "availabilityScheduleTransactionId": 1,
    "targetOrganizationIds": [
      1
    ]
  }
]

Get flexibility transactions

get

Required permissions: Order.Organization.ReadRequired features: Grid

Authorizations
Query parameters
organizationIdinteger · int32Required

The identifier of the organization.

marketZoneIdinteger · int32Required

The identifier of the market zone.

startstring · date-timeRequired

The start date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

endstring · date-timeRequired

The end date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

Responses
200
List of flexibility transactions
application/json
400
Input data was invalid
application/json
401
Not authorized
application/json
403
Not allowed
application/json
500
Internal server error
get
GET /api/product/transaction/flexibility HTTP/1.1
Host: api.switchmarket.se
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "flexibilityTransactions": [
    {
      "id": 1,
      "transactionCorrelationId": "123e4567-e89b-12d3-a456-426614174000",
      "availabilityTransactionId": 1,
      "flexibilityScheduleId": 1,
      "availabilityScheduleTransactionId": 1,
      "createdBy": 1,
      "createdAt": "2025-06-13T13:58:13.866Z",
      "organizationId": 1,
      "quantity": 1,
      "marketId": 1,
      "flexibilityOrderId": 1,
      "start": "2025-06-13T13:58:13.866Z",
      "end": "2025-06-13T13:58:13.866Z",
      "resourceId": 1,
      "unitPrice": 1,
      "counterpartOrganizationId": 1,
      "counterpartCreatedBy": 1,
      "productType": 0,
      "deliveryValidationStatus": 0,
      "validatedAt": "2025-06-13T13:58:13.866Z",
      "deliveryPercentage": 1,
      "deliveredQuantity": 1,
      "referenceAdjustmentQuantity": 1,
      "referenceReadingValue": 1,
      "validationReadingValue": 1,
      "remunerationPercentage": 1
    }
  ],
  "otherFlexibilityTransactionsWithImpact": [
    {
      "id": 1,
      "transactionCorrelationId": "123e4567-e89b-12d3-a456-426614174000",
      "availabilityTransactionId": 1,
      "flexibilityScheduleId": 1,
      "availabilityScheduleTransactionId": 1,
      "createdBy": 1,
      "createdAt": "2025-06-13T13:58:13.866Z",
      "organizationId": 1,
      "quantity": 1,
      "marketId": 1,
      "flexibilityOrderId": 1,
      "start": "2025-06-13T13:58:13.866Z",
      "end": "2025-06-13T13:58:13.866Z",
      "resourceId": 1,
      "unitPrice": 1,
      "counterpartOrganizationId": 1,
      "counterpartCreatedBy": 1,
      "productType": 0,
      "deliveryValidationStatus": 0,
      "validatedAt": "2025-06-13T13:58:13.866Z",
      "deliveryPercentage": 1,
      "deliveredQuantity": 1,
      "referenceAdjustmentQuantity": 1,
      "referenceReadingValue": 1,
      "validationReadingValue": 1,
      "remunerationPercentage": 1
    }
  ]
}

Get flexibility transactions affecting substation

get

Required permissions: Order.Organization.ReadRequired features: DecisionSupport

Authorizations
Path parameters
substationIdinteger · int32Required

The identifier of the substation.

Query parameters
organizationIdinteger · int32Required

The identifier of the organization.

startstring · date-timeRequired

The start date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

endstring · date-timeRequired

The end date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

Responses
200
List of flexibility transactions affecting the substation
application/json
400
Input data was invalid
application/json
401
Not authorized
application/json
403
Not allowed
application/json
500
Internal server error
get
GET /api/product/transaction/flexibility/affecting/substation/{substationId} HTTP/1.1
Host: api.switchmarket.se
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "flexibilityTransactionId": 1,
    "start": "2025-06-13T13:58:13.866Z",
    "end": "2025-06-13T13:58:13.866Z",
    "quantity": 1,
    "quantityAfterImpact": 1,
    "impact": 1,
    "deliveryValidationStatus": 0,
    "deliveryPercentage": 1,
    "deliveredQuantity": 1,
    "referenceAdjustmentQuantity": 1,
    "referenceReadingValue": 1,
    "validationReadingValue": 1
  }
]

Get availability transactions

get

Required permissions: Order.Organization.ReadRequired features: Grid

Authorizations
Query parameters
organizationIdinteger · int32Required

The identifier of the organization.

marketZoneIdinteger · int32Required

The identifier of the market zone.

startstring · date-timeRequired

The start date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

endstring · date-timeRequired

The end date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

Responses
200
List of availability transactions
application/json
400
Input data was invalid
application/json
401
Not authorized
application/json
403
Not allowed
application/json
500
Internal server error
get
GET /api/product/transaction/availability HTTP/1.1
Host: api.switchmarket.se
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": 1,
    "createdAt": "2025-06-13T13:58:13.866Z",
    "createdBy": 1,
    "organizationId": 1,
    "resourceId": 1,
    "activationPrice": 1,
    "availabilityPrice": 1,
    "quantity": 1,
    "impactValue": 1,
    "availabilityOrderId": 1,
    "marketId": 1,
    "substationId": 1,
    "counterpartOrganizationId": 1,
    "counterpartCreatedBy": 1,
    "start": "2025-06-13T13:58:13.866Z",
    "end": "2025-06-13T13:58:13.866Z",
    "productType": 0,
    "deliveryValidationStatus": 0,
    "validatedAt": "2025-06-13T13:58:13.866Z",
    "deliveryPercentage": 1,
    "deliveredQuantity": 1,
    "expectedDeliveredQuantity": 1,
    "remunerationPercentage": 1
  }
]

Get availability offers

get

Required permissions: Order.Organization.ReadRequired features: ResourceManagement

Authorizations
Path parameters
resourceIdinteger · int32Required

The identifier of the resource.

Query parameters
organizationIdinteger · int32Required

The identifier of the organization.

startstring · date-timeRequired

The start date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

endstring · date-timeRequired

The end date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

Responses
200
List of availability offers
application/json
400
Input data was invalid
application/json
401
Not authorized
application/json
403
Not allowed
application/json
500
Internal server error
get
GET /api/product/offer/availability/resource/{resourceId} HTTP/1.1
Host: api.switchmarket.se
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "createdBy": 1,
    "createdAt": "2025-06-13T13:58:13.866Z",
    "expiresAt": "2025-06-13T13:58:13.866Z",
    "impactValue": 1,
    "activationPrice": 1,
    "maxQuantity": 1,
    "minQuantity": 1,
    "organizationId": 1,
    "resourceId": 1,
    "availabilityOrderId": 1,
    "availabilityTransactionId": 1,
    "clearingStatus": 0
  }
]

Delete availability offers

delete

Required permissions: Order.Organization.ReadWriteRequired features: ResourceManagement

Authorizations
Path parameters
resourceIdinteger · int32Required

The identifier of the resource.

Query parameters
organizationIdinteger · int32Required

The identifier of the organization.

availabilityOrderIdinteger · int64[]Required

The identifiers of the availability orders

Responses
204
The availability offers were deleted
400
Input data was invalid
application/json
401
Not authorized
application/json
403
Not allowed
application/json
500
Internal server error
delete
DELETE /api/product/offer/availability/resource/{resourceId} HTTP/1.1
Host: api.switchmarket.se
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Get settlement specification

get

Required permissions: Order.Organization.ReadRequired features: Settlements

Authorizations
Query parameters
organizationIdinteger · int32Required

The identifier of the organization.

startstring · date-timeRequired

The start date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

endstring · date-timeRequired

The end date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

Responses
200
The settlement specification
application/json
400
Input data was invalid
application/json
401
Not authorized
application/json
403
Not allowed
application/json
500
Internal server error
get
GET /api/product/settlement/specification HTTP/1.1
Host: api.switchmarket.se
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "organizationId": 1,
  "counterParts": [
    {
      "organizationId": 1,
      "flexibilitySoldSummary": {
        "totalRemunerationSum": 1,
        "transactions": [
          {
            "flexibilityTransactionId": 1,
            "resourceId": 1,
            "deliveryPercentage": 1,
            "remunerationPercentage": 1,
            "unitPrice": 1,
            "totalRemuneration": 1,
            "totalQuantity": 1,
            "productType": 0,
            "deliveryValidationStatus": 0
          }
        ]
      },
      "flexibilityBoughtSummary": {
        "totalRemunerationSum": 1,
        "transactions": [
          {
            "flexibilityTransactionId": 1,
            "resourceId": 1,
            "deliveryPercentage": 1,
            "remunerationPercentage": 1,
            "unitPrice": 1,
            "totalRemuneration": 1,
            "totalQuantity": 1,
            "productType": 0,
            "deliveryValidationStatus": 0
          }
        ]
      },
      "availabilitySoldSummary": {
        "totalRemunerationSum": 1,
        "transactions": [
          {
            "availabilityTransactionId": 1,
            "resourceId": 1,
            "substationId": 1,
            "deliveryPercentage": 1,
            "remunerationPercentage": 1,
            "availabilityPrice": 1,
            "totalRemuneration": 1,
            "totalQuantity": 1,
            "productType": 0,
            "deliveryValidationStatus": 0
          }
        ]
      },
      "availabilityBoughtSummary": {
        "totalRemunerationSum": 1,
        "transactions": [
          {
            "availabilityTransactionId": 1,
            "resourceId": 1,
            "substationId": 1,
            "deliveryPercentage": 1,
            "remunerationPercentage": 1,
            "availabilityPrice": 1,
            "totalRemuneration": 1,
            "totalQuantity": 1,
            "productType": 0,
            "deliveryValidationStatus": 0
          }
        ]
      }
    }
  ],
  "remunerationPerResource": [
    {
      "resourceId": 1,
      "bought": {
        "totalAvailabilityRemunerationSum": 1,
        "totalFlexibilityRemunerationSum": 1
      },
      "sold": {
        "totalAvailabilityRemunerationSum": 1,
        "totalFlexibilityRemunerationSum": 1
      }
    }
  ]
}

Get resource availability orders

get

Required permissions: Order.Organization.ReadRequired features: ResourceManagement

Authorizations
Path parameters
resourceIdinteger · int32Required

The identifier of the resource.

Query parameters
organizationIdinteger · int32Required

The identifier of the organization.

startstring · date-timeRequired

The start date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

endstring · date-timeRequired

The end date and time represented using ISO 8601 format and is always in UTC time, e.g. midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'.

Responses
200
List of availability orders
application/json
400
Input data was invalid
application/json
401
Not authorized
application/json
403
Not allowed
application/json
500
Internal server error
get
GET /api/product/order/availability/resource/{resourceId} HTTP/1.1
Host: api.switchmarket.se
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": 1,
    "createdAt": "2025-06-13T13:58:13.866Z",
    "expiresAt": "2025-06-13T13:58:13.866Z",
    "flexibilityOrdersExpireAt": "2025-06-13T13:58:13.866Z",
    "start": "2025-06-13T13:58:13.866Z",
    "end": "2025-06-13T13:58:13.866Z",
    "productType": 0,
    "clearingStatus": 0,
    "marketId": 1,
    "organizationId": 1,
    "substationId": 1,
    "resourceId": 1,
    "quantity": 1,
    "availabilityPrice": 1,
    "impact": 1
  }
]
  • GETGet flexibility orders
  • GETGet flexibility transactions
  • GETGet flexibility transactions affecting substation
  • GETGet availability transactions
  • GETGet availability offers
  • POSTCreate availability offers
  • PUTUpdate availability offers
  • DELETEDelete availability offers
  • GETGet settlement specification
  • GETGet resource availability orders

Create availability offers

post

Required permissions: Order.Organization.ReadWriteRequired features: ResourceManagement

Authorizations
Path parameters
resourceIdinteger · int32Required

The identifier of the resource.

Body
all ofOptional
Responses
200
List of availability offers
application/json
400
Input data was invalid
application/json
401
Not authorized
application/json
403
Not allowed
application/json
500
Internal server error
post
POST /api/product/offer/availability/resource/{resourceId} HTTP/1.1
Host: api.switchmarket.se
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 109

{
  "organizationId": 1,
  "offers": [
    {
      "availabilityOrderId": 1,
      "activationPrice": 1,
      "maxQuantity": 1,
      "minQuantity": 1
    }
  ]
}
[
  {
    "createdBy": 1,
    "createdAt": "2025-06-13T13:58:13.866Z",
    "expiresAt": "2025-06-13T13:58:13.866Z",
    "impactValue": 1,
    "activationPrice": 1,
    "maxQuantity": 1,
    "minQuantity": 1,
    "organizationId": 1,
    "resourceId": 1,
    "availabilityOrderId": 1,
    "availabilityTransactionId": 1,
    "clearingStatus": 0
  }
]

Update availability offers

put

Required permissions: Order.Organization.ReadWriteRequired features: ResourceManagement

Authorizations
Path parameters
resourceIdinteger · int32Required

The identifier of the resource.

Body
all ofOptional
Responses
200
List of availability offers
application/json
400
Input data was invalid
application/json
401
Not authorized
application/json
403
Not allowed
application/json
500
Internal server error
put
PUT /api/product/offer/availability/resource/{resourceId} HTTP/1.1
Host: api.switchmarket.se
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 109

{
  "organizationId": 1,
  "offers": [
    {
      "availabilityOrderId": 1,
      "activationPrice": 1,
      "maxQuantity": 1,
      "minQuantity": 1
    }
  ]
}
[
  {
    "createdBy": 1,
    "createdAt": "2025-06-13T13:58:13.866Z",
    "expiresAt": "2025-06-13T13:58:13.866Z",
    "impactValue": 1,
    "activationPrice": 1,
    "maxQuantity": 1,
    "minQuantity": 1,
    "organizationId": 1,
    "resourceId": 1,
    "availabilityOrderId": 1,
    "availabilityTransactionId": 1,
    "clearingStatus": 0
  }
]