1. Help Center
  2. Idencia Management Portal

Does Idencia have an API I can use to integrate with other systems?

In this article, get an in depth description of Idencia's open API

Overview

There is a need for external systems to provide data to the Idencia Management Portal and retrieve data from the Idencia Management Portal. By providing bi-directional data exchange, we can:

  1. Improve overall efficiency and productivity
  2. Reduce clerical work and transcription errors
  3. Add visibility and transparency to data
  4. Improve overall quality control

Scope

Data transfer via API is limited to the data associated with Items, Item Types, Jobs, and Customers.

Configuration

The Idencia Management Portal exists in a cloud environment. Interfacing systems may be on premise and/or behind a firewall, however; using the API, data exchange will not be a problem if the interfacing system uses the appropriate API key for GET, PUT and POST calls. This will also be the case if the interfacing system is a cloud hosted system.

Calls

GET

Get items modified before or after a given date/time

URL

/api/Items

Param Name

Description

modifiedAfter

 

modifiedBefore

 

Success Response            

<ArrayOfItem> - the top level of the returned list of items.

  • <Item> (multiple) - a single item in the list
    • <Id> - The internal unique identifier for the item.  This is a 16 byte GUID.
    • <IsDeleted> - A flag to indicate if the item has been deleted.  'true' if deleted, or 'false' if not deleted.
    • <ModifiedOnServerUtc> - The UTC date/time stamp the item was last modified on the server.
    • <CreatedById> - The unique identifier of the user who created the item.
    • <CreatedBy> - The first and last name of the user who created the item.
    • <CreatedOnUtc> - The UTC date/time stamp the item was created.
    • <IsProcessComplete> - A flag to indicate if the item is currently running a process or not.  'true' if no process is running, or 'false' if a process is running.
    • <HasFailedSteps> - A flag to indicate if the item has Pass/Fail steps in the current process marked as Failed. 'true' if there are failed steps, 'false' if there are no failed steps.
    • <SerialNumber> - The serial number assigned to the item.
    • <CUSTOM PROPERTY NAME> (multiple) - The name of all Item Custom Properties that have been set are listed at this level.  The value if this tag is the current value of this custom property.
    • <ItemType> - Under this tag is all of the information about the Item Type of this Item.
      • <Id> - The internal unique identifier for the item type.  This is a 16 byte GUID.
      • <Number> - The item type's Number field.
      • <Name> - The item type's Name field
      • <ModifiedOnServerUtc> - The UTC date/time stamp the item type was last modified on the server.
      • <CUSTOM PROPERTY NAME> (multiple) - The name of all Item Type Custom Properties that have been set are listed at this level.  The value if this tag is the current value of this custom property.
    • <Process> (multiple) - Under this tag is all of the information about a process.  If more than one process has been run on an item, this tag is used for each process.
      • <Name> - The name of the phase.
      • <Step> (multiple) - This tag indicates a step within this phase of the process.
        • <Name> - The name of the step.
        • <StepType> - The type of step.  Can be "Pass, Fail", "Set *CUSTOM PROPERTY NAME*", "Take Picture", "Set GPS location".
        • <ModifiedOnServerUtc> - The UTC date/time stamp the step was last modified on the server.
        • <ModifiedById> - The unique identifier of the user who recorded the step.
        • <ModifiedBy> - The first and last name of the user who recorded the step.
        • <StepResult> - The recorded value of the step.
          If Step Type is "Pass, Fail", result can be "Pass" or "Fail".
          If Step type is "Set *CUSTOM PROPERTY NAME*", result is value set for custom property.
        • <ModifiedOnUtc> - The UTC date/time the step was recorded on the device.
      • <Name> - The name of the process.
      • <Phase> (multiple) - This tag indicates a phase within the process.  This tag is used for each phase in the process.

Additional Notes

In addition to the Modified Date filter used in the GET call, there are two additional parameters that can be set in Azure that will affect the data returned by the API.

 

Item Grouping: The value of this parameter must be an Item Custom Property name.  If this setting is defined, the XML tree that is returned will include an <ItemGrouping> node for each different value of the custom property defined for the Item Grouping.  For example, if you have an Item Custom Property called "Inspection Date" and would like items in the XML tree to be grouped by Inspection Date, this setting can provide that grouping.

 

Item Filter:  The value of this parameter is an expression that controls which items are returned from the API call. If this setting is not used, ALL items modified after the requested date are returned.  If the setting is used, then ONLY the items where the result of the expression is True are returned.  For example, you can use this filter to make sure the API only returns items that have been inspected by setting the parameter to the expression '([Inspection Date] != NULL)'.

 

