# Quality test results

When a job occurs, one of the things an inspector may be instructed to do is to test for quality. In this case, the client would specify the properties or characteristics of the product the inspector should test for. Generally, the inspector would draw samples from the shore, the vessel, or different tanks. These samples are then brought to the lab where the tests are performed.

# Data Model

Field Type Description
workspace reference ​ Workspace ID
parent reference ​ Id of the job document for this quality result
setNumber int Quality test set number. Required for Navarik Inspection integration
testNumber int Quality test number in the set. Required for Navarik Inspection integration
sample.refNumber string Inspector's reference number for this sample
sample.description string Sample description
sample.sealNumber string Sample seal number
sample.sampleNumber string
sample.location string Sample location code
test Catalog reference Performed test
method Catalog reference Test method
uom Catalog reference Unit of measure
date datetime Date and time of the test (optional)
resultOperator string Result operator. Possible values: lte, gte, lt, gt, eq
result string Result value. A stringified value is expected since results can be numeric (float, int) or string or boolean depending on the test and test method.
notes string Additional comments.
isRetestNeeded boolean true if the client determined that the retest is needed
isOffSpec boolean Used for Navarik Inspection integration. true if NI determines the result to be off specification.
isPassed boolean Used for Navarik Inspection integration. true if NI determines the result be satisfactory.
isPreviouslySubmitted boolean
isPerformed boolean

# API

# List all quality tests results

Retrieves all the quality results submitted to a job.

GET /workspaces/{workspace_id}/jobs/{job_id}/quality

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference

# Query parameters

​ Parameter Description Format Default
limit Maximum number of records to return integer
offset The number of records to skip integer 0
sort List of comma-separated ordering criteria field:asc|desc
data model field Name of the field to search for. Any field from the data model can be used any

# Create a quality test result

Creates a quality test result and attaches it to the job specified in the id.

POST /workspaces/{workspace_id}/jobs/{job_id}/quality

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference

# Request body

See data model

# Request example:

hide code
{
  "setNumber": 3,
  "sample": {
    "refNumber": "123123",
    "sealNumber": "AAAA",
    "location": "Singapore"
  },
  "test": {
    "xref": "test-678",
    "name": "Hexene"
  },
  "method": {
    "xref": "method-123",
    "name": "ASTM 5059"
  },
  "uom": {
    "xref": "uom-456",
    "name": "vol%"
  },
  "testDate": "2019-06-28T14:00:00.000Z",
  "result": "passed",
  "comment": "quality test performed",
  "isRetestNeeded": false,
  "isOffSpec": false,
  "isPreviouslySubmitted": false,
  "isPerformed": true,
  "isPassed": true
}

# Response example:

hide code
{
    "id": "3ab73186-e31d-4254-a9da-5bbeedc843aa",
    "body": {
        "setNumber": 3,
        "testNumber": null,
        "sample": {
            "refNumber": "123123",
            "sealNumber": "AAA-111",
            "location": "Singapore"
        },
        "test": {
            "id": "90362f46-efd0-4092-b2e4-84f4bbc9643d",
            "xref": "test-678",
            "name": "Hexene"
        },
        "method": {
            "id": "f3993087-8c76-4f13-88c0-879faeefd31c",
            "xref": "method-123",
            "name": "ASTM 5059"
        },
        "uom": {
            "id": "a9f3bb3a-28fa-4521-b664-cf41ada40732",
            "xref": "uom-456",
            "name": "vol%"
        },
        "testDate": "2019-06-28T14:00:00.000Z",
        "result": "passed",
        "comment": "quality test performed",
        "isRetestNeeded": false,
        "isOffSpec": false,
        "isPreviouslySubmitted": false,
        "isPerformed": true,
        "isPassed": true
    }
}

Creation of a quality result adds missing records to the catalogs. Mapped catalogs include: methods, locations, transports, products, uom, tests, timelogEvents.

