Acko APIs API

The APIs API from Acko — 3 operation(s) for apis.

OpenAPI Specification

acko-apis-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: Insurance policies issued by Acko General Insurance (https://www.acko.com) can be fetched by the citizens in their Digilocker accounts.
  termsOfService: https://apisetu.gov.in/terms.php
  title: Acko General Insurance Limited APIs API
  version: 3.0.0
  x-apisguru-categories:
  - open_data
  x-origin:
  - format: openapi
    url: https://apisetu.gov.in/api_specification_v8/acko.yaml
    version: '3.0'
  x-providerName: apisetu.gov.in
  x-serviceName: acko
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_apis.guru_assets_images_no-logo.svg
servers:
- url: https://apisetu.gov.in/acko/v3
tags:
- name: APIs
paths:
  /cripc/certificate:
    post:
      description: API to verify Insurance Policy - Car.
      operationId: cripc
      requestBody:
        content:
          application/json:
            schema:
              properties:
                certificateParameters:
                  properties:
                    phoneno:
                      description: Phone Number
                      example: 10 Digits without any prefix
                      type: string
                    policyno:
                      description: Policy Number
                      example: DXXXXXXXXXXXXX/XX OR AROGXXXXXXXXXX
                      type: string
                  required:
                  - policyno
                  - phoneno
                  type: object
                consentArtifact:
                  $ref: '#/components/schemas/ConsentArtifactSchema'
                format:
                  description: The format of the certificate in response.
                  enum:
                  - pdf
                  type: string
                txnId:
                  description: A unique transaction id for this request in UUID format. It is used for tracking the request.
                  example: f7f1469c-29b0-4325-9dfc-c567200a70f7
                  format: uuid
                  type: string
              required:
              - txnId
              - format
              type: object
        description: Request format
      responses:
        '200':
          content:
            application/pdf:
              example: Response body contains contents of the certificate in PDF format.
          description: The certificate data in response body in PDF, XML or JSON format as requested in format parameter.
        '400':
          $ref: '#/components/responses/400Error'
        '401':
          $ref: '#/components/responses/401Error'
        '404':
          $ref: '#/components/responses/404Error'
        '500':
          $ref: '#/components/responses/500Error'
        '502':
          $ref: '#/components/responses/502Error'
        '503':
          $ref: '#/components/responses/503Error'
        '504':
          $ref: '#/components/responses/504Error'
      security:
      - apiKey: []
        clientId: []
      summary: Insurance Policy - Car
      tags:
      - APIs
  /hlipc/certificate:
    post:
      description: API to verify Insurance Policy - Health.
      operationId: hlipc
      requestBody:
        content:
          application/json:
            schema:
              properties:
                certificateParameters:
                  properties:
                    phoneno:
                      description: Phone Number
                      example: 10 Digits without any prefix
                      type: string
                    policyno:
                      description: Policy Number
                      example: DXXXXXXXXXXXXX/XX OR AROGXXXXXXXXXX
                      type: string
                  required:
                  - policyno
                  - phoneno
                  type: object
                consentArtifact:
                  $ref: '#/components/schemas/ConsentArtifactSchema'
                format:
                  description: The format of the certificate in response.
                  enum:
                  - pdf
                  type: string
                txnId:
                  description: A unique transaction id for this request in UUID format. It is used for tracking the request.
                  example: f7f1469c-29b0-4325-9dfc-c567200a70f7
                  format: uuid
                  type: string
              required:
              - txnId
              - format
              type: object
        description: Request format
      responses:
        '200':
          content:
            application/pdf:
              example: Response body contains contents of the certificate in PDF format.
          description: The certificate data in response body in PDF, XML or JSON format as requested in format parameter.
        '400':
          $ref: '#/components/responses/400Error'
        '401':
          $ref: '#/components/responses/401Error'
        '404':
          $ref: '#/components/responses/404Error'
        '500':
          $ref: '#/components/responses/500Error'
        '502':
          $ref: '#/components/responses/502Error'
        '503':
          $ref: '#/components/responses/503Error'
        '504':
          $ref: '#/components/responses/504Error'
      security:
      - apiKey: []
        clientId: []
      summary: Insurance Policy - Health
      tags:
      - APIs
  /twipc/certificate:
    post:
      description: API to verify Insurance Policy - Two Wheeler.
      operationId: twipc
      requestBody:
        content:
          application/json:
            schema:
              properties:
                certificateParameters:
                  properties:
                    phoneno:
                      description: Phone Number
                      example: 10 Digits without any prefix
                      type: string
                    policyno:
                      description: Policy Number
                      example: DXXXXXXXXXXXXX/XX OR AROGXXXXXXXXXX
                      type: string
                  required:
                  - policyno
                  - phoneno
                  type: object
                consentArtifact:
                  $ref: '#/components/schemas/ConsentArtifactSchema'
                format:
                  description: The format of the certificate in response.
                  enum:
                  - pdf
                  type: string
                txnId:
                  description: A unique transaction id for this request in UUID format. It is used for tracking the request.
                  example: f7f1469c-29b0-4325-9dfc-c567200a70f7
                  format: uuid
                  type: string
              required:
              - txnId
              - format
              type: object
        description: Request format
      responses:
        '200':
          content:
            application/pdf:
              example: Response body contains contents of the certificate in PDF format.
          description: The certificate data in response body in PDF, XML or JSON format as requested in format parameter.
        '400':
          $ref: '#/components/responses/400Error'
        '401':
          $ref: '#/components/responses/401Error'
        '404':
          $ref: '#/components/responses/404Error'
        '500':
          $ref: '#/components/responses/500Error'
        '502':
          $ref: '#/components/responses/502Error'
        '503':
          $ref: '#/components/responses/503Error'
        '504':
          $ref: '#/components/responses/504Error'
      security:
      - apiKey: []
        clientId: []
      summary: Insurance Policy - Two Wheeler
      tags:
      - APIs
components:
  responses:
    500Error:
      content:
        application/json:
          schema:
            properties:
              error:
                enum:
                - internal_server_error
                type: string
              errorDescription:
                enum:
                - Internal server error
                type: string
            type: object
      description: Internal server error
    503Error:
      content:
        application/json:
          schema:
            properties:
              error:
                enum:
                - service_unavailable
                type: string
              errorDescription:
                enum:
                - Publisher service is temporarily unavailable
                type: string
            type: object
      description: Service unavailable
    404Error:
      content:
        application/json:
          schema:
            properties:
              error:
                enum:
                - record_not_found
                - url_not_found
                type: string
              errorDescription:
                enum:
                - No record found
                - Your API url or path is incorrect
                type: string
            type: object
      description: No record found
    504Error:
      content:
        application/json:
          schema:
            properties:
              error:
                enum:
                - gateway_timeout
                type: string
              errorDescription:
                enum:
                - Publisher service did not respond in time
                type: string
            type: object
      description: Gateway timeout
    502Error:
      content:
        application/json:
          schema:
            properties:
              error:
                enum:
                - bad_gatewy
                type: string
              errorDescription:
                enum:
                - Publisher service returned an invalid response
                type: string
            type: object
      description: Bad gateway
    400Error:
      content:
        application/json:
          schema:
            properties:
              error:
                enum:
                - missing_parameter
                - invalid_parameter
                - invalid_format
                - invalid_txnid
                - invalid_consentid
                type: string
              errorDescription:
                enum:
                - Please provide all mandatory parameters
                - Bad request
                - The format parameter is invalid
                - The txnId parameter must be in UUID format
                - The consentId parameter must be in UUID format
                type: string
            type: object
      description: Bad request
    401Error:
      content:
        application/json:
          schema:
            properties:
              error:
                enum:
                - invalid_authentication
                - invalid_authorization
                type: string
              errorDescription:
                enum:
                - Authentication failed
                - You are not authorized to use this API
                type: string
            type: object
      description: Unauthorized access
  schemas:
    ConsentArtifactSchema:
      properties:
        consent:
          properties:
            consentId:
              description: A unique consent id in UUID format.
              example: ea9c43aa-7f5a-4bf3-a0be-e1caa24737ba
              format: uuid
              minLength: 1
              type: string
            data:
              properties:
                id:
                  minLength: 1
                  type: string
              required:
              - id
              type: object
            dataConsumer:
              properties:
                id:
                  minLength: 1
                  type: string
              required:
              - id
              type: object
            dataProvider:
              properties:
                id:
                  minLength: 1
                  type: string
              required:
              - id
              type: object
            permission:
              properties:
                access:
                  minLength: 1
                  type: string
                dateRange:
                  properties:
                    from:
                      description: Date time format in UTC, includes miliseconds YYYY-MM-DDThh:mm:ss.vZ
                      format: date-time
                      minLength: 1
                      type: string
                    to:
                      description: Date time format in UTC, includes miliseconds YYYY-MM-DDThh:mm:ss.vZ
                      format: date-time
                      minLength: 1
                      type: string
                  required:
                  - from
                  - to
                  type: object
                frequency:
                  properties:
                    repeats:
                      type: number
                    unit:
                      minLength: 1
                      type: string
                    value:
                      type: number
                  required:
                  - unit
                  - value
                  - repeats
                  type: object
              required:
              - access
              - dateRange
              - frequency
              type: object
            purpose:
              properties:
                description:
                  minLength: 1
                  type: string
              required:
              - description
              type: object
            timestamp:
              description: Date time format in UTC, includes miliseconds YYYY-MM-DDThh:mm:ss.vZ
              format: date-time
              minLength: 1
              type: string
            user:
              properties:
                email:
                  minLength: 1
                  type: string
                idNumber:
                  minLength: 1
                  type: string
                idType:
                  minLength: 1
                  type: string
                mobile:
                  minLength: 1
                  type: string
              required:
              - idType
              - idNumber
              - mobile
              - email
              type: object
          required:
          - consentId
          - timestamp
          - dataConsumer
          - dataProvider
          - purpose
          - user
          - data
          - permission
          type: object
        signature:
          properties:
            signature:
              type: string
          required:
          - signature
          type: object
      required:
      - consent
      - signature
  securitySchemes:
    apiKey:
      in: header
      name: X-APISETU-APIKEY
      type: apiKey
    clientId:
      in: header
      name: X-APISETU-CLIENTID
      type: apiKey