DIGIT Specifications
PlatformUrbanHealthPublic FinanceSanitation
  • Specifications Overview
    • Standardisation Approach
  • Common Service Specs
    • Access Control
    • Analytics
    • Billing
    • Collection
    • Dashboard Analytics
    • Decision Support System Ingest
    • Document Controller
    • Employee
    • Encryption
    • Filestore
    • ID Generation
    • Inbox
    • Indexer
    • Master
    • Master Data Management
    • OTP
    • Payment Gateway
    • PDF Generation
    • URL Shortening
    • User
    • Workflow
  • Domain Service Specs
    • Attendance
    • Bank Account
    • Billing Calculator
    • Birth-Death
    • Building Plan Approval
    • Building Plan Calculator
    • Campaign
    • Campaign Delivery
    • Contracts
    • Estimates
    • eChallan
    • Facility
    • Faecal Sludge Management (FSM)
    • Fire NOC
    • Fire NOC Calculator
    • Household
    • Individual
    • Inventory
    • Land
    • Muster Roll
    • National Dashboard Ingest
    • No Objection Certificate
    • Organization
    • Planning
    • Product
    • Project
    • Property Registry
    • Property Tax Calculator
    • Public Grievance Redressal
    • Registration
    • Sewerage Connection
    • Stock
    • Supervision
    • Sync
    • Trade Licence
    • Trade Licence Calculator
    • User Events
    • Vehicle Registration
    • Vendor Registration
    • Water Connection
  • Archived-docs
    • DIGIT Urban Service Specs
      • Property Tax Service
        • Property Tax Taxonomy
        • Property Tax Data Model
        • Property Tax Service API
      • Public Grievance Redressal Service
        • Public Grievance Redressal Taxonomy
        • Public Grievance Redressal Data Model
        • Public Grievance Redressal Service API
      • Trade License Service
        • Trade License Taxonomy
        • Trade License Data Model
        • Trade License API
      • Fire NOC Service
        • Fire NOC Taxonomy
        • Fire NOC Data Model
        • Fire NOC API
      • Miscellaneous Collection Service
        • Miscellaneous Collections Taxonomy
        • Miscellaneous Collections Data Model
        • Miscellaneous Collection API
      • Online Building Plan Approval Service
        • Online Building Plan Approval Taxonomy
        • Online Building Plan Approval Data Model
        • Online Building Plan Approval Service API
      • Water & Sewerage Service
        • Water & Sewerage Taxonomy
        • Water Service Data Model
        • Sewerage Service Data Model
        • Water & Sewerage Service API
      • Birth & Death Service
        • Birth & Death Taxonomy
        • Birth & Death Data Model
        • Birth & Death Service API
    • DIGIT Public Finance Management Service Specs
      • iFIX Master Data Service API
      • Adapter Master Data Service API
      • mGramSeva iFIX Adapter Service API
      • iFIX Department Entity Service API
      • Fiscal Event API
    • DIGIT Health Service Specs
      • Health Service Data Model
      • Health Service API
    • DIGIT Sanitation Service Specs
      • Faecal Sludge Management Service
        • Faecal Sludge Management Data Model
        • Faecal Sludge Management Service API
Powered by GitBook

​All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page

Was this helpful?

Export as PDF
  1. Archived-docs
  2. DIGIT Health Service Specs

Health Service API

PreviousHealth Service Data ModelNextDIGIT Sanitation Service Specs

Last updated 2 years ago

Was this helpful?

  • POSTCreate/Add a new product
  • POSTUpdate product
  • POSTSearch product
  • POSTCreate/Add a new variant for a product
  • POSTUpdate product variant
  • POSTSearch product variant

Create/Add a new product

post

Create a new product

Body
apiOperationstring · enumOptional

Specify the type of operation being performed i.e. CREATE, UPDATE or DELETE

Example: CREATEPossible values:
Responses
202
Product request has been accepted.
application/json
400
Invalid Input body.
application/json
post
POST /product/v1/_create HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 373

