Getting Started
All API requests require an authorization token – reference our Authentication page for more information
Best Practice RecommendationUse GetFormCompliance to review all currently required fields, values, and compliance criteria. This API allows updates to be added or changed to existing forms. Implementation best practice is to utilize the default compliance setting for better form performance.
Note: the main changes within this request from the previous Request JSON example are to the ComplianceValue and IsDefault fields for the Compliance section of:
- Was shift leader notified
- Was the product retrieved by QA
API Structure
POST api/Integration/AddUpdateFormCompliance
Required Request Parameters
Name | Location | Description |
---|---|---|
Authorization token | Header | See Login Authentication API documentation |
Operation | Body | Operation taken for the given API call. "Insert" - add new resource(s) and compliance. "Update" - update compliance for existing resources. |
PartialSucess | Body | Flag used to indicate if only a portion of the request can be completed to evaluate only that portion. Recommend default True. |
RequestNo | Body | Recommended unique for each request, visible within the UI for troubleshooting. |
Data | Body | Use response to GetFormCompliance with applicable changes made |
Request JSON
{
"Operation": "Update",
"PartialSuccess": "true",
"RequestNo": "API-AddUpdateFormCompliance-ss001",
"Data": {
"Forms": [{
"Type": "Check",
"FormData": {
"FormDetails": {
"Fields": [{
"Type": "Numeric",
"ElementType": "Field",
"Configuration": [{
"Compliance": {
"DataType": "Numeric",
"Min": null,
"Max": null,
"Target": null,
"UOM": null,
"ComplianceValue": null
},
"IsVisible": true,
"Subject": {
"Id": "2d212701-73d8-4ba9-a725-722abef5da02",
"Name": "Default"
},
"IsValid": false,
"IsDefault": false
}, {
"Compliance": {
"DataType": "Numeric",
"Min": null,
"Max": null,
"Target": null,
"UOM": null,
"ComplianceValue": null
},
"IsVisible": true,
"Subject": {
"Id": "72d2b865-1600-485c-b9f1-28b1d8e2dfc7",
"Name": "Equipment > Equipment > Quality Control > Metal Detector"
},
"IsValid": false,
"IsDefault": false
}
],
"ShortName": "Number of bags rejected",
"Id": "241cb5ea-b132-41ad-a837-21c37c1cb357",
"Name": "Number of bags rejected"
}, {
"Type": "SelectOne",
"Options": [{
"Id": "9dd3c4b6-a475-41ac-ac5d-9b462da804dc",
"Name": "Yes"
}, {
"Id": "fd8a5a76-8f3d-48dd-9a58-281668c03df9",
"Name": "No"
}
],
"ElementType": "Field",
"Configuration": [{
"Compliance": {
"DataType": "SelectOne",
"Min": null,
"Max": null,
"Target": null,
"UOM": null,
"ComplianceValue": "Yes"
},
"IsVisible": true,
"Subject": {
"Id": "72d2b865-1600-485c-b9f1-28b1d8e2dfc7",
"Name": "Equipment > Equipment > Quality Control > Metal Detector"
},
"IsValid": false,
"IsDefault": true
}, {
"Compliance": {
"DataType": "SelectOne",
"Min": null,
"Max": null,
"Target": null,
"UOM": null,
"ComplianceValue": "Yes"
},
"IsVisible": false,
"Subject": {
"Id": "2d212701-73d8-4ba9-a725-722abef5da02",
"Name": "Default"
},
"IsValid": false,
"IsDefault": true
}
],
"ShortName": "Was shift leader notified",
"Id": "a501260d-4dea-4be8-b125-900bcf563f4b",
"Name": "Was shift leader notified?"
}, {
"Type": "SelectOne",
"Options": [{
"Id": "be4b8e70-b0d5-42e3-85c3-2f382e85cb99",
"Name": "Yes"
}, {
"Id": "6190f476-5f12-4a6f-b1b1-0221440829f2",
"Name": "No"
}
],
"ElementType": "Field",
"Configuration": [{
"Compliance": {
"DataType": "SelectOne",
"Min": null,
"Max": null,
"Target": null,
"UOM": null,
"ComplianceValue": "Yes"
},
"IsVisible": true,
"Subject": {
"Id": "2d212701-73d8-4ba9-a725-722abef5da02",
"Name": "Default"
},
"IsValid": false,
"IsDefault": true
}, {
"Compliance": {
"DataType": "SelectOne",
"Min": null,
"Max": null,
"Target": null,
"UOM": null,
"ComplianceValue": "Yes"
},
"IsVisible": true,
"Subject": {
"Id": "72d2b865-1600-485c-b9f1-28b1d8e2dfc7",
"Name": "Equipment > Equipment > Quality Control > Metal Detector"
},
"IsValid": false,
"IsDefault": true
}
],
"ShortName": "Was the product retrieved",
"Id": "4056e7b5-8350-491b-a8d7-c4041b7eece3",
"Name": "Was the product retrieved by QA?"
}, {
"Type": "Paragraph",
"ElementType": "Field",
"Configuration": [{
"Compliance": {
"DataType": "Paragraph",
"Min": null,
"Max": null,
"Target": null,
"UOM": null,
"ComplianceValue": null
},
"IsVisible": true,
"Subject": {
"Id": "2d212701-73d8-4ba9-a725-722abef5da02",
"Name": "Default"
},
"IsValid": false,
"IsDefault": false
}, {
"Compliance": {
"DataType": "Paragraph",
"Min": null,
"Max": null,
"Target": null,
"UOM": null,
"ComplianceValue": null
},
"IsVisible": true,
"Subject": {
"Id": "72d2b865-1600-485c-b9f1-28b1d8e2dfc7",
"Name": "Equipment > Equipment > Quality Control > Metal Detector"
},
"IsValid": false,
"IsDefault": false
}
],
"ShortName": "Comments:",
"Id": "c55fc8eb-c700-4f83-b803-4d41c1e7703a",
"Name": "Comments:"
}
]
}
},
"Version": "2.0",
"Resources": [{
"Id": "2d212701-73d8-4ba9-a725-722abef5da02",
"Name": "Default"
}, {
"Id": "72d2b865-1600-485c-b9f1-28b1d8e2dfc7",
"Name": "Equipment > Equipment > Quality Control > Metal Detector"
}
],
"isPartial": false,
"ActionType": null,
"Id": "64929aee-ab7a-4273-9e9f-f3c63dae743e",
"Name": "Metal Detector Check"
}
]
},
"Status": true,
"Errors": null,
"RefreshToken": false
}
Response Parameters
Name | Description |
---|---|
RequestID | Use this GUID within our GetBatchStatus API to request updates on when the request will be processed outside of the UI. See Request Status API documentation. |
RequestStatus | If no syntax errors are present the default response is Pending until the request can be processed. |
RequestError | Error object providing information if an error occurs |
Status | Indicating the success of the API request |
Response JSON
{
"RequestId": "eb93fe2d-d949-43ef-a18d-4ae56d84e369",
"RequestStatus": "Pending",
"RequestError": null,
"Status": true,
"Errors": null,
"RefreshToken": false
}