Nhance API Documentation
baseUri https://app.nhancenow.com/b2b/api/v1/
protocols HTTPS
mediaType application/json
Nhance API 1.0
This document is a detailed reference for our REST API.
The Nhance API offers a framework and functionality for businesses that want to automate processes. The API is built using REST endpoints - it has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. JSON is returned by all API responses, including errors.
As a general guideline, if a property has an empty or null value, we drop it from the JSON unless there is a strong semantic reason for its existence.
We have designed our documentation to be easy to use. It is grouped by feature sets and offers practical examples.
API endpoint
https://app.nhancenow.com/b2b/api/v1/ (live)
Examples in this documentation are generated using Postman.
Try Now
Try the Nhance API in seconds. Create your first customer, perform screening checks, and more by following the steps below.
Onboard as a customer
As a first step, a customer must be created to facilitate all further checks. You should see the created customer object in the response.
Note down the id attribute of the customer as it is required for the next step.
Access your Api key
To make our API as explorable as possible, accounts have sandbox and live API keys. Just use the appropriate key along with the corresponding Nhance domain to perform a live call to nhancenow.com, or test call to sandbox.nhancenow.com. Requests made to the sandbox environment will not incur a cost.
Register an account with us to immediately access your live and sandbox token from your Dashboard.
Authentication and headers
To make a REST API call, you must include request headers including the hmac header with an access_key.
To get an access key, you must first create an account, then Nhance will generate a set of access key and secret keys for your app.
Services listed in this API are invoked using HMAC Authentication. HMAC, or hashed message authentication code, is our preferred authentication scheme. It provides a straightforward but secure method of protecting your API key. It involves passing a hash composed of your api secret and the request. This hash is then signed with your api secret key. The result is a request that most importantly, does not contain your authentication key.
The following headers are required on the request:
Header | Value |
---|---|
Accept | application/json |
Content-Type | application/json |
access_key | 84902A4570346F1FEB05469C95F953DE9FCB975F |
hmac | Hlkvwtc33oxKjG90xDDbWZyv7nSIzyE8iHryKh44yJQ= |
Return Codes
The API will always return an HTTP STATUS. The table below summarizes the general response codes that are returned in this API.
Code | Description |
---|---|
2XX | The API call was successful. |
4XX | The API call had an error. The error will be encoded in the body of the response. |
5XX | The API call was unsuccessful. You should retry later. |
Specific return codes
Code | Description |
---|---|
200 OK | The request was successful. |
201 Created | The request was successful and a resource is created. |
400 Bad Request | The request could not be understood or required parameters were missing. |
401 Unauthorized | Authentication failed or user doesn't have permissions for requested operation. |
403 Forbidden | Access denied, the operation is not allowed. |
404 Not Found | Resource was not found. |
405 Method Not Allowed | Requested method is not supported for resource. |
409 Conflict | Request could not be completed due to conflicting information. |
412 Precondition failed | Request could not be completed due to one of the preconditions is not accomplished. |
500 Internal server error | Internal server error. Try again later. |
503 Service Unavailable | Service is temporarily unavailable. Try again later. |
Formats
format | name | description |
---|---|---|
string | (99) | string format, if followed by a number between (9), that's the max length for the string |
number | (99,9) | numeric format, if followed by a number between (9) it defines the max length of the number, if followed by a comma (99,9) it defines the maximum number of decimals |
date | string with format iso-8601 for dates : yyyy-MM-dd |
Allowed HTTPs methods
The HTTP methods allowed to call the services described in this API are described in the table below.
Method | Description |
---|---|
POST | To create a new resource, or execute an operation that modifies data. |
PUT | To update a resource |
GET | Get a resource or list of resources |
DELETE | To delete a resource |
Java
public void generateHmac(String payload) {
try {
Mac digest = Mac.getInstance("HmacSHA256");
SecretKeySpec secretKey = new SecretKeySpec("apiSecret", "HmacSHA256");
digest.init(secretKey);
final byte[] signatureBytes = digest.doFinal(payload);
byte[] encryptedByteArray = Base64.encodeBase64(signatureBytes);
logger.info("Hmac: " + new String(encryptedByteArray));
digest.reset();
}
catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
Types
Product
A representation of a Product.
Properties
TYPE DEFINITION
{
"name": "Product",
"type": "object",
"description": "A representation of a Product.",
"properties": {
"productModel": {
"type": "string",
"name": "productModel",
"displayName": "productModel",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Identifies the model of the product. (Max limit of 50 alphanumeric characters, and should not have trailing or leading spaces).",
"key": "productModel"
},
"description": {
"type": "string",
"name": "description",
"displayName": "description",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "The description of the product. (Max limit of 250 alphanumeric and special characters, and should not have trailing or leading spaces).",
"key": "description"
},
"productCategory": {
"type": "string",
"name": "productCategory",
"displayName": "productCategory",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Identifies the category of the product",
"key": "productCategory"
},
"productSubCategory": {
"type": "string",
"name": "productSubCategory",
"displayName": "productSubCategory",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Identifies the sub category of the product",
"key": "productSubCategory"
},
"manufacturer": {
"type": "string",
"name": "manufacturer",
"displayName": "manufacturer",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "The manufacturer of the product",
"key": "manufacturer"
},
"warrantyPeriod": {
"type": "integer",
"name": "warrantyPeriod",
"displayName": "warrantyPeriod",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "The warranty period of the Product in months such as 12,24,etc.",
"key": "warrantyPeriod"
},
"isPortable": {
"type": "string",
"name": "isPortable",
"displayName": "isPortable",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "This is to determine if the product needs to be serviced at the service center (portable) or serviced at consumer location(non-portable). Values can be either \"Yes\" or \"No\"",
"key": "isPortable"
},
"eligibleForTestdrive": {
"type": "string",
"name": "eligibleForTestdrive",
"displayName": "eligibleForTestdrive",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "This is to determine if the product is eligible for test drive.Values can be either \"Yes\" or \"No\"",
"key": "eligibleForTestdrive"
},
"documents": {
"type": "array",
"items": {
"type": "object",
"properties": [
{
"type": "string",
"name": "documentName",
"displayName": "documentName",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Name of the document",
"key": "documentName"
},
{
"type": "string",
"name": "documentPath",
"displayName": "documentPath",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Document url",
"key": "documentPath"
},
{
"type": "string",
"name": "documentExtention",
"displayName": "documentExtention",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Extension of the document",
"key": "documentExtention"
},
{
"type": "string",
"name": "documentType",
"displayName": "documentType",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Type of document",
"key": "documentType"
},
{
"type": "string",
"name": "status",
"displayName": "status",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Status of the document",
"key": "status"
}
],
"name": "Document",
"displayName": "Document",
"typePropertyKind": "TYPE_EXPRESSION",
"description": "A representation of a Document.",
"orderHint": 2,
"additionalProperties": true,
"originalType": "Document"
},
"name": "documents",
"displayName": "documents",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"key": "documents"
},
"productEvent": {
"type": "object",
"properties": [
{
"type": "string",
"name": "eventTitle",
"displayName": "eventTitle",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Title of the event",
"key": "eventTitle"
},
{
"type": "string",
"name": "eventRunsAt",
"displayName": "eventRunsAt",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "The time which the event should trigger. 24 hours format '00:00' to '23:59'",
"key": "eventRunsAt"
},
{
"type": "string",
"name": "eventTimeZone",
"displayName": "eventTimeZone",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Timezone",
"key": "eventTimeZone"
},
{
"type": "string",
"name": "eventImageUrl",
"displayName": "eventImageUrl",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "Url of the image",
"key": "eventImageUrl"
},
{
"type": "array",
"items": {
"type": "object",
"properties": [
{
"type": "integer",
"name": "duration",
"displayName": "duration",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Duration of the event",
"key": "duration"
},
{
"type": "string",
"name": "message",
"displayName": "message",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Message of the event",
"key": "message"
}
],
"name": "ProductEventSchedule",
"displayName": "ProductEventSchedule",
"typePropertyKind": "TYPE_EXPRESSION",
"description": "A representation of Product event schedule.",
"orderHint": 3,
"additionalProperties": true,
"originalType": "ProductEventSchedule"
},
"name": "productEventSchedules",
"displayName": "productEventSchedules",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"key": "productEventSchedules"
}
],
"name": "productEvent",
"displayName": "productEvent",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"additionalProperties": true,
"key": "productEvent"
},
"customAttributes": {
"type": "array",
"items": {
"type": "object",
"properties": [
{
"type": "string",
"name": "propertyName",
"displayName": "propertyName",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Name of the Property name",
"key": "propertyName"
},
{
"type": "string",
"name": "dataType",
"displayName": "dataType",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Data type of the property name",
"key": "dataType"
},
{
"type": "string",
"name": "isMandatory",
"displayName": "isMandatory",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "mandatory or not",
"key": "isMandatory"
}
],
"name": "CustomAttribute",
"displayName": "CustomAttribute",
"typePropertyKind": "TYPE_EXPRESSION",
"description": "A representation of a CustomAttribute.",
"orderHint": 4,
"additionalProperties": true,
"originalType": "CustomAttribute"
},
"name": "customAttributes",
"displayName": "customAttributes",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"key": "customAttributes"
},
"AdditionalInfo": {
"type": "object",
"properties": [
{
"type": "string",
"name": "infoUrl",
"displayName": "infoUrl",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "Used for mstore product details redirection",
"key": "infoUrl"
},
{
"type": "string",
"name": "reservationType",
"displayName": "reservationType",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "Specific to booking",
"key": "reservationType"
},
{
"type": "string",
"name": "amount",
"displayName": "amount",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "Product amount in m store view",
"key": "amount"
}
],
"name": "AdditionalInfo",
"displayName": "AdditionalInfo",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "A representation of a AdditionalInfo.",
"additionalProperties": true,
"key": "AdditionalInfo"
},
"locations": {
"type": "array",
"items": {
"type": "object",
"properties": [
{
"type": "string",
"name": "latitude",
"displayName": "latitude",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Latitude of the address",
"key": "latitude"
},
{
"type": "string",
"name": "longitude",
"displayName": "longitude",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Longitude of the address",
"key": "longitude"
},
{
"type": "string",
"name": "address",
"displayName": "address",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "full address",
"key": "address"
}
],
"name": "Address",
"displayName": "Address",
"typePropertyKind": "TYPE_EXPRESSION",
"description": "A representation of a Address.",
"orderHint": 5,
"additionalProperties": true,
"originalType": "Address"
},
"name": "locations",
"displayName": "locations",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"key": "locations"
},
"helpdesks": {
"type": "array",
"items": {
"type": "object",
"properties": [
{
"type": "string",
"name": "isdCode",
"displayName": "isdCode",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Isd code",
"key": "isdCode"
},
{
"type": "string",
"name": "mobile",
"displayName": "mobile",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Mobile number",
"key": "mobile"
},
{
"type": "string",
"name": "email",
"displayName": "email",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "email",
"key": "email"
}
],
"name": "Helpdesk",
"displayName": "Helpdesk",
"typePropertyKind": "TYPE_EXPRESSION",
"description": "A representation of a Helpdesk.",
"orderHint": 6,
"additionalProperties": true,
"originalType": "Helpdesk"
},
"name": "helpdesks",
"displayName": "helpdesks",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"key": "helpdesks"
}
}
}
Digitalkit
A representation of a Digitalkit.
Properties
TYPE DEFINITION
{
"name": "Digitalkit",
"type": "object",
"description": "A representation of a Digitalkit.",
"properties": {
"productId": {
"type": "string",
"name": "productId",
"displayName": "productId",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "This id is used to identify a product for which this kit will be issued, if this value is empty product will be loaded based on \"productSubCategory\",\"model\" and \"manufacturer\"",
"key": "productId"
},
"productModel": {
"type": "string",
"name": "productModel",
"displayName": "productModel",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "Identifies the model of the product. (Max limit of 50 alphanumeric characters, and should not have trailing or leading spaces).es).",
"key": "productModel"
},
"productSubCategory": {
"type": "string",
"name": "productSubCategory",
"displayName": "productSubCategory",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "Identifies the sub category of the product",
"key": "productSubCategory"
},
"manufacturer": {
"type": "string",
"name": "manufacturer",
"displayName": "manufacturer",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "The manufacturer of the product",
"key": "manufacturer"
},
"serialNumber": {
"type": "string",
"name": "serialNumber",
"displayName": "serialNumber",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "The serial number/unique identifier of the product.",
"key": "serialNumber"
},
"purchaseDate": {
"type": "string",
"name": "purchaseDate",
"displayName": "purchaseDate",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "The date of purchase in yyyy-mm-dd",
"key": "purchaseDate"
},
"amount": {
"type": "string",
"name": "amount",
"displayName": "amount",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "The price of the product.",
"key": "amount"
},
"consumerMobile": {
"type": "string",
"name": "consumerMobile",
"displayName": "consumerMobile",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "The mobile number of the consumer",
"key": "consumerMobile"
},
"consumerIsdCode": {
"type": "integer",
"name": "consumerIsdCode",
"displayName": "consumerIsdCode",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "ISD code of the country where the consumer resides.",
"key": "consumerIsdCode"
},
"consumerEmail": {
"type": "string",
"name": "consumerEmail",
"displayName": "consumerEmail",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "The email id of the consumer",
"key": "consumerEmail"
},
"consumerName": {
"type": "string",
"name": "consumerName",
"displayName": "consumerName",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "The full name of the consumer",
"key": "consumerName"
},
"warrantyExpiryDate": {
"type": "string",
"name": "warrantyExpiryDate",
"displayName": "warrantyExpiryDate",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "The warranty expiry date in yyyy-mm-dd. In case warrantyExpiryDate is not given, this will be considered ad warrantyExpiryDate",
"key": "warrantyExpiryDate"
},
"warrantyPeriod": {
"type": "integer",
"name": "warrantyPeriod",
"displayName": "warrantyPeriod",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "In case warrantyExpiryDate is not given, system will calculate warrantyExpiryDate from purchaseDate plus warrantyPeriod",
"key": "warrantyPeriod"
},
"elearningUrl": {
"type": "string",
"name": "elearningUrl",
"displayName": "elearningUrl",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "elearningUrl",
"key": "elearningUrl"
},
"feedbackUrl": {
"type": "string",
"name": "feedbackUrl",
"displayName": "feedbackUrl",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "feedbackUrl",
"key": "feedbackUrl"
},
"documents": {
"type": "array",
"items": {
"type": "object",
"properties": [
{
"type": "string",
"name": "documentName",
"displayName": "documentName",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Name of the document",
"key": "documentName"
},
{
"type": "string",
"name": "documentPath",
"displayName": "documentPath",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Document url",
"key": "documentPath"
},
{
"type": "string",
"name": "documentExtention",
"displayName": "documentExtention",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Extension of the document",
"key": "documentExtention"
},
{
"type": "string",
"name": "documentType",
"displayName": "documentType",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Type of document",
"key": "documentType"
},
{
"type": "string",
"name": "status",
"displayName": "status",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Status of the document",
"key": "status"
}
],
"name": "Document",
"displayName": "Document",
"typePropertyKind": "TYPE_EXPRESSION",
"description": "A representation of a Document.",
"orderHint": 2,
"additionalProperties": true,
"originalType": "Document"
},
"name": "documents",
"displayName": "documents",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"key": "documents"
},
"customAttributes": {
"type": "array",
"items": {
"type": "object",
"properties": [
{
"type": "string",
"name": "propertyName",
"displayName": "propertyName",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Name of the Property name",
"key": "propertyName"
},
{
"type": "string",
"name": "dataType",
"displayName": "dataType",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Data type of the property name",
"key": "dataType"
},
{
"type": "string",
"name": "isMandatory",
"displayName": "isMandatory",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "mandatory or not",
"key": "isMandatory"
}
],
"name": "CustomAttribute",
"displayName": "CustomAttribute",
"typePropertyKind": "TYPE_EXPRESSION",
"description": "A representation of a CustomAttribute.",
"orderHint": 4,
"additionalProperties": true,
"originalType": "CustomAttribute"
},
"name": "customAttributes",
"displayName": "customAttributes",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"key": "customAttributes"
}
}
}
Document
A representation of a Document.
Properties
TYPE DEFINITION
{
"name": "Document",
"type": "object",
"description": "A representation of a Document.",
"properties": {
"documentName": {
"type": "string",
"name": "documentName",
"displayName": "documentName",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Name of the document"
},
"documentPath": {
"type": "string",
"name": "documentPath",
"displayName": "documentPath",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Document url"
},
"documentExtention": {
"type": "string",
"name": "documentExtention",
"displayName": "documentExtention",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Extension of the document"
},
"documentType": {
"type": "string",
"name": "documentType",
"displayName": "documentType",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Type of document"
},
"status": {
"type": "string",
"name": "status",
"displayName": "status",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Status of the document"
}
}
}
ProductEventSchedule
A representation of Product event schedule.
Properties
TYPE DEFINITION
{
"name": "ProductEventSchedule",
"type": "object",
"description": "A representation of Product event schedule.",
"properties": {
"duration": {
"type": "integer",
"name": "duration",
"displayName": "duration",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Duration of the event"
},
"message": {
"type": "string",
"name": "message",
"displayName": "message",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Message of the event"
}
}
}
CustomAttribute
A representation of a CustomAttribute.
Properties
TYPE DEFINITION
{
"name": "CustomAttribute",
"type": "object",
"description": "A representation of a CustomAttribute.",
"properties": {
"propertyName": {
"type": "string",
"name": "propertyName",
"displayName": "propertyName",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Name of the Property name"
},
"dataType": {
"type": "string",
"name": "dataType",
"displayName": "dataType",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Data type of the property name"
},
"isMandatory": {
"type": "string",
"name": "isMandatory",
"displayName": "isMandatory",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "mandatory or not"
}
}
}
Address
A representation of a Address.
Properties
TYPE DEFINITION
{
"name": "Address",
"type": "object",
"description": "A representation of a Address.",
"properties": {
"latitude": {
"type": "string",
"name": "latitude",
"displayName": "latitude",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Latitude of the address"
},
"longitude": {
"type": "string",
"name": "longitude",
"displayName": "longitude",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Longitude of the address"
},
"address": {
"type": "string",
"name": "address",
"displayName": "address",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "full address"
}
}
}
Helpdesk
A representation of a Helpdesk.
Properties
TYPE DEFINITION
{
"name": "Helpdesk",
"type": "object",
"description": "A representation of a Helpdesk.",
"properties": {
"isdCode": {
"type": "string",
"name": "isdCode",
"displayName": "isdCode",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Isd code"
},
"mobile": {
"type": "string",
"name": "mobile",
"displayName": "mobile",
"typePropertyKind": "TYPE_EXPRESSION",
"required": true,
"description": "Mobile number"
},
"email": {
"type": "string",
"name": "email",
"displayName": "email",
"typePropertyKind": "TYPE_EXPRESSION",
"required": false,
"description": "email"
}
}
}
Products
A product represents product details. To issue a digitalkit, a product must be created first. The API allows you to create, retrieve, update, and delete your products. You can retrieve specific product as well as a list of all your products.
Create a product
POST: /product
Creates a new product object.
HTTP Request
POST https://app.nhancenow.com/b2b/api/v1/product
Possible Responses
200
Status 200
Create a product
CURL EXAMPLE
curl -X POST "https://app.nhancenow.com/b2b/api/v1/product" \
-d @request_body
REQUEST BODY
{
"productModel": "S10",
"description": "Samsung S10",
"productCategory": "Electronics",
"productSubCategory": "Mobile",
"manufacturer": "Samsung",
"warrantyPeriod": 0,
"isPortable": "Yes",
"eligibleForTestdrive": "No",
"documents": [
{
"documentName": "product",
"documentPath": "www.domain.com/product.jpg",
"documentExtention": "jpg",
"documentType": "PRODUCT",
"status": "New"
}
],
"productEvent": {
"eventTitle": "Service alert",
"eventRunsAt": "12:30",
"eventTimeZone": "Asia/Kolkata",
"eventImageUrl": "www.domain.com/notify.jpg",
"productEventSchedules": [
{
"duration": 120,
"message": "First service"
}
]
},
"customAttributes": [
{
"propertyName": "color",
"dataType": "Alphanumeric",
"isMandatory": "Yes"
}
],
"additionalInfo": {
"infoUrl": "www.domain.com",
"amount": "10000"
},
"locations": [
{
"latitude": "2123.456.678.77",
"longitude": "2123.456.678.78",
"address": "Madiwala, Bangalore"
}
],
"helpdesks": [
{
"isdCode": 91,
"mobile": "9035xxxxxx",
"email": "abc@xyz.com"
}
]
}
Type
object
RESPONSE BODY
200
{
"status": {
"statusCode": 0,
"errorMessages": null,
"errorArguments": null
},
"message": {
"tenantId": "58acaf38-c6bc-402c-aa14-17cf5b94cff0",
"productId": "07ddd15d-bd14-4e2e-8479-1c9c5ad55013",
"productModel": "S10",
"description": "Samsung S10",
"productCategory": "Electronics",
"productSubCategory": "Mobile",
"manufacturer": "Samsung",
"warrantyPeriod": 0
}
}
Type
Object
Retrieve a product
GET: /product/{productId}
Retrieves the details of an existing product. You need only supply the unique product identifier that was returned upon product creation.
HTTP Request
GET https://app.nhancenow.com/b2b/api/v1/product/{productId}
URI Parameters
productId
Identifier of the Product
Property | Value |
---|---|
required | true |
type | string |
examples | 07ddd15d-bd14-4e2e-8479-1c9c5ad55013 |
Possible Responses
200
Status 200
400
Status 400
Retrieve a product
CURL EXAMPLE
curl -X GET "https://app.nhancenow.com/b2b/api/v1/product/{productId}"
RESPONSE BODY
200
{
"status": {
"statusCode": 0,
"errorMessages": null,
"errorArguments": null
},
"message": {
"productId": "07ddd15d-bd14-4e2e-8479-1c9c5ad55013",
"productModel": "S10",
"description": "Samsung S10",
"productCategory": "Electronics",
"productSubCategory": "Mobile",
"manufacturer": "Samsung",
"warrantyPeriod": 0,
"isPortable": "Yes",
"eligibleForTestdrive": "No",
"documents": [
{
"documentName": "product",
"documentPath": "www.domain.com/product.jpg",
"documentExtention": "jpg",
"documentType": "PRODUCT",
"status": "New"
}
],
"productEvent": {
"eventTitle": "Service alert",
"eventRunsAt": "12:30",
"eventTimeZone": "Asia/Kolkata",
"eventImageUrl": "www.domain.com/notify.jpg",
"productEventSchedules": [
{
"duration": 120,
"message": "First service"
}
]
},
"customAttributes": [
{
"propertyName": "color",
"dataType": "Alphanumeric",
"isMandatory": "Yes"
}
],
"additionalInfo": {
"infoUrl": "www.domain.com",
"amount": "10000"
},
"locations": [
{
"latitude": "2123.456.678.77",
"longitude": "2123.456.678.78",
"address": "Madiwala, Bangalore"
}
],
"helpdesks": [
{
"isdCode": 91,
"mobile": "9035xxxxxx",
"email": "abc@xyz.com"
}
]
}
}
Type
object
Update a product
PUT: /product/{productId}
Updates the details of an existing product.Please note, the product model will not be editable once set. Additionally, certain fields will not be editable once the product has created
HTTP Request
PUT https://app.nhancenow.com/b2b/api/v1/product/{productId}
URI Parameters
productId
Identifier of the Product
Property | Value |
---|---|
required | true |
type | string |
examples | 07ddd15d-bd14-4e2e-8479-1c9c5ad55013 |
Possible Responses
200
Status 200
Update a product
CURL EXAMPLE
curl -X PUT "https://app.nhancenow.com/b2b/api/v1/product/{productId}" \
-d @request_body
REQUEST BODY
{
"description": "Samsung S10",
"warrantyPeriod": 0,
"isPortable": "Yes",
"eligibleForTestdrive": "No",
"documents": [
{
"documentName": "product",
"documentPath": "www.domain.com/product.jpg",
"documentExtention": "jpg",
"documentType": "PRODUCT",
"status": "New"
}
],
"productEvent": {
"eventTitle": "Service alert",
"eventRunsAt": "12:30",
"eventTimeZone": "Asia/Kolkata",
"eventImageUrl": "www.domain.com/notify.jpg",
"productEventSchedules": [
{
"duration": 120,
"message": "First service"
}
]
},
"customAttributes": [
{
"propertyName": "color",
"dataType": "Alphanumeric",
"isMandatory": "Yes"
}
],
"additionalInfo": {
"infoUrl": "www.nhancenow.com",
"amount": "10000"
},
"locations": [
{
"latitude": "2123.456.678.77",
"longitude": "2123.456.678.78",
"address": "Madiwala, Bangalore"
}
],
"helpdesks": [
{
"isdCode": 91,
"mobile": "9035xxxxxx",
"email": "abc@xyz.com"
}
]
}
Type
object
RESPONSE BODY
200
{
"status": {
"statusCode": 0,
"errorMessages": null,
"errorArguments": null
},
"message": {
"productId": "07ddd15d-bd14-4e2e-8479-1c9c5ad55013",
"productModel": "S10",
"description": "Samsung S10",
"productCategory": "Electronics",
"productSubCategory": "Mobile",
"manufacturer": "Samsung",
"warrantyPeriod": 0,
"isPortable": "Yes",
"eligibleForTestdrive": "No",
"documents": [
{
"documentName": "product",
"documentPath": "www.domain.com/product.jpg",
"documentExtention": "jpg",
"documentType": "PRODUCT",
"status": "New"
}
],
"productEvent": {
"eventTitle": "Service alert",
"eventRunsAt": "12:30",
"eventTimeZone": "Asia/Kolkata",
"eventImageUrl": "www.domain.com/notify.jpg",
"productEventSchedules": [
{
"duration": 120,
"message": "First service"
}
]
},
"customAttributes": [
{
"propertyName": "color",
"dataType": "Alphanumeric",
"isMandatory": "Yes"
}
],
"additionalInfo": {
"infoUrl": "www.domain.com",
"amount": "10000"
},
"locations": [
{
"latitude": "2123.456.678.77",
"longitude": "2123.456.678.78",
"address": "Madiwala, Bangalore"
}
],
"helpdesks": [
{
"isdCode": 91,
"mobile": "9035xxxxxx",
"email": "abc@xyz.com"
}
]
}
}
Type
object
Delete a product
DELETE: /product/{productId}
Deletes an existing product. You need only supply the unique product identifier that was returned upon product creation. Also deletes any documents and notes on the product. Please note, once digitalkit associated for a product, they can no longer be deleted.
HTTP Request
DELETE https://app.nhancenow.com/b2b/api/v1/product/{productId}
URI Parameters
productId
Identifier of the Product
Property | Value |
---|---|
required | true |
type | string |
examples | 07ddd15d-bd14-4e2e-8479-1c9c5ad55013 |
Possible Responses
200
Status 200
Delete a product
CURL EXAMPLE
curl -X DELETE "https://app.nhancenow.com/b2b/api/v1/product/{productId}"
RESPONSE BODY
200
{
"status": {
"statusCode": 0,
"errorMessages": null,
"errorArguments": null
}
}
Type
Object
List all products
GET: /product/products
Lists all existing products. The products are returned sorted by creation date, with the most recent products appearing first. In addition to the attributes listed on the pagination section, the following optional parameters can be used to refine the response.
HTTP Request
GET https://app.nhancenow.com/b2b/api/v1/product/products
Query Parameters
pageSize
Size of the page to retrieve.
Property | Value |
---|---|
required | false |
type | integer |
examples | 10 |
pageNumber
Number of the page to retrieve.
Property | Value |
---|---|
required | false |
type | number |
examples | 1 |
productModel
Model of the product
Property | Value |
---|---|
required | false |
type | string |
productCategory
Category of the product
Property | Value |
---|---|
required | false |
type | string |
examples | Electronics |
productSubCategory
Sub category of the product
Property | Value |
---|---|
required | false |
type | string |
examples | Mobile |
manufacturer
Manufacturer of the product
Property | Value |
---|---|
required | false |
type | string |
examples | Samsung |
fromDate
Filter files with date equal or later than specified date."
Property | Value |
---|---|
required | false |
type | string |
examples | 2019-07-01 |
toDate
Filter files with date equal or sooner than specified date.
Property | Value |
---|---|
required | false |
type | string |
examples | 2019-07-02 |
Possible Responses
200
Status 200
400
Status 400
List all products
CURL EXAMPLE
curl -X GET "https://app.nhancenow.com/b2b/api/v1/product/products?pageSize=10&pageNumber=1&productCategory=Electronics&productSubCategory=Mobile&manufacturer=Samsung&fromDate=2019-07-01&toDate=2019-07-02"
RESPONSE BODY
200
{
"status": {
"statusCode": 0,
"errorMessages": null,
"errorArguments": null
},
"results": [
{
"productId": "07ddd15d-bd14-4e2e-8479-1c9c5ad55013",
"productModel": "S10",
"description": "Samsung S10",
"productCategory": "Electronics",
"productSubCategory": "Mobile",
"manufacturer": "Samsung",
"warrantyPeriod": 0,
"createdDate": "2019-07-02T07:11:34.387+0000",
"updatedDate": "2019-07-02T07:11:34.387+0000"
}
],
"count": 1
}
Type
array
Digitalkits
A digitalkit represents product details.The API allows you to create, retrieve, update, and delete your digitalkits. You can retrieve specific digitalkit as well as a list of all your digitalkits.
Create a digitalkit
POST: /digitalkit
Creates a new digitalkit object.
HTTP Request
POST https://app.nhancenow.com/b2b/api/v1/digitalkit
Possible Responses
200
Status 200
Create a digitalkit
CURL EXAMPLE
curl -X POST "https://app.nhancenow.com/b2b/api/v1/digitalkit" \
-d @request_body
REQUEST BODY
{
"productId": "07ddd15d-bd14-4e2e-8479-1c9c5ad55013",
"warrantyPeriod": 12,
"serialNumber": "ser123",
"consumerName": "raj",
"consumerIsdCode": 91,
"consumerMobile": "9035xxxxxx",
"consumerEmail": "abc@xyz.com",
"purchaseDate": "2019-07-03",
"documents": [
{
"documentName": "Invoice",
"documentPath": "www.domain.com/invoice.pdf",
"documentExtention": "jpg",
"documentType": "Invoice",
"status": "New"
}
],
"customAttributes": [
{
"propertyName": "imei number",
"dataType": "Alphanumeric",
"propertyValue": "990000862471854"
}
],
"feedbackUrl": "https://www.domain.com/business/gb_en/all-industries/retail",
"elearningUrl": "https://www.domain.com/elearning/portal"
}
Type
object
RESPONSE BODY
200
{
"status": {
"statusCode": 0,
"errorMessages": null,
"errorArguments": null
},
"message": {
"tenantId": "58acaf38-c6bc-402c-aa14-17cf5b94cff0",
"createdDate": "2019-07-04T07:15:13.932+0000",
"updatedDate": "2019-07-04T07:15:14.265+0000",
"digitalkitId": "a6850cc1-b65b-46dc-83e0-4ed1747df857",
"digitalkitCode": "INDK0000138540",
"productId": "07ddd15d-bd14-4e2e-8479-1c9c5ad55013",
"productModel": "S10",
"productCategory": "Electronics",
"productSubCategory": "Mobile",
"manufacturer": "Samsung",
"purchaseDate": "2019-07-03",
"consumerName": "raj"
}
}
Type
Object
Retrieve a digitalkit
GET: /digitalkit/{digitalkitId}
Retrieves the details of an existing digitalkit. You need only supply the unique digitalkit identifier that was returned upon digitalkit creation.
HTTP Request
GET https://app.nhancenow.com/b2b/api/v1/digitalkit/{digitalkitId}
URI Parameters
digitalkitId
Identifier of the digitalkit
Property | Value |
---|---|
required | true |
type | string |
examples | a6850cc1-b65b-46dc-83e0-4ed1747df857 |
Possible Responses
200
Status 200
400
Status 400
Retrieve a digitalkit
CURL EXAMPLE
curl -X GET "https://app.nhancenow.com/b2b/api/v1/digitalkit/{digitalkitId}"
RESPONSE BODY
200
{
"status": {
"statusCode": 0,
"errorMessages": null,
"errorArguments": null
},
"message": {
"tenantId": "58acaf38-c6bc-402c-aa14-17cf5b94cff0",
"createdDate": "2019-07-04T07:15:13.932+0000",
"updatedDate": "2019-07-04T07:15:14.265+0000",
"digitalkitId": "a6850cc1-b65b-46dc-83e0-4ed1747df857",
"digitalkitCode": "INDK0000138540",
"productId": "07ddd15d-bd14-4e2e-8479-1c9c5ad55013",
"productModel": "S10",
"productCategory": "Electronics",
"productSubCategory": "Mobile",
"manufacturer": "Samsung",
"purchaseDate": "2019-07-03",
"consumerName": "raj",
"consumerMobile": "9035xxxxxx",
"consumerIsdCode": 91,
"consumerEmail": "abc@xyz.com",
"warrantyPeriod": 12,
"elearningUrl": "https://www.domain.com/elearning/portal",
"feedbackUrl": "https://www.domain.com/business/gb_en/all-industries/retail",
"currencyCode": null,
"documents": [
{
"documentId": "141fbbc9-5686-4d45-a816-7d9d8f490021",
"documentName": "Invoice",
"documentPath": "www.domain.com/invoice.pdf",
"documentExtention": "jpg",
"documentType": "Invoice",
"status": "Active"
}
],
"customAttributes": [
{
"propertyName": "imei number",
"dataType": "Alphanumeric",
"propertyValue": "990000862471854"
}
],
"status": "Generated"
}
}
Type
object
Update a digitalkit
PUT: /digitalkit/{digitalkitId}
Updates the details of an existing digitalkit.Please note, the product model will not be editable for the digitalkit once set. Additionally, certain fields will not be editable once the digitalkit has created
HTTP Request
PUT https://app.nhancenow.com/b2b/api/v1/digitalkit/{digitalkitId}
URI Parameters
digitalkitId
Identifier of the digitalkit
Property | Value |
---|---|
required | true |
type | string |
examples | a6850cc1-b65b-46dc-83e0-4ed1747df857 |
Possible Responses
200
Status 200
Update a digitalkit
CURL EXAMPLE
curl -X PUT "https://app.nhancenow.com/b2b/api/v1/digitalkit/{digitalkitId}" \
-d @request_body
REQUEST BODY
{
"warrantyPeriod": 12,
"serialNumber": "ser123",
"purchaseDate": "2019-07-03",
"amount": "45000",
"warrantyExpiryDate": "2020-07-03",
"documents": [
{
"documentName": "Invoice",
"documentPath": "www.domain.com/invoice.pdf",
"documentExtention": "jpg",
"documentType": "Invoice",
"status": "New"
}
],
"customAttributes": [
{
"propertyName": "imei number",
"dataType": "Alphanumeric",
"propertyValue": "990000862471854"
}
],
"feedbackUrl": "https://www.domain.com/business/gb_en/all-industries/retail",
"elearningUrl": "https://www.domain.com/elearning/portal"
}
Type
object
RESPONSE BODY
200
{
"status": {
"statusCode": 0,
"errorMessages": null,
"errorArguments": null
},
"message": {
"tenantId": "58acaf38-c6bc-402c-aa14-17cf5b94cff0",
"createdDate": "2019-07-04T07:15:13.932+0000",
"updatedDate": "2019-07-04T07:15:14.265+0000",
"digitalkitId": "a6850cc1-b65b-46dc-83e0-4ed1747df857",
"digitalkitCode": "INDK0000138540",
"productId": "07ddd15d-bd14-4e2e-8479-1c9c5ad55013",
"productModel": "S10",
"productCategory": "Electronics",
"productSubCategory": "Mobile",
"manufacturer": "Samsung",
"purchaseDate": "2019-07-03",
"consumerName": "raj"
}
}
Type
object
Update digitalkit status
POST: /digitalkit/updateStatus
updates the status of the digitalkit
HTTP Request
POST https://app.nhancenow.com/b2b/api/v1/digitalkit/updateStatus
Possible Responses
200
Status 200
Update digitalkit status
CURL EXAMPLE
curl -X POST "https://app.nhancenow.com/b2b/api/v1/digitalkit/updateStatus" \
-d @request_body
REQUEST BODY
{
"digitalkitId": "a6850cc1-b65b-46dc-83e0-4ed1747df857",
"status": "ACTIVE"
}
Type
object
RESPONSE BODY
200
{
"status": {
"statusCode": 0,
"errorMessages": null,
"errorArguments": null
}
}
Type
Object
List all digitalkits
GET: /digitalkit/digitalkits
Lists all existing digitalkits. The digitalkits are returned sorted by creation date, with the most recent digitalkits appearing first. In addition to the attributes listed on the pagination section, the following optional parameters can be used to refine the response.
HTTP Request
GET https://app.nhancenow.com/b2b/api/v1/digitalkit/digitalkits
Query Parameters
pageSize
Size of the page to retrieve.
Property | Value |
---|---|
required | false |
type | integer |
examples | 10 |
pageNumber
Number of the page to retrieve.
Property | Value |
---|---|
required | false |
type | number |
examples | 1 |
digitalKitCode
digitalkit code that was returned upon digitalkit creation
Property | Value |
---|---|
required | false |
type | string |
productSerialNumber
serial number of the digitalkit
Property | Value |
---|---|
required | false |
type | string |
examples | ser123 |
productSubCategory
Sub category of the product
Property | Value |
---|---|
required | false |
type | string |
examples | Mobile |
manufacturer
Manufacturer of the product
Property | Value |
---|---|
required | false |
type | string |
examples | Samsung |
consumerMobileNumber
mobile number of the consumer
Property | Value |
---|---|
required | false |
type | string |
consumerEmailId
email id of the consumer
Property | Value |
---|---|
required | false |
type | string |
consumerName
name of the consumer
Property | Value |
---|---|
required | false |
type | string |
issueFromDate
Filter files with date equal or later than specified date."
Property | Value |
---|---|
required | false |
type | string |
examples | 2019-07-01 |
issueToDate
Filter files with date equal or sooner than specified date.
Property | Value |
---|---|
required | false |
type | string |
examples | 2019-07-02 |
Possible Responses
200
Status 200
400
Status 400
List all digitalkits
CURL EXAMPLE
curl -X GET "https://app.nhancenow.com/b2b/api/v1/digitalkit/digitalkits?pageSize=10&pageNumber=1&productSerialNumber=ser123&productSubCategory=Mobile&manufacturer=Samsung&issueFromDate=2019-07-01&issueToDate=2019-07-02"
RESPONSE BODY
200
{
"status": {
"statusCode": 0,
"errorMessages": null,
"errorArguments": null
},
"results": [
{
"tenantId": "58acaf38-c6bc-402c-aa14-17cf5b94cff0",
"createdDate": "2019-07-04T07:15:13.932+0000",
"updatedDate": "2019-07-04T07:15:14.265+0000",
"digitalkitId": "a6850cc1-b65b-46dc-83e0-4ed1747df857",
"digitalkitCode": "INDK0000138540",
"productId": "07ddd15d-bd14-4e2e-8479-1c9c5ad55013",
"productModel": "S10",
"productCategory": "Electronics",
"productSubCategory": "Mobile",
"manufacturer": "Samsung",
"purchaseDate": "2019-07-03",
"consumerName": "raj"
}
],
"count": 1
}
Type
array