{
  "RequestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "Product": [
    {
      "tenantId": "tenantA",
      "type": "DRUG",
      "name": "Paracetamol",
      "manufacturer": "J&J",
      "additionalFields": {
        "schema": "HOUSEHOLD",
        "version": 2,
        "fields": [
          {
            "key": "height",
            "value": 180
          }
        ]
      },
      "rowVersion": 1
    }
  ],
  "apiOperation": "CREATE"
}
{
  "ResponseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "Product": [
    {
      "id": "text",
      "tenantId": "tenantA",
      "type": "DRUG",
      "name": "Paracetamol",
      "manufacturer": "J&J",
      "additionalFields": {
        "schema": "HOUSEHOLD",
        "version": 2,
        "fields": [
          {
            "key": "height",
            "value": 180
          }
        ]
      },
      "isDeleted": true,
      "rowVersion": 1,
      "auditDetails": {
        "createdBy": "text",
        "lastModifiedBy": "text",
        "createdTime": 1,
        "lastModifiedTime": 1
      }
    }
  ]
}

Update product

post

Update product

Body
apiOperationstring · enumOptional

Specify the type of operation being performed i.e. CREATE, UPDATE or DELETE

Example: CREATEPossible values:
Responses
202
Product request has been accepted.
application/json
400
Invalid Input body.
application/json
post
POST /product/v1/_update HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 373

{
  "RequestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "Product": [
    {
      "tenantId": "tenantA",
      "type": "DRUG",
      "name": "Paracetamol",
      "manufacturer": "J&J",
      "additionalFields": {
        "schema": "HOUSEHOLD",
        "version": 2,
        "fields": [
          {
            "key": "height",
            "value": 180
          }
        ]
      },
      "rowVersion": 1
    }
  ],
  "apiOperation": "CREATE"
}
{
  "ResponseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "Product": [
    {
      "id": "text",
      "tenantId": "tenantA",
      "type": "DRUG",
      "name": "Paracetamol",
      "manufacturer": "J&J",
      "additionalFields": {
        "schema": "HOUSEHOLD",
        "version": 2,
        "fields": [
          {
            "key": "height",
            "value": 180
          }
        ]
      },
      "isDeleted": true,
      "rowVersion": 1,
      "auditDetails": {
        "createdBy": "text",
        "lastModifiedBy": "text",
        "createdTime": 1,
        "lastModifiedTime": 1
      }
    }
  ]
}

Search product

post

Search product

Query parameters
limitanyRequired

Pagination - limit records in response

offsetanyRequired

Pagination - offset from which records should be returned in response

tenantIdanyRequired

Unique id for a tenant.

lastChangedSinceanyOptional

epoch of the time since when the changes on the object should be picked up. Search results from this parameter should include both newly created objects since this time as well as any modified objects since this time. This criterion is included to help polling clients to get the changes in system since a last time they synchronized with the platform.

includeDeletedanyOptional

Used in search APIs to specify if (soft) deleted records should be included in search results.

Body
Responses
200
Product.
application/json
400
Invalid Input body.
application/json
post
POST /product/v1/_search?limit=null&offset=null&tenantId=null HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 231

{
  "RequestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "Product": {
    "id": [
      "text"
    ],
    "type": "DRUG",
    "name": "Paracetamol",
    "manufacturer": "J&J"
  }
}
{
  "ResponseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "Product": [
    {
      "id": "text",
      "tenantId": "tenantA",
      "type": "DRUG",
      "name": "Paracetamol",
      "manufacturer": "J&J",
      "additionalFields": {
        "schema": "HOUSEHOLD",
        "version": 2,
        "fields": [
          {
            "key": "height",
            "value": 180
          }
        ]
      },
      "isDeleted": true,
      "rowVersion": 1,
      "auditDetails": {
        "createdBy": "text",
        "lastModifiedBy": "text",
        "createdTime": 1,
        "lastModifiedTime": 1
      }
    }
  ]
}

Create/Add a new variant for a product

post

Create/Add a new variant for a product

Body
apiOperationstring · enumOptional

Specify the type of operation being performed i.e. CREATE, UPDATE or DELETE

Example: CREATEPossible values:
Responses
202
Product Variant request has been accepted.
application/json
400
Invalid Input body.
application/json
post
POST /product/variant/v1/_create HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 403

