Sheeva Vehicle API

The Vehicle API from Sheeva — 3 operation(s) for vehicle.

OpenAPI Specification

sheeva-vehicle-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: SheevaConnect Authentication Vehicle API
  version: '2.0'
  description: 'This SheevaConnect™ API Specification 2.0 is © 2024 Parkofon Inc. (d/b/a Sheeva.AI) and is proprietary information that may not be duplicated, redistributed, form the basis of derivative works, or publicly performed/displayed without the expressed written permission of Sheeva.AI. If you wish to use the SheevaConnect™ API Specification 2.0 and use the SheevaConnect™ cloud platform, please contact Sheeva.AI for a license.

    SheevaConnect APIs enable connected vehicle payments & last-mile services for various use cases including Fueling, EV Charging, Parking and Retail. This solution allows automated & contactless payment in addition to proactive identification of user needs and last-mile navigation to the nearest Sheeva Pay enabled outlets.

    All APIs follow HTTP status codes, return HTTP 200 OK when successful and following HTTP errors with a message. The message is self explaining to indicate the error in request. The example error codes include :




    Error Code

    Message





    400

    Bad Request : Check the parameter values



    404

    Resource not found



    500

    Internal Server Error




    SheevaConnect creates a session when system detects that vehicle requires a service (FUEL, CHARGING, PARKING). Each session goes through various statuses.

    Session Status Codes




    Status

    Description





    LOW_FUEL_DETECTED

    If vehicle was low on fuel and system has sent the notification to driver for low fuel or if vehicle is not low on fuel but driver clicks on fuel icon to pay.



    LOW_CHARGE_DETECTED

    If vehicle was low on charge and system has sent the notification to driver for low charged or if vehicle is not low on chrage but driver clicks on charge icon to pay.



    AT_SERVICE_HUB

    The driver has reached the fuel station / EV charge station / etc.



    AT_SERVICE_POINT

    The driver is at fuel pump / charging bay.



    SERVICE_POINT_CONFIRMED

    Driver confirms the fuel pump / charging bay.



    SERVICE_IN_PROGRESS

    When driver uses a parking service and vehicle is parked



    SERVICE_COMPLETE

    When user marks the fuel, charging, parking complete



    SERVICE_CANCELLED_BY_DRIVER

    When user cancel the service at the pump/ charging bay



    SERVICE_ABORTED_BY_SYSTEM

    When user does opt for service and move away from fuel pump/ charging bay




    Payment Status Codes




    Status

    Description





    PAYMENT_AUTHORIZED

    When a payment is authorized. Only applicable for Credit Card, Wallet and Rewards.



    PAYMENT_INITIATED

    When a payment is in progress. Only applicable for UPI in India.



    PAYMENT_COMPLETE

    Payment has been processed for a g'
  contact:
    name: Sheeva.AI
    url: https://sheeva.ai/contact-us
  x-company: Parkofon Inc. (d/b/a Sheeva.AI)
servers:
- url: https://us-apis.sheeva.ai
  description: Production (USA)
- url: https://in-apis.sheeva.ai
  description: Production (India)
- url: https://dev-us-apis.sheeva.ai
  description: Sandbox (USA)
- url: https://dev-in-apis.sheeva.ai
  description: Sandbox (India)
