openapi: 3.0.1 info: title: Monta Public API description: >- The Monta Public API lets developers connect to the Monta EV-charging platform to read charge points, start and stop charges (charging sessions), inspect EVSE availability and pricing, and read wallet transactions. Authentication uses OAuth2 client-credentials: exchange a clientId and clientSecret for a short-lived bearer access token (and a longer-lived refresh token) and send it as a Bearer token on each request. termsOfService: https://monta.com/en/terms-conditions/ contact: name: Monta Support url: https://docs.public-api.monta.com/ version: '2023-09-14' servers: - url: https://public-api.monta.com/api/v1 description: Monta Public API production paths: /auth/token: post: operationId: createAccessTokenWithClientCredentials tags: - Authentication summary: Get an access token with client credentials. description: >- Exchange a clientId and clientSecret for a short-lived bearer access token and a refresh token. The access token must be supplied as a Bearer token on subsequent requests. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ClientCredentialsRequest' responses: '200': description: Successfully created access token. content: application/json: schema: $ref: '#/components/schemas/TokenResponse' '401': description: Invalid client credentials. /auth/refresh: post: operationId: createAccessTokenWithRefreshToken tags: - Authentication summary: Get an access token with a refresh token. description: Exchange a valid refresh token for a new access token. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RefreshTokenRequest' responses: '200': description: Successfully refreshed access token. content: application/json: schema: $ref: '#/components/schemas/TokenResponse' '401': description: Invalid or expired refresh token. /auth/information: get: operationId: getAuthInformation tags: - Authentication summary: Get current application details. description: Returns details about the currently authenticated application. security: - bearerAuth: [] responses: '200': description: OK /charge-points: get: operationId: listChargePoints tags: - Charge Points summary: List charge points. description: >- Returns a paginated list of charge points the authenticated application can access. Required scope: `charge-points`. security: - bearerAuth: [] parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPage' responses: '200': description: A paginated list of charge points. content: application/json: schema: $ref: '#/components/schemas/ChargePointList' /charge-points/{id}: get: operationId: getChargePoint tags: - Charge Points summary: Get a single charge point. description: >- Returns a single charge point by its identifier. Required scope: `charge-points`. security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: integer format: int64 responses: '200': description: A charge point. content: application/json: schema: $ref: '#/components/schemas/ChargePoint' '404': description: Charge point not found. /afir-charge-points: get: operationId: listAfirChargePoints tags: - Charge Points summary: List AFIR-compliant roaming charge points. description: >- Returns a paginated list of publicly accessible, roaming-enabled charge points with AFIR Article 20-compliant data. parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPage' responses: '200': description: A paginated list of AFIR charge points. /evse/{id}/status: get: operationId: getEvseStatus tags: - Charge Points summary: Get EVSE status and ad-hoc price. description: >- Returns the current availability status and ad-hoc price for a given EVSE (Electric Vehicle Supply Equipment). parameters: - name: id in: path required: true schema: type: integer format: int64 responses: '200': description: EVSE status and ad-hoc price. content: application/json: schema: $ref: '#/components/schemas/EvseStatus' /charges: get: operationId: listCharges tags: - Charges summary: List charges. description: >- Returns a paginated list of charges (charging sessions). Required scope: `charge-transactions`. security: - bearerAuth: [] parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPage' responses: '200': description: A paginated list of charges. content: application/json: schema: $ref: '#/components/schemas/ChargeList' post: operationId: startCharge tags: - Charges summary: Start a charge. description: >- Starts a charge (charging session) on a given charge point. Required scope: `control-charging`. security: - bearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/StartChargeRequest' responses: '200': description: The started charge. content: application/json: schema: $ref: '#/components/schemas/Charge' /charges/{id}: get: operationId: getCharge tags: - Charges summary: Get a single charge. description: >- Returns a single charge (charging session) by its identifier. Required scope: `charge-transactions`. security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: integer format: int64 responses: '200': description: A charge. content: application/json: schema: $ref: '#/components/schemas/Charge' '404': description: Charge not found. /charges/{id}/stop: post: operationId: stopCharge tags: - Charges summary: Stop a charge. description: >- Stops an active charge (charging session). Required scope: `control-charging`. security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: integer format: int64 responses: '200': description: The stopped charge. content: application/json: schema: $ref: '#/components/schemas/Charge' /charges/{id}/kwh-consumption: get: operationId: getChargeKwhConsumption tags: - Charges summary: Get kWh consumption for a charge. description: >- Returns the energy consumption (kWh) data for a given charge. Required scope: `charge-transactions`. security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: integer format: int64 responses: '200': description: kWh consumption data for the charge. /wallet-transactions: get: operationId: listWalletTransactions tags: - Wallet Transactions summary: List wallet transactions. description: >- Returns a paginated list of wallet transactions. Required scope: `wallet-transactions`. security: - bearerAuth: [] parameters: - $ref: '#/components/parameters/Page' - $ref: '#/components/parameters/PerPage' responses: '200': description: A paginated list of wallet transactions. content: application/json: schema: $ref: '#/components/schemas/WalletTransactionList' /wallet-transactions/{id}: get: operationId: getWalletTransaction tags: - Wallet Transactions summary: Get a single wallet transaction. description: >- Returns a single wallet transaction by its identifier. Required scope: `wallet-transactions`. security: - bearerAuth: [] parameters: - name: id in: path required: true schema: type: integer format: int64 responses: '200': description: A wallet transaction. content: application/json: schema: $ref: '#/components/schemas/WalletTransaction' '404': description: Wallet transaction not found. /personal-wallet: get: operationId: getPersonalWallet tags: - Wallet Transactions summary: Get the personal wallet. description: >- Returns the personal wallet for the authenticated user. Required scope: `wallet-transactions`. security: - bearerAuth: [] responses: '200': description: The personal wallet. content: application/json: schema: $ref: '#/components/schemas/Wallet' /open-data-locations: get: operationId: listOpenDataLocations tags: - Charge Points summary: List open-data charge point locations. description: >- Returns UK charge point locations in OCPI 2.2.1 format as open data. responses: '200': description: Open-data charge point locations. /detect-location: get: operationId: detectLocation tags: - Utilities summary: Detect location from IP. description: Returns an IP-based geolocation estimate for the caller. responses: '200': description: Detected location. components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: >- OAuth2 client-credentials bearer token obtained from POST /auth/token. parameters: Page: name: page in: query description: Page number to retrieve (starts with 0). required: false schema: type: integer format: int32 default: 0 PerPage: name: perPage in: query description: Number of items per page (between 1 and 100, default 10). required: false schema: type: integer format: int32 default: 10 minimum: 1 maximum: 100 schemas: ClientCredentialsRequest: type: object required: - clientId - clientSecret properties: clientId: type: string clientSecret: type: string RefreshTokenRequest: type: object required: - refreshToken properties: refreshToken: type: string TokenResponse: type: object properties: accessToken: type: string description: Short-lived bearer access token (valid ~1 hour). refreshToken: type: string description: Longer-lived refresh token (valid ~24 hours). Pagination: type: object properties: page: type: integer format: int32 perPage: type: integer format: int32 total: type: integer format: int64 ChargePoint: type: object properties: id: type: integer format: int64 name: type: string state: type: string description: Current operational state of the charge point. visibility: type: string ChargePointList: type: object properties: data: type: array items: $ref: '#/components/schemas/ChargePoint' pagination: $ref: '#/components/schemas/Pagination' EvseStatus: type: object properties: id: type: integer format: int64 status: type: string description: Current availability status of the EVSE. adHocPrice: type: number format: double currency: type: string StartChargeRequest: type: object required: - chargePointId properties: chargePointId: type: integer format: int64 description: Identifier of the charge point to start a charge on. Charge: type: object properties: id: type: integer format: int64 chargePointId: type: integer format: int64 state: type: string kwh: type: number format: double startedAt: type: string format: date-time stoppedAt: type: string format: date-time ChargeList: type: object properties: data: type: array items: $ref: '#/components/schemas/Charge' pagination: $ref: '#/components/schemas/Pagination' Wallet: type: object properties: id: type: integer format: int64 balance: type: number format: double currency: type: string WalletTransaction: type: object properties: id: type: integer format: int64 amount: type: number format: double currency: type: string type: type: string createdAt: type: string format: date-time WalletTransactionList: type: object properties: data: type: array items: $ref: '#/components/schemas/WalletTransaction' pagination: $ref: '#/components/schemas/Pagination' security: - bearerAuth: []