SIMcloud Electricity API

The Electricity API from SIMcloud — 1 operation(s) for electricity.

GitHub OpenAPI

Operations 2

POST /api/electricity.php Submit an electricity order #
GET /api/electricity.php Check an electricity meter or query an electricity order #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/simcloud-co-za:simcloud-co-za-electricity-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

simcloud-co-za-electricity-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SIMcloud Electricity API
  version: 1.0.0
  description: Token-authenticated SIMcloud REST API. Use HTTPS over IPv4 and send amounts in rand (ZAR). Poll accepted orders by their returned identifier. Reconcile ambiguous POST outcomes before resubmitting. See the API conventions for polling, timeouts and retries.
servers:
- url: https://simcloud.co.za
security:
- bearerAuth: []
tags:
- name: Electricity
paths:
  /api/electricity.php:
    post:
      tags:
      - Electricity
      summary: Submit an electricity order
      description: Use a unique client reference for each intended purchase. If the outcome is unknown, poll the original purchase by client reference. Do not submit the purchase again with a new reference.
      operationId: createElectricityOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - amount
              properties:
                meter_number:
                  type: string
                  pattern: ^[A-Za-z0-9]+$
                  maxLength: 50
                  example: 01234567890
                amount:
                  type: integer
                  minimum: 55
                  maximum: 1000
                  description: Total customer amount in whole rand (no cents). The fee is amount times 3 / 103, capped at R10 and rounded down to whole rand.
                  example: 150
                client_reference:
                  type: string
                  minLength: 1
                  description: Unique per intended purchase and account. Reuse it with identical purchase details to retrieve the recorded result.
                  example: INV-10045
                recipient:
                  $ref: '#/components/schemas/MobileNumber'
                send_sms:
                  type: boolean
                  default: true
                  description: Send the SIMcloud completion SMS for a successful order.
                  example: true
                sms_company_name:
                  type: string
                  maxLength: 100
                  pattern: ^[a-zA-Z0-9 &'().,-]*$
                  example: acme power
                deviceId:
                  type: string
                  pattern: ^[A-Za-z0-9]+$
                  maxLength: 50
                  example: 01234567890
                  description: Alias for meter_number.
                electricity_order_reference:
                  type: string
                  minLength: 1
                  description: Alias for client_reference.
                  example: INV-10045
                smsRecipientMsisdn:
                  allOf:
                  - $ref: '#/components/schemas/MobileNumber'
                  description: Alias for recipient.
              allOf:
              - anyOf:
                - required:
                  - meter_number
                - required:
                  - deviceId
              - anyOf:
                - required:
                  - client_reference
                - required:
                  - electricity_order_reference
              - anyOf:
                - required:
                  - recipient
                - required:
                  - smsRecipientMsisdn
      responses:
        '201':
          description: Electricity order accepted. Poll GET for voucher details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ElectricityAccepted'
        '202':
          $ref: '#/components/responses/ElectricityReconciliation'
        '400':
          description: Invalid request, insufficient balance or municipality rejection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceAwareError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: Duplicate meter purchase, reference conflict, or reference already being processed. Check the existing order.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ElectricityDuplicate'
                - $ref: '#/components/schemas/ElectricityReferenceConflict'
                - $ref: '#/components/schemas/ElectricityRequestInProgress'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          description: Electricity purchase temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      externalDocs:
        url: https://simcloud.co.za/api/electricity.html
    get:
      tags:
      - Electricity
      summary: Check an electricity meter or query an electricity order
      description: Provide meter_number for a meter check or one of the three order identifiers to query an order owned by the authenticated account.
      operationId: getElectricityOrder
      parameters:
      - in: query
        name: meter_number
        required: false
        schema:
          type: string
          pattern: ^[A-Za-z0-9]+$
          maxLength: 50
          example: 01234567890
        description: Meter number to validate before placing an order. When supplied, the endpoint returns meter support details instead of order status. A supplier internal error returns status unknown and supported null; retry later rather than treating the meter as unsupported.
      - in: query
        name: order_id
        required: false
        schema:
          type: integer
          minimum: 1
      - in: query
        name: client_reference
        required: false
        schema:
          type: string
        description: Use the reference returned by POST or the original submitted reference.
      - in: query
        name: order_reference_id
        required: false
        schema:
          type: string
      - name: deviceId
        in: query
        required: false
        description: Alias for meter_number.
        schema:
          type: string
          pattern: ^[A-Za-z0-9]+$
          maxLength: 50
          example: 01234567890
      responses:
        '200':
          description: Meter check or electricity purchase status.
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/ElectricityMeter'
                - $ref: '#/components/schemas/ElectricityPending'
                - $ref: '#/components/schemas/ElectricityFulfilled'
                - $ref: '#/components/schemas/ElectricityFailed'
        '202':
          $ref: '#/components/responses/ElectricityReconciliation'
        '400':
          description: Invalid query parameters or recorded purchase rejection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Order not found for this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Recorded duplicate meter purchase.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ElectricityDuplicate'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          description: Municipality meter check failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Meter check temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      externalDocs:
        url: https://simcloud.co.za/api/electricity.html
components:
  schemas:
    ElectricityTransactionDetails:
      type: object
      required:
      - reference
      - amount
      - recipient
      - meter_number
      - network
      - date
      - utility
      properties:
        reference:
          $ref: '#/components/schemas/SupplierValue'
        amount:
          $ref: '#/components/schemas/SupplierValue'
        recipient:
          $ref: '#/components/schemas/SupplierValue'
        meter_number:
          $ref: '#/components/schemas/SupplierValue'
        network:
          type: string
          enum:
          - Electricity
        date:
          $ref: '#/components/schemas/NullableLocalTimestamp'
        utility:
          type: string
    ElectricityFailed:
      type: object
      required:
      - status
      - order_id
      - message
      - transaction_details
      properties:
        status:
          type: string
          enum:
          - failed
          - cancelled
        order_id:
          type: integer
          minimum: 1
        message:
          type: string
        transaction_details:
          $ref: '#/components/schemas/ElectricityTransactionDetails'
    ElectricityDuplicate:
      type: object
      required:
      - status
      - code
      - message
      properties:
        status:
          type: string
          enum:
          - error
        code:
          type: string
          enum:
          - duplicate_transaction
        message:
          type: string
        retry_after_seconds:
          type: integer
          enum:
          - 300
          description: Included when the five-minute duplicate rule applies.
    NullableLocalTimestamp:
      type:
      - string
      - 'null'
      description: Local timestamp in Africa/Johannesburg, using YYYY-MM-DD HH:MM:SS.
      example: '2026-07-29 09:31:20'
    ElectricityMeter:
      type: object
      required:
      - status
      - message
      - meter_number
      - supported
      - provider
      properties:
        status:
          type: string
          enum:
          - success
          - unsupported
          - unknown
        message:
          type: string
        meter_number:
          type: string
        supported:
          type:
          - boolean
          - 'null'
          description: True for success, false for unsupported, null for unknown.
        provider:
          type:
          - string
          - 'null'
    BalanceAwareError:
      allOf:
      - $ref: '#/components/schemas/Error'
      - type: object
        properties:
          required_balance:
            type: number
            description: Required rand balance, included on balance precheck failure.
          available_balance:
            type: number
            description: Last known rand balance, included on balance precheck failure.
    SupplierValue:
      description: Value as supplied by the municipality, or null when unavailable.
      oneOf:
      - type:
        - string
        - 'null'
      - type: number
    LocalTimestamp:
      type: string
      description: Local timestamp in Africa/Johannesburg, using YYYY-MM-DD HH:MM:SS.
      example: '2026-07-29 09:31:20'
    ElectricityReferenceConflict:
      type: object
      required:
      - status
      - code
      - message
      properties:
        status:
          type: string
          enum:
          - error
        code:
          type: string
          enum:
          - reference_conflict
        message:
          type: string
    MobileNumber:
      type: string
      pattern: ^(?:0|\+27|27)?[0-9]{9}$
      description: South African mobile number. Prefer +27 followed by nine digits. Encode + as %2B in query parameters.
      example: '+27821234567'
    ElectricityPending:
      type: object
      required:
      - status
      - message
      properties:
        status:
          type: string
          enum:
          - pending
        message:
          type: string
    ElectricityFulfilled:
      type: object
      required:
      - status
      - order_id
      - message
      - transaction_details
      - entry_instructions
      - recharge_pin_information
      properties:
        status:
          type: string
          enum:
          - success
        order_id:
          type: integer
          minimum: 1
        message:
          type: string
        transaction_details:
          $ref: '#/components/schemas/ElectricityTransactionDetails'
        entry_instructions:
          type: string
        recharge_pin_information:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ElectricityPin'
          description: PINs in the order they must be entered.
    ElectricityReconciliation:
      type: object
      required:
      - status
      - code
      - message
      - client_reference
      properties:
        status:
          type: string
          enum:
          - pending
        code:
          type: string
          enum:
          - reconciliation_pending
        message:
          type: string
        client_reference:
          type: string
        submitted_reference:
          type: string
    Error:
      type: object
      required:
      - status
      - message
      properties:
        status:
          type: string
          enum:
          - error
        message:
          type: string
    ElectricityAccepted:
      type: object
      required:
      - status
      - message
      - order_id
      - client_reference
      - submitted_reference
      - order_reference_id
      - meter_number
      - recipient
      - send_sms
      - sms_company_name
      - amount
      - electricity_amount
      - fee
      - process_status
      - billing_status
      - timestamp
      properties:
        status:
          type: string
          enum:
          - success
        message:
          type: string
        order_id:
          type: integer
          minimum: 1
        client_reference:
          type: string
        submitted_reference:
          type: string
        order_reference_id:
          $ref: '#/components/schemas/SupplierOrderNumber'
        meter_number:
          type: string
        recipient:
          type: string
        send_sms:
          type: boolean
        sms_company_name:
          type: string
        amount:
          type: integer
        electricity_amount:
          type: number
        fee:
          type: number
        process_status:
          type: string
          enum:
          - Pending
        billing_status:
          type: string
          enum:
          - pending
        timestamp:
          $ref: '#/components/schemas/LocalTimestamp'
    ElectricityPin:
      type: object
      required:
      - entry_order
      - description
      - pin
      - units
      properties:
        entry_order:
          type:
          - integer
          - 'null'
        description:
          type: string
          enum:
          - KEY-CHANGE-1
          - KEY-CHANGE-2
          - PURCHASE
          - FREE_UNITS
          - PIN
        pin:
          type: string
        units:
          type: string
    SupplierOrderNumber:
      description: Platform order number. Treat it as an identifier.
      oneOf:
      - type: integer
      - type: string
        pattern: ^[0-9]+$
    ElectricityRequestInProgress:
      type: object
      required:
      - status
      - code
      - message
      properties:
        status:
          type: string
          enum:
          - pending
        code:
          type: string
          enum:
          - request_in_progress
        message:
          type: string
  responses:
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ElectricityReconciliation:
      description: Purchase reconciliation pending. Poll GET with the original or returned client reference.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ElectricityReconciliation'
    Unauthorized:
      description: Missing or invalid Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Token