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

# Get command execution

> Returns the recorded state of a previously issued vehicle command, identified by its execution id. The execution of any operation issued by the calling application can be read, regardless of the user or vehicle it was issued for. Every command response includes this endpoint's URL in data.links.self, so follow that link to check an operation's status, or to follow the operation named in meta.blockingOperation of an OPERATION_IN_PROGRESS error.

When a request returns 202, its `Location` header holds this endpoint's URL, and its outcome is available only here. Poll this endpoint every Retry-After seconds until status.value is no longer PENDING. Every operation reaches a final status, so this loop always ends. Today that takes at most about 5 minutes from `meta.executedAt`, but the limit may change, so don't rely on a fixed timeout. If `meta.requestId` no longer matches the one you received, the execution now describes a newer operation, and yours has finished.

A status.value of EXPIRED means the operation didn't record a result within the time allowed, so the outcome is unknown: it may or may not have taken effect on the vehicle. It no longer blocks other requests, so you can retry it.

An execution is kept for at least 30 days after its most recent operation. After it is removed, this endpoint returns 404.




## OpenAPI

````yaml /specs/full-vehicle.yaml get /command-executions/{executionId}
openapi: 3.0.3
info:
  title: Smartcar Vehicle API (Complete)
  version: 3.0.0
  description: API for vehicle data (signals) and operations (commands).
servers:
  - url: https://vehicle.api.smartcar.com/v3
security: []
tags:
  - name: Charging
    description: Commands for controlling vehicle charging behavior.
  - name: Security
    description: Commands for controlling vehicle door locks.
  - name: Navigation
    description: Commands for setting destinations in the vehicle navigation system.
  - name: Command Executions
    description: Retrieve the recorded result of a previously issued vehicle command.
  - name: Charge Schedules
    description: Create and delete recurring charge schedules on a vehicle.
  - name: Schedule Executions
    description: >-
      Retrieve the recorded result of a previously issued schedule create or
      delete request.
  - name: Charge
    description: Signals and attributes for the Charge group.
  - name: Climate
    description: Signals and attributes for the Climate group.
  - name: Closure
    description: Signals and attributes for the Closure group.
  - name: ConnectivitySoftware
    description: Signals and attributes for the ConnectivitySoftware group.
  - name: ConnectivityStatus
    description: Signals and attributes for the ConnectivityStatus group.
  - name: Diagnostics
    description: Signals and attributes for the Diagnostics group.
  - name: HVAC
    description: Signals and attributes for the HVAC group.
  - name: InternalCombustionEngine
    description: Signals and attributes for the InternalCombustionEngine group.
  - name: Location
    description: Signals and attributes for the Location group.
  - name: LowVoltageBattery
    description: Signals and attributes for the LowVoltageBattery group.
  - name: Motion
    description: Signals and attributes for the Motion group.
  - name: Odometer
    description: Signals and attributes for the Odometer group.
  - name: Service
    description: Signals and attributes for the Service group.
  - name: Surveillance
    description: Signals and attributes for the Surveillance group.
  - name: TractionBattery
    description: Signals and attributes for the TractionBattery group.
  - name: Transmission
    description: Signals and attributes for the Transmission group.
  - name: VehicleIdentification
    description: Signals and attributes for the VehicleIdentification group.
  - name: VehicleUserAccount
    description: Signals and attributes for the VehicleUserAccount group.
  - name: Wheel
    description: Signals and attributes for the Wheel group.