These two parameters are set in Azure and cannot be overridden via the GET call, nor updated by the customer.  These settings can only be set by Idencia staff.  Please contact your customer liaison for additional information.

Example Call

https://<server name>.idencia.net/api/items?ModifiedAfter=<date and time>

  • Where <server name> is the sub-domain name for the Idencia website
  • And <date and time> is a date/time formatted as "yyyy-MM-ddThh:mm:ss", for example 2018-05-24T14:32:24.  The date and time should be in UTC time zone.

When you make this call, you will receive an XML tree of all Items that have been modified since the date/time that you specify.  This way you can make repetitive calls to the API and save the date/time that you make each call.  On subsequent calls, you can specify the date/time of the previous call and only the Items that have been modified since the last call will be returned.


 

POST

Create New Items

URL

/api/Item

Body Parameters

Param Name

Description

Key

API key

number

Serial number of item

itemtype

number of item type to use for this item

properties

list of custom property values (all properties not included in this list will be set to NULL)

Custom Property Value

name

name of custom property

value

value of custom property

Headers

Key

Value

Content-Type

application/json

Response Codes

200

OK

400

this is returned if the request is bad due to various reasons including:

·       Item's Item Type Number does not exist in database

·       Item's Custom Property name does not exist in database

·       Item's Custom Property value does not match the Custom Property type

401

Authorization key is invalid or does not exist

Example Call

{

   "key": "{api-key}",  

   "number": "1558440247",

   "itemtype": "test custom item type",

   "properties": [

       {

           "name": "Form ID",

           "value": "1"

       }

   ]

}

Additional Notes

A new item cannot be created inside of a Job. The item must first be created as a stock item. It can then be updated to have a Job and Custom Item Type with a PUT call.

 

Create New Item Type

URL

/api/ItemType

Body Parameters

Param Name

Description

Key

API key

number

unique number of item type

name

Name of the new item type

process

the name of the Default Process to run when a new Item of this type is scanned for the first time (this can be an empty string, "", for no default Process)

properties

list of custom property values (all properties not included in this list will be set to NULL)

Custom Property Value

name

name of custom property

value

value of custom property

Headers

Key

Value

Content-Type

application/json

Response Codes

200

OK

400

this is returned if the request is bad due to various reasons including:

·       Item Type's Process name does not exist in database

·       Item Type's Property name does not exist in database

·       Item Type's Property value does not match property type

401

Authorization key is invalid or does not exist

500

This is returned if the Item Type Number already exists in the database

Example Call

{

   "key": "{api-key}",  

   "number": "123456789",

   "name": "test item type",

   "process": "sample process name",

   "properties": [

       {

           "name": "Weight",

           "value": "250"

       }

   ]

}

Additional Notes

Only stock item types can be created via the API at this time. Jobs and Custom item types within a Job must be created via the Management Portal.

 

PUT

Update an existing item

URL

/api/Item

Body Parameters

Param Name

Description

Key

API key

number

serial number of the item to be updated

job (optional)

job number to which the item should be assigned (must exist in the database)

itemtype

item type number or custom item type number (if job defined) to which the item should be assigned

properties

list of custom property values (properties not included in this list will be ignored, all properties included in this list with value =null or empty will be set to NULL)

Custom Property Value

name

name of custom property

value

value of custom property

Headers

Key

Value

Content-Type

application/json

Response Codes

200

OK

401

If authorization key is invalid or not exists

404

An item with a particular number does not exist

409

Any property can not be updated

Example Call

{

   "key": "{api-key}",  

   "number": "1558440247",

   "job": "test job",

   "itemtype": "test custom item type",

   "properties": [

       {

           "name": "Form ID",

           "value": "1"

       }

   ]

}

 

Update Single property of an Existing Item

Update Existing Item

URL

/api/Item/customproperty

Body Parameters

Param Name

Description

Key

API key

ItemNumber

number of item

CustomPropertyName

name of custom property

CustomPropertyValue

value of custom property

Headers

Key

Value

Content-Type

application/json

Response Codes

200

OK

401

If authorization key is invalid or not exists

404

An item with a particular number does not exist

409

Any property can not be updated

Example Call

{

   "key": "0",

   "ItemNumber": "1557923345",

   "CustomPropertyName":"Date Produced",

    "CustomPropertyValue":"34"

}