# Get a specific quality test result

GET /workspaces/{workspace_id}/jobs/{job_id}/quality/{quality_id}

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference
quality_id Quality id reference

# Response example:

hide code
[
    {
        "id": "5a32df72-03da-4d46-b5d7-5cf86158c2b2",
        "body": {
            "setNumber": 3,
            "testNumber": null,
            "sample": {
                "refNumber": "123123",
                "description": null,
                "sealNumber": "AAAA",
                "sampleNumber": null,
                "location": "Singapore"
            },
            "test": {
                "id": "46135159-a7af-48b4-a66a-52877f36f302",
                "xref": "test-678",
                "name": "Hexene"
            },
            "method": {
                "id": "c9f3d7d8-b222-4367-876e-3145eee57075",
                "xref": "method-123",
                "name": "ASTM 5059"
            },
            "uom": {
                "id": "b83891d7-a2b5-4597-808c-c4e6b6dfffee",
                "xref": "uom-456",
                "name": "vol%"
            },
            "testDate": "2019-06-28T14:00:00.000Z",
            "resultOperator": null,
            "result": "passed",
            "comment": "quality test performed",
            "isRetestNeeded": false,
            "isOffSpec": false,
            "isPreviouslySubmitted": false,
            "isPerformed": true,
            "isPassed": true
        }
    }
]

# Update a quality test result

PATCH workspaces/{workspace_id}/jobs/{job_id}/quality/{quality_id}

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference
quality_id Quality id reference

# Request body

See data model

# Request example:

hide code
{
  "sample": {
    "sealNumber": "A-123",
    "location": "Singapore"
  }
}

# Response example:

hide code
{
    "sample": {
       "refNumber": null,
        "description": null,
        "sealNumber": "A-123",
        "sampleNumber": null,
        "location": "Singapore"
    },
    "test": {
        "id": "90362f46-efd0-4092-b2e4-84f4bbc9643d",
        "xref": "test-678",
        "name": "Hexene"
    },
    "method": {
        "id": "f3993087-8c76-4f13-88c0-879faeefd31c",
        "xref": "method-123",
        "name": "ASTM 5059"
    },
    "uom": {
        "id": "a9f3bb3a-28fa-4521-b664-cf41ada40732",
        "xref": "uom-456",
        "name": "vol%"
    },
    "testDate": "2019-06-28T14:00:00.000Z",
    "resultOperator": null,
    "result": "passed",
    "comment": "quality test performed",
    "isRetestNeeded": false,
    "isOffSpec": false,
    "isPreviouslySubmitted": false,
    "isPerformed": true,
    "isPassed": true
}

# Delete a quality test result

DELETE /workspaces/{workspace_id}/jobs/{job_id}/quality/{quality_id}

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference
quality_id Quality id reference

# Response example:

hide code
{
    "setNumber": 3,
    "testNumber": null,
    "sample": {
        "refNumber": "123123",
        "description": null,
        "sealNumber": "A-123",
        "sampleNumber": null,
        "location": "Singapore"
    },
    "test": {
        "id": "46135159-a7af-48b4-a66a-52877f36f302",
        "xref": "test-678",
        "name": "Hexene"
    },
    "method": {
        "id": "c9f3d7d8-b222-4367-876e-3145eee57075",
        "xref": "method-123",
        "name": "ASTM 5059"
    },
    "uom": {
        "id": "b83891d7-a2b5-4597-808c-c4e6b6dfffee",
        "xref": "uom-456",
        "name": "vol%"
    },
    "testDate": "2019-06-28T14:00:00.000Z",
    "resultOperator": null,
    "result": "passed",
    "comment": "quality test performed",
    "isRetestNeeded": false,
    "isOffSpec": false,
    "isPreviouslySubmitted": false,
    "isPerformed": true,
    "isPassed": true
}
Last Updated: 8/24/2021, 7:59:53 PM