> ## 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.

# Fetch charging key orders

> Returns a list of charging key orders belonging to supported organizations.



## OpenAPI

````yaml reference/openapi.json GET /emp/v1/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:
  /emp/v1/orders:
    get:
      tags:
        - EMP Orders
      summary: Fetch charging key orders
      description: >-
        Returns a list of charging key orders belonging to supported
        organizations.
      operationId: listEmpChargingKeyOrders
      parameters:
        - name: fromDate
          in: query
          description: Created orders from date
          schema:
            type: string
            format: date
            pattern: YYYY-MM-DD
        - name: toDate
          in: query
          description: Created orders to date
          schema:
            type: string
            format: date
            pattern: YYYY-MM-DD
        - name: status
          in: query
          description: Order status
          schema:
            $ref: '#/components/schemas/ChargingKeyOrderStatus'
        - name: pageSize
          in: query
          description: Orders per page
          schema:
            type: integer
            example: 100
        - name: cursor
          in: query
          description: Cursor for pagination
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmpChargingKeyOrdersResponse'
              example:
                products:
                  - id: aYnky297eG
                    address:
                      country: Austria
                      additionalInformation: test test
                      firstName: Frans
                      lastName: Anderson
                      city: Wistful Vista
                      postalCode: '85960'
                      companyName: Low area Corp.
                      addressLine1: First Way 261b
                      addressLine2: Suite 9
                    quantity: 1
                    language: en
                    product:
                      id: Am07b6Q7JZ
                    created: '2023-06-26T10:00:00Z'
                    organizationId: JoEl1xoP7r
                    status: ORDER_PAID
                    updated: '2023-06-26T12:00:00Z'
                    printing:
                      variables:
                        driverName: Frans Anderson
                      color: WHITE
                cursor: >-
                  DnF1ZXJ5VGhlbkZldGNoBQAAAAAACz-bFmYwRDVpbkhzUzNxaXMxU3JZV0dFNGcAAAAAAAs
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                message: An unexpected error occurred.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ChargingKeyOrderStatus:
      type: string
      description: ORDER_PAID -> orders ready to be fulfilled
      enum:
        - WAITING_FOR_ORDER
        - ORDER_PLACED
        - ORDER_PROCESSING
        - ORDER_ASSIGNED
        - ORDER_PAID
        - ORDER_CANCELLED
        - ORDER_CANCELLING
        - ORDER_PAYMENT_FAILED
        - ORDER_REFUND_FAILED
        - ORDER_WAITING_REFUND
        - ORDER_REFUNDED
        - PAYMENT_ONGOING
        - ORDER_FILLED
        - ORDER_PAYED
        - PREPARE_RECEIPT
        - ORDER_PAYED_WITHOUT_RECEIPT
      example: ORDER_PAID
    EmpChargingKeyOrdersResponse:
      required:
        - products
      type: object
      properties:
        products:
          type: array
          items:
            $ref: '#/components/schemas/EmpChargingKeyOrdersProduct'
          description: Products returned for the current page.
        cursor:
          type: string
          example: >-
            DnF1ZXJ5VGhlbkZldGNoBQAAAAAACz-bFmYwRDVpbkhzUzNxaXMxU3JZV0dFNGcAAAAAAAs
          description: Cursor to request the next page of results.
      description: Paginated list of EMP charging key order products.
    ErrorResponse:
      title: ErrorResponse
      type: object
      properties:
        message:
          type: string
    EmpChargingKeyOrdersProduct:
      required:
        - id
        - address
        - quantity
        - language
        - product
        - created
        - organizationId
        - status
        - updated
      type: object
      properties:
        id:
          type: string
          example: aYnky297eG
          description: Unique identifier of the order product.
        address:
          $ref: '#/components/schemas/EmpChargingKeyOrdersProductAddress'
          description: Delivery address for this order product.
        quantity:
          type: number
          example: 1
          description: Number of product units ordered.
        language:
          type: string
          example: en
          description: Language used for order communication.
        product:
          type: object
          properties:
            id:
              type: string
              example: Am07b6Q7JZ
          description: Ordered product code or type.
        created:
          type: string
          format: date-time
          example: '2023-06-26T10:00:00Z'
          description: UTC timestamp when this product order was created.
        organizationId:
          type: string
          example: JoEl1xoP7r
          description: Identifier of the organization that placed the order.
        status:
          $ref: '#/components/schemas/ChargingKeyOrderStatus'
          description: Current processing status of the order product.
        updated:
          type: string
          format: date-time
          example: '2023-06-26T12:00:00Z'
          description: UTC timestamp when this product order was last updated.
        printing:
          type: object
          description: >-
            Printing details associated with the order product. Present only for
            orders that include physical card customization.
          required:
            - variables
          properties:
            variables:
              type: object
              additionalProperties:
                type: string
              description: >-
                Print-specific values associated with the order, for example
                values used on a customized physical card.
            color:
              type:
                - string
                - 'null'
              enum:
                - BLACK
                - WHITE
                - null
              description: >-
                Card template color agreed for the product/order. It is not
                selected by the end customer while placing the order.
      description: EMP charging key order product details.
    EmpChargingKeyOrdersProductAddress:
      type: object
      properties:
        country:
          type: string
          example: Austria
          description: Country code in ISO 3166-1 alpha-2 format.
        additionalInformation:
          type: string
          example: test test
          description: Additional delivery instructions.
        firstName:
          type: string
          example: Frans
          description: Recipient first name.
        lastName:
          type: string
          example: Anderson
          description: Recipient last name.
        city:
          type: string
          example: Wistful Vista
          description: City name.
        postalCode:
          type: string
          example: '85960'
          description: Postal or ZIP code.
        companyName:
          type: string
          example: Low area Corp.
          description: Company name for business delivery addresses.
        addressLine1:
          type: string
          example: First Way 261b
          description: Primary street address line.
        addressLine2:
          type: string
          example: Suite 9
          description: Secondary address line such as apartment or suite.
      description: Delivery address for an EMP charging key order product.
  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.