security:
- bearerAuth: []
tags:
- name: Vehicle
paths:
  /v2/partner-apis/vehicles:
    get:
      summary: Search Vehicles
      operationId: searchVehicles
      tags:
      - Vehicle
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
              - vin: WBA33AG07PCM25883
                licensePlate: ABI712G
                make: BMW
                model: 530e
                year: '2023'
                color: RED
                fuelTypes:
                - PETROL
                - ELECTRIC
                connectorType: J1772
                active: true
              - vin: WP0CB298X4U661674
                licensePlate: SDM606E
                make: Porsche
                model: Boxster
                year: '2004'
                color: YELLOW
                fuelTypes:
                - PETROL
                active: true
              - vin: WBY43AW04PFP67880
                licensePlate: Y657567
                make: BMW
                model: i4 eDrive35
                year: '2023'
                color: WHITE
                fuelTypes:
                - ELECTRIC
                connectorType: J1772
                active: true
      description: 'This request returns vehicles that match the criteria provided in the query parameters. Returns an array of vehicles matching any search criteria. If no matches were found, returns an empty array.

        If successful, returns: HTTP 200 OK.

        '
      parameters:
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
    post:
      summary: Register Vehicle
      operationId: registerVehicle
      tags:
      - Vehicle
      responses:
        '201':
          description: Created
          content:
            application/json:
              example:
                vin: WBA33AG07PCM25883
                licensePlate: MH 01 AB 1234
                make: BMW
                model: 530e
                year: '2023'
                color: RED
                fuelTypes:
                - PETROL
                - ELECTRIC
                connectorType: J1772
                active: true
                registrationCertificateDueOn: 21-05-2024
                pucDueOn: 15-05-2024
                insuranceDueOn: 17-09-2024
                vehicleServiceDueOn: 21-12-2024
        '409':
          description: Conflict
          content:
            application/json:
              example:
                vin: WBA33AG07PCM25883
                licensePlate: MH 01 AB 1234
                make: BMW
                model: 530e
                year: '2023'
                color: RED
                fuelTypes:
                - PETROL
                - ELECTRIC
                connectorType: J1772
                programCode: program.code
                active: true
      description: 'This request allows you to register a vehicle.

        If the vehicle was not previously added and successfully added, the endpoint returns: HTTP 201 CREATED.

        If the vehicle is already registered (i.e., same VIN and license plate), the endpoint returns: HTTP 409 CONFLICT along with the existing vehicle in the response. The existing vehicle''s id is also present in the Location header.

        '
      parameters:
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
      requestBody:
        content:
          application/json:
            example:
              vin: WBA33AG07PCM25883
              licensePlate: MH 01 AB 1234
              make: BMW
              model: 530e
              year: '2023'
              color: RED
              fuelTypes:
              - PETROL
              - ELECTRIC
              connectorType: J1772
              active: true
              registrationCertificateDueOn: 21-05-2024
              pucDueOn: 15-05-2024
              insuranceDueOn: 17-09-2024
              vehicleServiceDueOn: 21-12-2024
              demoMode: 0
  /v2/partner-apis/vehicles/{vin}:
    get:
      summary: Get a Vehicle
      operationId: getAVehicle
      tags:
      - Vehicle
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                vin: WBA33AG07PCM25883
                licensePlate: ABC123
                make: BMW
                model: 530e
                year: '2023'
                color: RED
                fuelTypes:
                - PETROL
                - ELECTRIC
                connectorType: J1772
                active: true
                registrationCertificateDueOn: 21-05-2024
                pucDueOn: 15-05-2024
                insuranceDueOn: 17-09-2024
                vehicleServiceDueOn: 21-12-2024
      description: 'This request allows you fetch a vehicle based on the vehicle identifier.

        If successful, returns HTTP 200 OK.

        If vehicle identifier is not found, returns HTTP 404 NOT FOUND.

        '
      parameters:
      - name: vin
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
    patch:
      summary: Update Vehicle
      operationId: updateVehicle
      tags:
      - Vehicle
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
                vin: WBA33AG07PCM25883
                licensePlate: MH 01 AB 1234
                make: BMW
                model: 530e
                year: '2023'
                color: RED
                fuelTypes:
                - PETROL
                - ELECTRIC
                connectorType: J1772
                active: true
                registrationCertificateDueOn: 21-05-2024
                pucDueOn: 15-05-2024
                insuranceDueOn: 17-09-2024
                vehicleServiceDueOn: 21-12-2024
      description: 'This request allows you to update details of a vehicle.

        If successful, returns HTTP 200 OK.

        '
      parameters:
      - name: vin
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
      requestBody:
        content:
          application/json:
            example:
              licensePlate: MH 01 AB 1234
              make: BMW
              model: 530e
              year: '2023'
              color: RED
              fuelTypes:
              - PETROL
              - ELECTRIC
              connectorType: J1772
              active: true
              registrationCertificateDueOn: 21-05-2024
              pucDueOn: 15-05-2024
              insuranceDueOn: 17-09-2024
              vehicleServiceDueOn: 21-12-2024
              demoMode: 0
  /v2/partner-apis/vehicles/{vin}/drivers:
    get:
      summary: Get Drivers by VIN
      operationId: getDriversByVin
      tags:
      - Vehicle
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
                licensePlate: MH 01 AA 0001
                make: JEEP
                model: Compass
                year: '2023'
                color: RED
                fuelTypes:
                - PETROL
                connectorType: OBD2
                active: true
                driving: false
                drivers:
                - phoneNumber: '9898989898'
                  countryCode: '91'
                  firstName: John
                  lastName: Den
                  email: jden@gmail.com
                  driverId: dri_partner_ndga2jbavWtdJB6gT9Jl
                  active: true
                vin: MCAAJPBH3JFA12345
      parameters:
      - name: vin
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token obtained from GET /v2/auth (exchange client-id/client-secret), sent in the Authorization header.
    clientCredentials:
      type: apiKey
      in: header
      name: client-id
      description: client-id + client-secret headers on GET /v2/auth to obtain an access token.