v1

latestOpenAPI 3.0.12026-07-243686491.1 MB
Subscriptions

Bulk create subscriptions

Subscribe a team to multiple plans in one request. Each plan is processed independently — failures do not abort siblings. Required scope: subscriptions:write </br>Organization authorization: supported

post/api/v1/subscriptions/bulk

Request body

teamIdinteger

Id of the team that should be subscribed to all selected plans

planIdsinteger[] required

Ids of plans the team should be subscribed to. Each plan is processed independently — failures do not abort siblings.

userIdinteger nullable

The user that should be assigned as the purchaser of the subscriptions. If not provided, the subscriptions will be assigned to the default user for this consumer.

nextPurchaseAtstring date-time nullable

Date when the wallet will be charged for the first time (ISO8601). Has to be a date in the future.

Example request

{
  "nextPurchaseAt": "2025-10-22T09:30:03Z"
}

Response

Per-plan create results

planIdinteger

Plan id this result corresponds to

status'created' | 'failed' required
errorstring nullable

Failure reason, present only when status is failed

Example response

[
  {
    "subscription": {
      "id": 1,
      "nextPurchaseAt": "2023-05-12T15:56:45.99Z",
      "cancelledAt": "2023-05-12T15:56:45.99Z",
      "endAt": "2023-05-12T15:56:45.99Z",
      "validityPeriod": {
        "from": "2024-01-01T00:00:00Z",
        "to": "2024-12-31T23:59:59Z"
      },
      "discountPercentage": 7.5,
      "discountAbsolute": 7.5,
      "discountAmount": 7.5,
      "originalAmount": 7.5,
      "totalAmount": 7.5,
      "purchaseCount": 5,
      "chargePoints": 5,
      "customerId": 1,
      "planId": 42,
      "serviceConfig": {
        "payoutPerKwh": 1.29,
        "priceIncludesVat": true,
        "additionalFeeAbsolute": 0.5,
        "roamingAdditionalFeeAbsolute": 0.5
      },
      "createdAt": "2023-05-12T15:56:45.99Z",
      "updatedAt": "2023-05-12T15:56:45.99Z",
      "canCancel": true,
      "note": "Monthly plan for fleet",
      "deletedAt": "2023-05-12T15:56:45.99Z"
    }
  }
]