Health Service API

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
post
/product/v1/_create
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
post
/product/v1/_update
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
limitinteger · max: 1000Required

Pagination - limit records in response

offsetintegerRequired

Pagination - offset from which records should be returned in response

tenantIdstring · varcharRequired

Unique id for a tenant.

lastChangedSinceinteger · int64Optional

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.

includeDeletedbooleanOptional

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

Body
Responses
post
/product/v1/_search
POST /product/v1/_search?limit=1&offset=1&tenantId=text 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
post
/product/variant/v1/_create
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
post
/product/variant/v1/_update
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
limitinteger · max: 1000Required

Pagination - limit records in response

offsetintegerRequired

Pagination - offset from which records should be returned in response

tenantIdstring · varcharRequired

Unique id for a tenant.

lastChangedSinceinteger · int64Optional

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.

includeDeletedbooleanOptional

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

Body
Responses
post
/product/variant/v1/_search
POST /product/variant/v1/_search?limit=1&offset=1&tenantId=text 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
      }
    }
  ]
}

Last updated

Was this helpful?