> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ionage.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Create charging restrictions

> Creates one or more connector-scoped charging restrictions. The request is atomic; if any item is invalid, no restrictions are created.
In V1, every restriction item must include connector_id and exactly one subject identifier. soc_limit and time_ranges are optional.

Common creation patterns:
- Use driver_id when the restriction should apply to that driver whenever they start charging.
- Use vehicle_id when the restriction should apply to an identifiable fleet vehicle. Restrictions are stored before identification becomes available, but cannot be enforced until FLO can identify that vehicle during charging.
- Use one subject per item. If both a driver and a vehicle need the same restriction, send two items in the same batch.
- Create one item per connector. To cover multiple connectors, send a batch with repeated subject fields and different connector_id values.
- Omit both soc_limit and time_ranges for a connector-only access restriction with no configured auto-stop condition.
- Use soc_limit without time_ranges for an SOC-only restriction.
- Use time_ranges without soc_limit for a time-only restriction.
- Use both soc_limit and time_ranges when both stop conditions should apply.




## OpenAPI

````yaml /api-reference/flo/flo-api-oas.json post /public/fleets/v1/restrictions
openapi: 3.0.3
info:
  title: FLO Partner API
  version: 1.0.0
  description: >
    Contract-first API for fleet partners building an operations dashboard, a
    driver app,

    or a backend-for-frontend integration with FLO.


    The API is fleet scoped. The API key identifies exactly one fleet; callers
    never send an

    internal fleet ID. Stable opaque public IDs must be persisted instead of
    database IDs,

    phone numbers, or registration numbers.


    Modules:

    - Stations: contracted charging stations, availability, and tariffs.

    - Drivers: app-charging driver onboarding and access management.

    - Vehicles: fleet vehicle registry for tracking and restriction
    configuration.

    - Payments: read-only fleet billing summary and payment transactions.

    - Sessions: asynchronous remote start, observation, and stop for fleet
    drivers.

    - Restrictions: connector-level access, time, and SOC policy.


    Mutation requests that create sessions or resources require an

    Idempotency-Key. Money uses integer paise. A 202 session response means

    the command was accepted for processing, not completed by the charge point.


    Compatibility caveats:

    - Restrictions are evaluated only when FLO can identify the session as
    belonging to the configured driver_id or vehicle_id.

    - SOC-based stop enforcement depends on the CPO/charger sending usable SOC
    updates for the active session.

    - Time-window and SOC stop enforcement depend on the CPO/charger supporting
    remote stop for the active session path.

    - Vehicle restrictions are stored even when FLO cannot yet identify the
    vehicle during charging; enforcement begins when vehicle identification
    becomes available.

    - If identity, SOC telemetry, or remote stop support is unavailable, FLO
    enforces only the supported parts of a restriction.
servers:
  - url: https://api.ionage.in
security:
  - ApiKeyAuth: []
tags:
  - name: Operators
    description: Charge point operators whose stations are contracted to the fleet.
  - name: Drivers
    description: App-charging driver onboarding and access management.
  - name: Vehicles
    description: Fleet vehicle registry for tracking and restriction configuration.
  - name: Restrictions
    description: Connector-level access, time, and SOC policy.
  - name: Stations
    description: Contracted charging stations, availability, and tariffs.
  - name: Billing
    description: Read-only fleet billing summary.
  - name: Transactions
    description: Read-only fleet payment transactions.
  - name: Sessions
    description: Asynchronous remote start, observation, and stop for fleet drivers.
paths:
  /public/fleets/v1/restrictions:
    post:
      tags:
        - Restrictions
      summary: Create charging restrictions
      description: >
        Creates one or more connector-scoped charging restrictions. The request
        is atomic; if any item is invalid, no restrictions are created.

        In V1, every restriction item must include connector_id and exactly one
        subject identifier. soc_limit and time_ranges are optional.


        Common creation patterns:

        - Use driver_id when the restriction should apply to that driver
        whenever they start charging.

        - Use vehicle_id when the restriction should apply to an identifiable
        fleet vehicle. Restrictions are stored before identification becomes
        available, but cannot be enforced until FLO can identify that vehicle
        during charging.

        - Use one subject per item. If both a driver and a vehicle need the same
        restriction, send two items in the same batch.

        - Create one item per connector. To cover multiple connectors, send a
        batch with repeated subject fields and different connector_id values.

        - Omit both soc_limit and time_ranges for a connector-only access
        restriction with no configured auto-stop condition.

        - Use soc_limit without time_ranges for an SOC-only restriction.

        - Use time_ranges without soc_limit for a time-only restriction.

        - Use both soc_limit and time_ranges when both stop conditions should
        apply.
      operationId: post_restrictions
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
          description: >-
            Client UUID retained for at least 24 hours. Same key and request
            returns the original result; a different request returns 409.
          example: 8b52e548-4e34-4d2c-9b53-c3cb35f95e66
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  driver_id:
                    type: string
                  connector_id:
                    type: string
                required:
                  - driver_id
                  - connector_id
            example:
              - driver_id: drv_1111111111111111
                connector_id: con_3a7bd3e2360a3d80
      responses:
        '201':
          description: Restrictions created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        restriction_id:
                          type: string
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        driver_id:
                          type: string
                        vehicle_id:
                          type: string
                        connector_id:
                          type: string
                        soc_limit:
                          type: integer
                        time_ranges:
                          type: array
                          items:
                            type: object
                            properties:
                              start_at:
                                type: string
                                format: date-time
                              end_at:
                                type: string
                                format: date-time
                            required:
                              - start_at
                              - end_at
                      required:
                        - restriction_id
                        - created_at
                        - updated_at
                required:
                  - data
              example:
                data:
                  - restriction_id: res_708192a3b4c5d6e7
                    driver_id: drv_1111111111111111
                    connector_id: con_3a7bd3e2360a3d80
                    created_at: '2026-06-01T05:00:00+05:30'
                    updated_at: '2026-06-01T05:00:00+05:30'
                  - restriction_id: res_8192a3b4c5d6e7f8
                    vehicle_id: veh_2222222222222222
                    connector_id: con_3a7bd3e2360a3d80
                    created_at: '2026-06-01T05:00:00+05:30'
                    updated_at: '2026-06-01T05:00:00+05:30'
        '400':
          description: The request does not match the operation's input requirements.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
              example:
                error:
                  code: VALIDATION_ERROR
                  message: connector_id is required
        '401':
          description: The API key is missing or invalid.
        '403':
          description: The authenticated fleet is not allowed to perform this action.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
              example:
                error:
                  code: FORBIDDEN
                  message: the authenticated fleet is not allowed to use this connector
        '409':
          description: >-
            The request conflicts with current state or reuses an
            Idempotency-Key with different input.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
              example:
                error:
                  code: CONFLICTING_RESTRICTION
                  message: >-
                    this subject, connector, and applicable scope already has an
                    active or requested restriction
        '500':
          description: Unexpected server-side error while processing a valid request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
              example:
                error:
                  code: INTERNAL_ERROR
                  message: an unexpected error occurred while processing the request
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Fleet-scoped API key. The key identifies exactly one fleet; callers
        never send an internal fleet ID.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.