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

# Get list of charging key orders

> Returns the list of ordered charging keys by a given user.



## OpenAPI

````yaml reference/openapi.json GET /drive/v1/users/{userId}/charging-keys/orders
openapi: 3.1.0
info:
  title: Drive API
  version: 1.0.0
  description: >-
    The Drive API provides comprehensive access to Plugsurfing's charging
    infrastructure network. It enables you to manage users, charging keys,
    search for charging locations, handle payments, and control charging
    sessions.
servers:
  - url: https://{environment}.plugsurfing.com
    variables:
      environment:
        enum:
          - drive-api-stage
        default: drive-api-stage
        description: >-
          API environment - use drive-api-stage for testing and drive-api for
          production
security: []
tags:
  - name: Geosearch
    description: >-
      Search and retrieve detailed information about charging locations and
      stations
  - name: Users
    description: >-
      Manage user accounts including creation, retrieval, updates, and deletion.
      Handles user-specific data and preferences.
  - name: Charging Keys
    description: >-
      Manage physical and virtual charging keys including creation, activation,
      updates, and status management. Essential for user access to charging
      stations.
  - name: Sessions
    description: >-
      Access and manage charging session data including history, status, and
      detailed session information
  - name: Remote Charging
    description: >-
      Control charging sessions remotely including starting and stopping
      sessions, and monitoring session status
  - name: Payment Options
    description: >-
      Manage payment methods and handle transaction processing for charging
      services
  - name: User Groups
    description: Manage user group memberships
  - name: Vouchers
    description: Redeem vouchers
  - name: Charging Key Orders
    description: Handle the ordering and fulfillment process for physical charging keys
  - name: EMP Charging Keys
    description: E-Mobility Provider specific endpoints for managing charging keys
  - name: EMP Geosearch
    description: E-Mobility Provider specific endpoints for location search and information
  - name: EMP Orders
    description: E-Mobility Provider specific endpoints for managing orders
  - name: EMP Sessions
    description: E-Mobility Provider specific endpoints for managing charging sessions
  - name: EMP Fleets
    description: E-Mobility Provider specific endpoints for managing fleets
paths:
  /drive/v1/users/{userId}/charging-keys/orders:
    get:
      tags:
        - Charging Key Orders
      summary: Get list of charging key orders
      description: Returns the list of ordered charging keys by a given user.
      operationId: listChargingKeyOrders
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargingKeyOrdersListResponse'
              example:
                - id: vrj82A9EpJ
                  created: '2022-04-07T11:30:57.000Z'
                  updated: '2022-04-07T11:30:57.000Z'
                  address:
                    companyName: Plusurfing
                    firstName: Luck
                    lastName: Thomson
                    addressLine1: Rättarvägen 3
                    addressLine2: Rättarvägen 3
                    postalCode: 12345
                    city: Solna
                    country: Sweden
                  quantity: 1
                  currency: SEK
                  priceMinorInclVat: 1010
                  state: ORDER_PLACED
                  hasReceipt: false
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: Resource not found
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ChargingKeyOrdersListResponse:
      type: array
      items:
        $ref: '#/components/schemas/ChargingKeyOrdersListItem'
      description: Response containing charging key orders for a user.
    ErrorResponse:
      title: ErrorResponse
      type: object
      properties:
        message:
          type: string
    ChargingKeyOrdersListItem:
      type: object
      required:
        - id
        - created
        - updated
        - state
        - quantity
      properties:
        id:
          type: string
          example: vrj82A9EpJ
          description: Unique identifier of the order.
        created:
          type: string
          format: date-time
          example: '2022-04-07T11:30:57.000Z'
          description: UTC timestamp when this order was created.
        updated:
          type: string
          format: date-time
          example: '2022-04-07T11:30:57.000Z'
          description: UTC timestamp when this order was last updated.
        address:
          $ref: '#/components/schemas/ChargingKeyAddress'
          description: Shipping address associated with this order.
        quantity:
          type: number
          example: 1
          description: Number of charging keys included in the order.
        currency:
          type: string
          example: SEK
          description: 3-letter currency code
        priceMinorInclVat:
          type: integer
          format: int32
          example: 1010
          description: price in minor units (example value is 10.10 SEK)
        state:
          $ref: '#/components/schemas/OrderState'
          description: Current order state.
        hasReceipt:
          type: boolean
          example: false
          description: Indicates whether a receipt is available for this order.
      description: A single charging key order entry in a list response.
    ChargingKeyAddress:
      type: object
      properties:
        companyName:
          type: string
          example: Plusurfing
          description: Company name for business delivery addresses.
        firstName:
          type: string
          example: Luck
          description: Recipient first name.
        lastName:
          type: string
          example: Thomson
          description: Recipient last name.
        addressLine1:
          type: string
          example: Rättarvägen 3
          description: Primary street address line.
        addressLine2:
          type: string
          example: Rättarvägen 3
          description: Secondary address line such as apartment or suite.
        postalCode:
          type: string
          example: 12345
          description: Postal or ZIP code.
        city:
          type: string
          example: Solna
          description: City name.
        country:
          type: string
          example: Sweden
          description: Country code in ISO 3166-1 alpha-2 format.
      description: Postal address associated with a charging key order.
    OrderState:
      type: string
      enum:
        - ORDER_FILLED
        - ORDER_CANCELLED
        - ORDER_PROCESSING
        - ORDER_WAITING_3DS
        - ORDER_PAYMENT_FAILED
        - ORDER_REFUND_FAILED
        - ORDER_REFUNDED
        - ORDER_PLACED
        - ORDER_PAID
      example: ORDER_PLACED
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````

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