{
  "RequestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "ProductVariant": [
    {
      "tenantId": "tenantA",
      "productId": "text",
      "sku": "PAR-200",
      "variation": "Paracetamol 200mg white color",
      "additionalFields": {
        "schema": "HOUSEHOLD",
        "version": 2,
        "fields": [
          {
            "key": "height",
            "value": 180
          }
        ]
      },
      "rowVersion": 1
    }
  ],
  "apiOperation": "CREATE"
}
{
  "ResponseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "ProductVariant": [
    {
      "id": "text",
      "tenantId": "tenantA",
      "productId": "text",
      "sku": "PAR-200",
      "variation": "Paracetamol 200mg white color",
      "additionalFields": {
        "schema": "HOUSEHOLD",
        "version": 2,
        "fields": [
          {
            "key": "height",
            "value": 180
          }
        ]
      },
      "isDeleted": true,
      "rowVersion": 1,
      "auditDetails": {
        "createdBy": "text",
        "lastModifiedBy": "text",
        "createdTime": 1,
        "lastModifiedTime": 1
      }
    }
  ]
}

Update product variant

post

Update product variant

Body
apiOperationstring · enumOptional

Specify the type of operation being performed i.e. CREATE, UPDATE or DELETE

Example: CREATEPossible values:
Responses
202
Product variant request has been accepted.
application/json
400
Invalid Input body.
application/json
post
POST /product/variant/v1/_update HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 403

{
  "RequestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "ProductVariant": [
    {
      "tenantId": "tenantA",
      "productId": "text",
      "sku": "PAR-200",
      "variation": "Paracetamol 200mg white color",
      "additionalFields": {
        "schema": "HOUSEHOLD",
        "version": 2,
        "fields": [
          {
            "key": "height",
            "value": 180
          }
        ]
      },
      "rowVersion": 1
    }
  ],
  "apiOperation": "CREATE"
}
{
  "ResponseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "ProductVariant": [
    {
      "id": "text",
      "tenantId": "tenantA",
      "productId": "text",
      "sku": "PAR-200",
      "variation": "Paracetamol 200mg white color",
      "additionalFields": {
        "schema": "HOUSEHOLD",
        "version": 2,
        "fields": [
          {
            "key": "height",
            "value": 180
          }
        ]
      },
      "isDeleted": true,
      "rowVersion": 1,
      "auditDetails": {
        "createdBy": "text",
        "lastModifiedBy": "text",
        "createdTime": 1,
        "lastModifiedTime": 1
      }
    }
  ]
}

Search product variant

post

Search product variant

Query parameters
limitanyRequired

Pagination - limit records in response

offsetanyRequired

Pagination - offset from which records should be returned in response

tenantIdanyRequired

Unique id for a tenant.

lastChangedSinceanyOptional

epoch of the time since when the changes on the object should be picked up. Search results from this parameter should include both newly created objects since this time as well as any modified objects since this time. This criterion is included to help polling clients to get the changes in system since a last time they synchronized with the platform.

includeDeletedanyOptional

Used in search APIs to specify if (soft) deleted records should be included in search results.

Body
Responses
200
Product Variant.
application/json
400
Invalid Input body.
application/json
post
POST /product/variant/v1/_search?limit=null&offset=null&tenantId=null HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 261

{
  "RequestInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "action": "text",
    "did": "text",
    "key": "text",
    "msgId": "text",
    "requesterId": "text",
    "authToken": "text"
  },
  "ProductVariant": {
    "id": [
      "text"
    ],
    "productId": "text",
    "sku": "PAR-200",
    "variation": "Paracetamol 200mg white color"
  }
}
{
  "ResponseInfo": {
    "apiId": "text",
    "ver": "text",
    "ts": 1,
    "resMsgId": "text",
    "msgId": "text",
    "status": "SUCCESSFUL"
  },
  "ProductVariant": [
    {
      "id": "text",
      "tenantId": "tenantA",
      "productId": "text",
      "sku": "PAR-200",
      "variation": "Paracetamol 200mg white color",
      "additionalFields": {
        "schema": "HOUSEHOLD",
        "version": 2,
        "fields": [
          {
            "key": "height",
            "value": 180
          }
        ]
      },
      "isDeleted": true,
      "rowVersion": 1,
      "auditDetails": {
        "createdBy": "text",
        "lastModifiedBy": "text",
        "createdTime": 1,
        "lastModifiedTime": 1
      }
    }
  ]
}