paths:
  /command-executions/{executionId}:
    get:
      tags:
        - Command Executions
      summary: Get command execution
      description: >
        Returns the recorded state of a previously issued vehicle command,
        identified by its execution id. The execution of any operation issued by
        the calling application can be read, regardless of the user or vehicle
        it was issued for. Every command response includes this endpoint's URL
        in data.links.self, so follow that link to check an operation's status,
        or to follow the operation named in meta.blockingOperation of an
        OPERATION_IN_PROGRESS error.


        When a request returns 202, its `Location` header holds this endpoint's
        URL, and its outcome is available only here. Poll this endpoint every
        Retry-After seconds until status.value is no longer PENDING. Every
        operation reaches a final status, so this loop always ends. Today that
        takes at most about 5 minutes from `meta.executedAt`, but the limit may
        change, so don't rely on a fixed timeout. If `meta.requestId` no longer
        matches the one you received, the execution now describes a newer
        operation, and yours has finished.


        A status.value of EXPIRED means the operation didn't record a result
        within the time allowed, so the outcome is unknown: it may or may not
        have taken effect on the vehicle. It no longer blocks other requests, so
        you can retry it.


        An execution is kept for at least 30 days after its most recent
        operation. After it is removed, this endpoint returns 404.
      operationId: getCommandExecution
      parameters:
        - $ref: '#/components/parameters/ExecutionId'
      responses:
        '200':
          $ref: '#/components/responses/CommandExecutionResponse'
        '400':
          $ref: '#/components/responses/BadRequest2'
        '401':
          $ref: '#/components/responses/Unauthorized2'
        '403':
          $ref: '#/components/responses/Forbidden2'
        '404':
          $ref: '#/components/responses/NotFound2'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError2'
      security:
        - bearerAuth: []
