Sheeva Driver API

The Driver API from Sheeva — 5 operation(s) for driver.

OpenAPI Specification

sheeva-driver-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: SheevaConnect Authentication Driver 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: Driver
paths:
  /v2/partner-apis/drivers:
    post:
      summary: Register Driver
      operationId: registerDriver
      tags:
      - Driver
      responses:
        '201':
          description: OK
          content:
            application/json:
              example:
                countryCode: '91'
                phoneNumber: '5556789999'
                firstName: John
                lastName: Smith
                email: jsmith@email.com
                driverId: dri_partner_B8vR4R4vFsDoX3sg3W7z
                salutation: Mr.
                addressDetails:
                  address1: 1234 S 32 Birla Towers
                  address2: Jagat Nagar
                  city: New Delhi
                  district: Okhla
                  state: Delhi
                  postalCode: '249408'
      description: 'This request allows to add a driver profile.

        If successful, returns: HTTP 201 CREATED.

        '
      parameters:
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
      requestBody:
        content:
          application/json:
            example:
              countryCode: '1'
              phoneNumber: '81342424242'
              email: jdoe@email.com
              firstName: John
              lastName: Doe
              birthDate: 21-05-1981
              gender: Male
              postalCode: '249408'
              driverId: dri_partner_B8vR4R4vFsDoX3sg3W7z
              salutation: Mr.
              city: New Delhi
              district: Okhla
              state: Delhi
              address1: 1234 S 32 Birla Towers
              address2: Jagat Nagar
  /v2/partner-apis/drivers/{driverId}:
    get:
      summary: Get List of Linked Vehicles to a Driver (Deprecated)
      operationId: getListOfLinkedVehiclesToADriver
      tags:
      - Driver
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
                phoneNumber: '8134242424'
                countryCode: '1'
                firstName: John
                lastName: Doe
                email: john.doe@gmail.com
                driverId: dri_partner_B8vR4R4vFsDoX3sg3W7z
                active: true
      parameters:
      - name: driverId
        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 Driver
      operationId: updateDriver
      tags:
      - Driver
      responses:
        '200':
          description: Response
          content:
            application/json:
              example:
                countryCode: '1'
                phoneNumber: '5556789999'
                firstName: John
                lastName: Smith
                email: jsmith@email.com
                driverId: dri_partner_B8vR4R4vFsDoX3sg3W7z
                active: true
                salutation: Mr.
                addressDetails:
                  address1: 1234 S 32 Birla Towers
                  address2: Jagat Nagar
                  city: New Delhi
                  district: Okhla
                  state: Delhi
                  postalCode: '249408'
                referralPhoneNumber: '8290808122'
                referralCode: POIQWE123
                referredByMerchant: '123454321'
                referredByFSM: '9908083242'
      description: 'This request allows you to update details of a driver profile.

        If successful, returns HTTP 200 OK.

        '
      parameters:
      - name: driverId
        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:
              countryCode: '1'
              phoneNumber: '81342424242'
              email: jdoe@gmail.com
              firstName: John
              lastName: Doe
              active: true
              salutation: Mr.
              referralPhoneNumber: '8290808122'
              referralCode: POIQWE123
              city: New Delhi
              district: Okhla
              state: Delhi
              address1: 1234 S 32 Birla Towers
              address2: Jagat Nagar
              postalCode: '249408'
              referredByMerchant: '123454321'
              referredByFSM: '9908083242'
  /v2/partner-apis/drivers/{driverId}/details:
    get:
      summary: Get Driver Details
      operationId: getDriverDetails
      tags:
      - Driver
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                driver:
                  countryCode: '1'
                  phoneNumber: '8134242424'
                  email: john.doe@gmail.com
                  firstName: John
                  lastName: Doe
                  driverId: dri_partner_B8vR4R4vFsDoX3sg3W7z
                  active: true
                  salutation: Mr.
                  referralPhoneNumber: '8290808122'
                  referralCode: POIQWE123
                  addressDetails:
                    address1: 1234 S 32 Birla Towers
                    address2: Jagat Nagar
                    city: New Delhi
                    district: Okhla
                    state: Delhi
                    postalCode: '249408'
                  referredByMerchant: '123454321'
                  referredByFSM: '9908083242'
                pairedVehicles:
                - vin: WBA33AG07PCM25883
                  licensePlate: ABI712G
                  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
                activeSessions:
                - serviceType: PARKING
                  id: AYABeImAH0a9_i6wb32thzMkTYQAHQABAAdTZXJ2aWNlABBDb2duaXRvVXNlclBvb2xzAAEAB2F3cy1rbXMATGFybjphd3M6a21zOmFwLXNvd...
                - serviceType: CHARGING
                  id: AYABeImAH0a9_i6wb32thzMkTYQAHQABAAdTZXJ2aWNlABBDb2duaXRvVXNlclBvb2xzAAEAB2F3cy1rbXMATGFybjphd3M6a21zOmFwLdsgsgsg...
      description: 'This request returns driver details, associated vehicles and any active sessions. This is a convinience request that combines the resources: driver, vehicle, and a possible array of sessions.

        If successful, returns: HTTP 200 OK.

        '
      parameters:
      - name: driverId
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
  /v2/partner-apis/drivers/{driverId}/link:
    post:
      summary: Link Driver to a Vehicle
      operationId: linkDriverToAVehicle
      tags:
      - Driver
      responses:
        '201':
          description: Created
      description: 'This API allows drivers to be paired with one of the vehicles. Once paired, this driver would be sent all notifications for this vehicle.

        If successful, returns: HTTP 201 CREATED.

        '
      parameters:
      - name: driverId
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
    delete:
      summary: Unlink Driver from a Vehicle
      operationId: unlinkDriverFromAVehicle
      tags:
      - Driver
      responses:
        '200':
          description: OK
      description: 'This API allows drivers to unpair an already paired vehicle. Once unpaired, this driver would no longer be sent any notifications for this vehicle.

        If successful, returns: HTTP 200 OK.

        '
      parameters:
      - name: driverId
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
  /v2/partner-apis/drivers/{driverId}/drive:
    post:
      summary: Mark Driver as current Driver for a Vehicle
      operationId: markDriverAsCurrentDriverForAVehicle
      tags:
      - Driver
      responses:
        '201':
          description: Response
      description: 'This request allows to mark the driver as current driver for the Vehicle

        If successful, returns: HTTP 201 CREATED.

        '
      parameters:
      - name: driverId
        in: path
        required: true
        schema:
          type: string
      - name: x-sheeva-program-code
        in: header
        required: true
        schema:
          type: string
        description: Provided by Sheeva
    delete:
      summary: Remove Driver as Current driver for a vehicle
      operationId: removeDriverAsCurrentDriverForAVehicle
      tags:
      - Driver
      responses:
        '200':
          description: Response
      description: 'This request allows to unmark the driver as current driver for the Vehicle

        if successful it will return HTTP Status Code 200

        '
      parameters:
      - name: driverId
        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.