components:
  parameters:
    ExecutionId:
      in: path
      name: executionId
      required: true
      description: >
        The id returned as data.id in the response that initiated the operation,
        or as meta.blockingOperation.id on an OPERATION_IN_PROGRESS error.
      schema:
        type: string
        pattern: ^exec_[A-Za-z0-9_-]{22}$
      example: exec_5VMuu6yNbuwNcf8ANim75g
  responses:
    CommandExecutionResponse:
      description: Command execution response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CommandResponse'
          examples:
            chargeStart:
              summary: Charge start
              value:
                data:
                  id: exec_u30M8e5ErKC8wPc5t3uTXw
                  type: command-execution
                  attributes:
                    commandType: charge-start
                    status:
                      value: SUCCESS
                    executionMode: sync
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_u30M8e5ErKC8wPc5t3uTXw
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
                    completedAt: '2024-01-01T12:00:02Z'
                    durationInSeconds: 2
            chargeStop:
              summary: Charge stop
              value:
                data:
                  id: exec_u30M8e5ErKC8wPc5t3uTXw
                  type: command-execution
                  attributes:
                    commandType: charge-stop
                    status:
                      value: SUCCESS
                    executionMode: sync
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_u30M8e5ErKC8wPc5t3uTXw
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
                    completedAt: '2024-01-01T12:00:02Z'
                    durationInSeconds: 2
            chargeSetLimit:
              summary: Set charge limit
              value:
                data:
                  id: exec_u30M8e5ErKC8wPc5t3uTXw
                  type: command-execution
                  attributes:
                    commandType: charge-set-limit
                    status:
                      value: SUCCESS
                    executionMode: sync
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                    parameters:
                      percent: 80
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_u30M8e5ErKC8wPc5t3uTXw
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
                    completedAt: '2024-01-01T12:00:02Z'
                    durationInSeconds: 2
            securityLock:
              summary: Lock doors
              value:
                data:
                  id: exec_u30M8e5ErKC8wPc5t3uTXw
                  type: command-execution
                  attributes:
                    commandType: security-lock
                    status:
                      value: SUCCESS
                    executionMode: sync
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_u30M8e5ErKC8wPc5t3uTXw
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
                    completedAt: '2024-01-01T12:00:02Z'
                    durationInSeconds: 2
            securityUnlock:
              summary: Unlock doors
              value:
                data:
                  id: exec_u30M8e5ErKC8wPc5t3uTXw
                  type: command-execution
                  attributes:
                    commandType: security-unlock
                    status:
                      value: SUCCESS
                    executionMode: sync
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_u30M8e5ErKC8wPc5t3uTXw
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
                    completedAt: '2024-01-01T12:00:02Z'
                    durationInSeconds: 2
            navigationSetDestination:
              summary: Set navigation destination
              value:
                data:
                  id: exec_u30M8e5ErKC8wPc5t3uTXw
                  type: command-execution
                  attributes:
                    commandType: navigation-set-destination
                    status:
                      value: SUCCESS
                    executionMode: sync
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                    parameters:
                      latitude: 37.7749
                      longitude: -122.4194
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_u30M8e5ErKC8wPc5t3uTXw
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
                    completedAt: '2024-01-01T12:00:02Z'
                    durationInSeconds: 2
            pending:
              summary: In progress, within the wait time
              value:
                data:
                  id: exec_5VMuu6yNbuwNcf8ANim75g
                  type: command-execution
                  attributes:
                    commandType: charge-start
                    status:
                      value: PENDING
                    executionMode: sync
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_5VMuu6yNbuwNcf8ANim75g
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
            pendingAfterHandoff:
              summary: In progress after a 202
              value:
                data:
                  id: exec_5VMuu6yNbuwNcf8ANim75g
                  type: command-execution
                  attributes:
                    commandType: charge-start
                    status:
                      value: PENDING
                    executionMode: async
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_5VMuu6yNbuwNcf8ANim75g
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
            successAfterHandoff:
              summary: Succeeded after a 202
              value:
                data:
                  id: exec_5VMuu6yNbuwNcf8ANim75g
                  type: command-execution
                  attributes:
                    commandType: charge-start
                    status:
                      value: SUCCESS
                    executionMode: async
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_5VMuu6yNbuwNcf8ANim75g
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
                    completedAt: '2024-01-01T12:03:10Z'
                    durationInSeconds: 190
            failureAfterHandoff:
              summary: Failed after a 202
              value:
                data:
                  id: exec_5VMuu6yNbuwNcf8ANim75g
                  type: command-execution
                  attributes:
                    commandType: charge-start
                    status:
                      value: FAILURE
                      error:
                        status: '409'
                        type: VEHICLE_STATE
                        code: ASLEEP
                        title: Asleep
                        detail: >-
                          The vehicle is in a sleep state and temporarily unable
                          to perform your request.
                        links:
                          about: >-
                            https://smartcar.com/docs/errors/api-errors/v3/vehicle-state-errors#asleep
                    executionMode: async
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_5VMuu6yNbuwNcf8ANim75g
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
                    completedAt: '2024-01-01T12:03:10Z'
                    durationInSeconds: 190
            expired:
              summary: Expired — outcome unknown, can be retried
              value:
                data:
                  id: exec_5VMuu6yNbuwNcf8ANim75g
                  type: command-execution
                  attributes:
                    commandType: charge-start
                    status:
                      value: EXPIRED
                    executionMode: async
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_5VMuu6yNbuwNcf8ANim75g
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
            failure:
              summary: Failed
              value:
                data:
                  id: exec_5VMuu6yNbuwNcf8ANim75g
                  type: command-execution
                  attributes:
                    commandType: charge-start
                    status:
                      value: FAILURE
                      error:
                        status: '409'
                        type: VEHICLE_STATE
                        code: ASLEEP
                        title: Asleep
                        detail: >-
                          The vehicle is in a sleep state and temporarily unable
                          to perform your request.
                        links:
                          about: >-
                            https://smartcar.com/docs/errors/api-errors/v3/vehicle-state-errors#asleep
                    executionMode: sync
                    userId: user_789xyz
                    vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
                  links:
                    self: >-
                      https://vehicle.api.smartcar.com/v3/command-executions/exec_5VMuu6yNbuwNcf8ANim75g
                  meta:
                    executedAt: '2024-01-01T12:00:00Z'
                    requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
                    completedAt: '2024-01-01T12:00:04Z'
                    durationInSeconds: 4
    BadRequest2:
      description: 400 Bad Request
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: array
                minItems: 1
                items:
                  type: object
                  required:
                    - status
                    - type
                    - code
                    - title
                    - detail
                  properties:
                    status:
                      type: string
                    type:
                      type: string
                      enum:
                        - AUTHENTICATION
                        - BILLING
                        - COMPATIBILITY
                        - CONNECTED_SERVICES_ACCOUNT
                        - RATE_LIMIT
                        - RESOURCE_NOT_FOUND
                        - SERVER
                        - UPSTREAM
                        - VALIDATION
                        - VEHICLE_STATE
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
                    resolution:
                      type: object
                      description: >-
                        Optional field providing guidance on how to resolve the
                        error, if applicable. The structure of this object can
                        vary based on the error type and is intended to provide
                        actionable information to clients.
                      properties:
                        type:
                          type: string
                          description: >-
                            The type of resolution recommended (e.g.,
                            "RETRY_LATER", "CONTACT_SUPPORT", etc.)
                    suggestedUserMessage:
                      type: string
                      description: >-
                        Optional field providing a user-friendly message that
                        can be displayed to end-users, if applicable. This
                        message is intended to be easily understandable and
                        actionable for users who encounter the error.
                    links:
                      type: object
                      properties:
                        about:
                          type: string
                          format: uri
                    meta:
                      type: object
                      properties:
                        debug:
                          type: object
                          description: >
                            Information that helps Smartcar support investigate
                            this error. Include it when contacting support.
                            Clients should not parse it or build logic on it.
                          properties:
                            applicationId:
                              type: string
                              description: The unique identifier for the application
                            requestId:
                              type: string
                              description: >
                                Opaque support reference for this error; quote
                                it to support. May differ from `meta.requestId`.
                            origin:
                              type: string
                              description: The origin of the error
                          example:
                            applicationId: app_123abc
                            requestId: >-
                              8c2f7d1e-5b3a-4c9e-a1f2-3d4e5f6a7b8c:5d6e7f80-1a2b-4c3d-8e9f-0a1b2c3d4e5f
                            origin: internal.com/path
          example:
            errors:
              - status: '400'
                type: VALIDATION
                code: BAD_REQUEST
                title: Bad Request
                detail: >-
                  The request could not be understood by the server due to
                  malformed syntax.
                links:
                  about: >-
                    https://smartcar.com/docs/errors/api-errors/v3/validation-errors
    Unauthorized2:
      description: 401 Unauthorized
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: array
                minItems: 1
                items:
                  type: object
                  required:
                    - status
                    - type
                    - code
                    - title
                    - detail
                  properties:
                    status:
                      type: string
                    type:
                      type: string
                      enum:
                        - AUTHENTICATION
                        - BILLING
                        - COMPATIBILITY
                        - CONNECTED_SERVICES_ACCOUNT
                        - RATE_LIMIT
                        - RESOURCE_NOT_FOUND
                        - SERVER
                        - UPSTREAM
                        - VALIDATION
                        - VEHICLE_STATE
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
                    resolution:
                      type: object
                      description: >-
                        Optional field providing guidance on how to resolve the
                        error, if applicable. The structure of this object can
                        vary based on the error type and is intended to provide
                        actionable information to clients.
                      properties:
                        type:
                          type: string
                          description: >-
                            The type of resolution recommended (e.g.,
                            "RETRY_LATER", "CONTACT_SUPPORT", etc.)
                    suggestedUserMessage:
                      type: string
                      description: >-
                        Optional field providing a user-friendly message that
                        can be displayed to end-users, if applicable. This
                        message is intended to be easily understandable and
                        actionable for users who encounter the error.
                    links:
                      type: object
                      properties:
                        about:
                          type: string
                          format: uri
                    meta:
                      type: object
                      properties:
                        debug:
                          type: object
                          description: >
                            Information that helps Smartcar support investigate
                            this error. Include it when contacting support.
                            Clients should not parse it or build logic on it.
                          properties:
                            applicationId:
                              type: string
                              description: The unique identifier for the application
                            requestId:
                              type: string
                              description: >
                                Opaque support reference for this error; quote
                                it to support. May differ from `meta.requestId`.
                            origin:
                              type: string
                              description: The origin of the error
                          example:
                            applicationId: app_123abc
                            requestId: >-
                              8c2f7d1e-5b3a-4c9e-a1f2-3d4e5f6a7b8c:5d6e7f80-1a2b-4c3d-8e9f-0a1b2c3d4e5f
                            origin: internal.com/path
          example:
            errors:
              - status: '401'
                type: AUTHENTICATION
                code: UNAUTHORIZED
                title: Unauthorized
                detail: The Authorization token is missing or invalid.
                links:
                  about: >-
                    https://smartcar.com/docs/errors/api-errors/v3/authentication-errors#authentication
    Forbidden2:
      description: 403 Forbidden
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: array
                minItems: 1
                items:
                  type: object
                  required:
                    - status
                    - type
                    - code
                    - title
                    - detail
                  properties:
                    status:
                      type: string
                    type:
                      type: string
                      enum:
                        - AUTHENTICATION
                        - BILLING
                        - COMPATIBILITY
                        - CONNECTED_SERVICES_ACCOUNT
                        - RATE_LIMIT
                        - RESOURCE_NOT_FOUND
                        - SERVER
                        - UPSTREAM
                        - VALIDATION
                        - VEHICLE_STATE
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
                    resolution:
                      type: object
                      description: >-
                        Optional field providing guidance on how to resolve the
                        error, if applicable. The structure of this object can
                        vary based on the error type and is intended to provide
                        actionable information to clients.
                      properties:
                        type:
                          type: string
                          description: >-
                            The type of resolution recommended (e.g.,
                            "RETRY_LATER", "CONTACT_SUPPORT", etc.)
                    suggestedUserMessage:
                      type: string
                      description: >-
                        Optional field providing a user-friendly message that
                        can be displayed to end-users, if applicable. This
                        message is intended to be easily understandable and
                        actionable for users who encounter the error.
                    links:
                      type: object
                      properties:
                        about:
                          type: string
                          format: uri
                    meta:
                      type: object
                      properties:
                        debug:
                          type: object
                          description: >
                            Information that helps Smartcar support investigate
                            this error. Include it when contacting support.
                            Clients should not parse it or build logic on it.
                          properties:
                            applicationId:
                              type: string
                              description: The unique identifier for the application
                            requestId:
                              type: string
                              description: >
                                Opaque support reference for this error; quote
                                it to support. May differ from `meta.requestId`.
                            origin:
                              type: string
                              description: The origin of the error
                          example:
                            applicationId: app_123abc
                            requestId: >-
                              8c2f7d1e-5b3a-4c9e-a1f2-3d4e5f6a7b8c:5d6e7f80-1a2b-4c3d-8e9f-0a1b2c3d4e5f
                            origin: internal.com/path
          example:
            errors:
              - status: '403'
                type: AUTHENTICATION
                code: FORBIDDEN
                title: Forbidden
                detail: You do not have permission to access this resource.
                links:
                  about: >-
                    https://smartcar.com/docs/errors/api-errors/v3/authentication-errors
    NotFound2:
      description: 404 Not Found
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: array
                minItems: 1
                items:
                  type: object
                  required:
                    - status
                    - type
                    - code
                    - title
                    - detail
                  properties:
                    status:
                      type: string
                    type:
                      type: string
                      enum:
                        - AUTHENTICATION
                        - BILLING
                        - COMPATIBILITY
                        - CONNECTED_SERVICES_ACCOUNT
                        - RATE_LIMIT
                        - RESOURCE_NOT_FOUND
                        - SERVER
                        - UPSTREAM
                        - VALIDATION
                        - VEHICLE_STATE
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
                    resolution:
                      type: object
                      description: >-
                        Optional field providing guidance on how to resolve the
                        error, if applicable. The structure of this object can
                        vary based on the error type and is intended to provide
                        actionable information to clients.
                      properties:
                        type:
                          type: string
                          description: >-
                            The type of resolution recommended (e.g.,
                            "RETRY_LATER", "CONTACT_SUPPORT", etc.)
                    suggestedUserMessage:
                      type: string
                      description: >-
                        Optional field providing a user-friendly message that
                        can be displayed to end-users, if applicable. This
                        message is intended to be easily understandable and
                        actionable for users who encounter the error.
                    links:
                      type: object
                      properties:
                        about:
                          type: string
                          format: uri
                    meta:
                      type: object
                      properties:
                        debug:
                          type: object
                          description: >
                            Information that helps Smartcar support investigate
                            this error. Include it when contacting support.
                            Clients should not parse it or build logic on it.
                          properties:
                            applicationId:
                              type: string
                              description: The unique identifier for the application
                            requestId:
                              type: string
                              description: >
                                Opaque support reference for this error; quote
                                it to support. May differ from `meta.requestId`.
                            origin:
                              type: string
                              description: The origin of the error
                          example:
                            applicationId: app_123abc
                            requestId: >-
                              8c2f7d1e-5b3a-4c9e-a1f2-3d4e5f6a7b8c:5d6e7f80-1a2b-4c3d-8e9f-0a1b2c3d4e5f
                            origin: internal.com/path
          example:
            errors:
              - status: '404'
                type: RESOURCE_NOT_FOUND
                code: NOT_FOUND
                title: Not Found
                detail: The requested resource could not be found.
                links:
                  about: >-
                    https://smartcar.com/docs/errors/api-errors/v3/resource-not-found-errors
    TooManyRequests:
      description: 429 Too Many Requests
      headers:
        retry-after:
          description: Number of seconds to wait before retrying the request.
          schema:
            type: integer
          example: 60
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: array
                minItems: 1
                items:
                  type: object
                  required:
                    - status
                    - type
                    - code
                    - title
                    - detail
                  properties:
                    status:
                      type: string
                    type:
                      type: string
                      enum:
                        - AUTHENTICATION
                        - BILLING
                        - COMPATIBILITY
                        - CONNECTED_SERVICES_ACCOUNT
                        - RATE_LIMIT
                        - RESOURCE_NOT_FOUND
                        - SERVER
                        - UPSTREAM
                        - VALIDATION
                        - VEHICLE_STATE
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
                    resolution:
                      type: object
                      description: >-
                        Optional field providing guidance on how to resolve the
                        error, if applicable. The structure of this object can
                        vary based on the error type and is intended to provide
                        actionable information to clients.
                      properties:
                        type:
                          type: string
                          description: >-
                            The type of resolution recommended (e.g.,
                            "RETRY_LATER", "CONTACT_SUPPORT", etc.)
                    suggestedUserMessage:
                      type: string
                      description: >-
                        Optional field providing a user-friendly message that
                        can be displayed to end-users, if applicable. This
                        message is intended to be easily understandable and
                        actionable for users who encounter the error.
                    links:
                      type: object
                      properties:
                        about:
                          type: string
                          format: uri
                    meta:
                      type: object
                      properties:
                        debug:
                          type: object
                          description: >
                            Information that helps Smartcar support investigate
                            this error. Include it when contacting support.
                            Clients should not parse it or build logic on it.
                          properties:
                            applicationId:
                              type: string
                              description: The unique identifier for the application
                            requestId:
                              type: string
                              description: >
                                Opaque support reference for this error; quote
                                it to support. May differ from `meta.requestId`.
                            origin:
                              type: string
                              description: The origin of the error
                          example:
                            applicationId: app_123abc
                            requestId: >-
                              8c2f7d1e-5b3a-4c9e-a1f2-3d4e5f6a7b8c:5d6e7f80-1a2b-4c3d-8e9f-0a1b2c3d4e5f
                            origin: internal.com/path
          example:
            errors:
              - status: '429'
                type: RATE_LIMIT
                code: SMARTCAR_API
                title: Too Many Requests
                detail: >-
                  You have reached the throttling rate limit for this vehicle.
                  Please see the retry-after header for when to retry the
                  request.
                links:
                  about: >-
                    https://smartcar.com/docs/errors/api-errors/v3/rate-limit-errors
    InternalError2:
      description: 500 Internal Server Error
      content:
        application/json:
          schema:
            type: object
            required:
              - errors
            properties:
              errors:
                type: array
                minItems: 1
                items:
                  type: object
                  required:
                    - status
                    - type
                    - code
                    - title
                    - detail
                  properties:
                    status:
                      type: string
                    type:
                      type: string
                      enum:
                        - AUTHENTICATION
                        - BILLING
                        - COMPATIBILITY
                        - CONNECTED_SERVICES_ACCOUNT
                        - RATE_LIMIT
                        - RESOURCE_NOT_FOUND
                        - SERVER
                        - UPSTREAM
                        - VALIDATION
                        - VEHICLE_STATE
                    code:
                      type: string
                    title:
                      type: string
                    detail:
                      type: string
                    resolution:
                      type: object
                      description: >-
                        Optional field providing guidance on how to resolve the
                        error, if applicable. The structure of this object can
                        vary based on the error type and is intended to provide
                        actionable information to clients.
                      properties:
                        type:
                          type: string
                          description: >-
                            The type of resolution recommended (e.g.,
                            "RETRY_LATER", "CONTACT_SUPPORT", etc.)
                    suggestedUserMessage:
                      type: string
                      description: >-
                        Optional field providing a user-friendly message that
                        can be displayed to end-users, if applicable. This
                        message is intended to be easily understandable and
                        actionable for users who encounter the error.
                    links:
                      type: object
                      properties:
                        about:
                          type: string
                          format: uri
                    meta:
                      type: object
                      properties:
                        debug:
                          type: object
                          description: >
                            Information that helps Smartcar support investigate
                            this error. Include it when contacting support.
                            Clients should not parse it or build logic on it.
                          properties:
                            applicationId:
                              type: string
                              description: The unique identifier for the application
                            requestId:
                              type: string
                              description: >
                                Opaque support reference for this error; quote
                                it to support. May differ from `meta.requestId`.
                            origin:
                              type: string
                              description: The origin of the error
                          example:
                            applicationId: app_123abc
                            requestId: >-
                              8c2f7d1e-5b3a-4c9e-a1f2-3d4e5f6a7b8c:5d6e7f80-1a2b-4c3d-8e9f-0a1b2c3d4e5f
                            origin: internal.com/path
          example:
            errors:
              - status: '500'
                type: SERVER
                code: INTERNAL
                title: Internal Server Error
                detail: An unexpected error occurred on the server.
                links:
                  about: https://smartcar.com/docs/errors/api-errors/v3/server-errors
  schemas:
    CommandResponse:
      type: object
      description: Response for a command operation.
      required:
        - data
      properties:
        data:
          type: object
          required:
            - id
            - type
            - attributes
            - links
            - meta
          properties:
            id:
              type: string
              description: >
                The identifier of the execution for this command on this
                vehicle, for this application and user. It does not identify a
                single request: every request for the same command, vehicle,
                application and user returns the same id, whatever its
                parameters. The execution reflects the most recent operation for
                that combination, and each new operation replaces the previous
                one.
              example: exec_u30M8e5ErKC8wPc5t3uTXw
            type:
              type: string
              enum:
                - command-execution
              description: Resource type, always "command-execution".
            attributes:
              $ref: '#/components/schemas/CommandAttributes'
            links:
              type: object
              required:
                - self
              properties:
                self:
                  type: string
                  format: uri
                  description: >
                    The execution resource for this command. GET this URL to
                    check the operation's status.
                  example: >-
                    https://vehicle.api.smartcar.com/v3/command-executions/exec_u30M8e5ErKC8wPc5t3uTXw
            meta:
              $ref: '#/components/schemas/ExecutionMeta'
      example:
        data:
          id: exec_u30M8e5ErKC8wPc5t3uTXw
          type: command-execution
          attributes:
            commandType: charge-start
            status:
              value: SUCCESS
            executionMode: sync
            userId: user_789xyz
            vehicleId: 36ab27d0-fd9d-4455-823a-ce30af709ffc
          links:
            self: >-
              https://vehicle.api.smartcar.com/v3/command-executions/exec_u30M8e5ErKC8wPc5t3uTXw
          meta:
            executedAt: '2024-01-01T12:00:00Z'
            requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
            completedAt: '2024-01-01T12:00:02Z'
            durationInSeconds: 2
    CommandAttributes:
      type: object
      required:
        - commandType
        - status
        - executionMode
        - userId
        - vehicleId
      properties:
        commandType:
          $ref: '#/components/schemas/CommandType'
          description: The type of command that was executed.
        userId:
          type: string
          readOnly: true
          description: >
            The id of the vehicle user on whose behalf the command was executed.
            Reported in the response only.
          example: user_789xyz
        vehicleId:
          type: string
          readOnly: true
          description: >
            The id of the vehicle the command was executed on. Reported in the
            response only.
          example: 36ab27d0-fd9d-4455-823a-ce30af709ffc
        status:
          $ref: '#/components/schemas/ExecutionStatus'
        executionMode:
          type: string
          enum:
            - sync
            - async
          readOnly: true
          description: >
            `sync`: the outcome was returned in the response to the original
            request. `async`: the original request returned `202`, so the
            outcome had to be read by polling this execution. Reported in the
            response only — callers cannot specify this.
        parameters:
          description: >-
            The parameters submitted with the command. Present only for
            `charge-set-limit` and `navigation-set-destination`.
          oneOf:
            - $ref: '#/components/schemas/ChargeLimitParameters'
            - $ref: '#/components/schemas/NavigationParameters'
    ExecutionMeta:
      type: object
      required:
        - executedAt
        - requestId
      properties:
        executedAt:
          type: string
          format: date-time
          description: ISO 8601 UTC timestamp when the operation started.
        requestId:
          type: string
          readOnly: true
          description: >
            The `X-Amzn-Requestid` response header value of the call that
            initiated the operation described in this execution.
        completedAt:
          type: string
          format: date-time
          description: >
            ISO 8601 UTC timestamp when the operation completed. Absent while
            `status.value` is `PENDING` or `EXPIRED`.
        durationInSeconds:
          type: integer
          description: >
            Elapsed time from the operation's start to its completion, in
            seconds. Absent while `status.value` is `PENDING` or `EXPIRED`.
      example:
        executedAt: '2024-01-01T12:00:00Z'
        requestId: 3f9a2c1b-7d4e-4b8a-9c6f-1e2d3a4b5c6d
        completedAt: '2024-01-01T12:00:02Z'
        durationInSeconds: 2
    CommandType:
      type: string
      description: Command type.
      enum:
        - charge-start
        - charge-stop
        - charge-set-limit
        - security-lock
        - security-unlock
        - navigation-set-destination
        - charge-port-open
        - charge-port-close
    ExecutionStatus:
      type: object
      required:
        - value
      properties:
        value:
          type: string
          description: >
            The state of the operation.

            - `PENDING`: the operation is in progress.

            - `SUCCESS`: the operation completed successfully.

            - `FAILURE`: the operation failed. `error` describes why.

            - `EXPIRED`: the operation didn't record a result within the time
            allowed, so the outcome is unknown: it may or may not have taken
            effect on the vehicle. It no longer blocks other requests, so you
            can retry it.
          enum:
            - SUCCESS
            - FAILURE
            - PENDING
            - EXPIRED
        error:
          $ref: '#/components/schemas/ExecutionError'
      example:
        value: SUCCESS
    ChargeLimitParameters:
      description: The parameters submitted with the command, returned in the response.
      allOf:
        - $ref: '#/components/schemas/ChargeLimitAttributes'
      example:
        percent: 80
    NavigationParameters:
      description: The parameters submitted with the command, returned in the response.
      allOf:
        - $ref: '#/components/schemas/NavigationPoint'
      example:
        latitude: 37.7749
        longitude: -122.4194
    ExecutionError:
      type: object
      description: >-
        Error details present when `status.value` is `FAILURE`. Failure details
        appear here only when the execution resource is read through the
        execution GET, e.g. after a 202. A request that fails within the wait
        time is answered with the error's HTTP status and an `ErrorResponse`.
      required:
        - status
        - type
        - code
      properties:
        status:
          type: string
        type:
          type: string
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        links:
          type: object
          properties:
            about:
              type: string
              format: uri
        resolution:
          type: object
          description: Guidance on resolving the error. Structure varies by error type.
          additionalProperties: true
        suggestedUserMessage:
          type: string
          description: A user-facing message that can be displayed directly to end users.
    ChargeLimitAttributes:
      type: object
      required:
        - percent
      properties:
        percent:
          type: integer
          minimum: 50
          maximum: 100
          description: The desired charge limit percentage (50-100)
      example:
        percent: 80
    NavigationPoint:
      type: object
      description: Geographic point
      required:
        - latitude
        - longitude
      properties:
        latitude:
          type: number
          format: double
          minimum: -90
          maximum: 90
          description: The latitude coordinate of the location point (-90 to 90)
        longitude:
          type: number
          format: double
          minimum: -180
          maximum: 180
          description: The longitude coordinate of the location point (-180 to 180)
      example:
        latitude: 37.7749
        longitude: -122.4194
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or opaque
      description: |
        The Authorization header must be provided with a valid bearer token.
        Example: `Authorization: Bearer {token}`

````