# Quantity test results

A job request may require a quantity measurement. Quantity is an estimated amount of product to be loaded, discharged, sampled or pumped. A job requiring a quantity inspection indicates items to measure and the required units of measurements.

An authorized party can use the following endpoints to retrieve and submit quantity measurement results.

# Data Model

# Quantity result

Field Type Description
workspace reference ​ Workspace ID
parent reference ​ Id of the job document for this quantity test results
date datetime Test date and time
direction string source or destination. Each job would have one quantity result document for each direction. For example, in the case of a discharge operation, the vessel quantity data would be submitted as the source and the shore as the destination.
activeShoreTank boolean
measurements Array<Quantity measurement> Quantity measurements for different data points with requested units of measure
waterMethod string
waterPerc float
sedimentMethod string
densityMethod string
density15c float
sedimentWaterPerc float
meanTemp.value float Mean temperature value
meanTemp.uom Catalog reference Mean temperature unit of measure
vcftable Catalog reference
api float

# Measurement

Field Type Description
code string Measurement code from client's integrated system
name string Measurement name. E.g. GSV, TCV, etc.
uom Catalog reference Unit of measure
value float Measured value

# API

# List all the quantity tests results

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

# 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 quantity test result

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

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

# 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
{
  "date": "2019-06-28T14:00:00.000Z",
  "direction": "source",
  "activeShoreTank": true,
    "measurements": [
        {
            "code": "TCV",
            "name": "Total Calculated Volume",
            "value": 123.456,
            "uom": "d49ba3fc-5442-4d0e-9cd3-045b67211058"
        }
        {
            "code": "GSV",
            "name": "Gross Standard Volume",
            "value": 123.456,
            "uom": "c41fd0c2-210b-54cd-9641-3637d17cb8ae"
        }
        {
            "code": "NSV",
            "name": "Net Standard Volume",
            "value": 123.456,
            "uom": "4ac871b7-2a97-52de-b57b-42e0ca631609"
        }
    ],
    "waterMethod": "Karl Fischer",
    "waterPerc": 0.02,
    "sedimentMethod": "ASTM D 4807",
    "sedimentPerc": 0.03,
    "densityMethod": "ASTM D1298",
    "density15c": 0.1,
    "sedimentWaterPerc": 0.2,
    "meanTemp": {
        "value": 100,
        "uom": "c544eba3-2c67-4d32-869e-7b78adce536a"
    },
    "vcfTable": "ce580152-0a6b-4071-9f56-ad0a4d5f1c47",
    "api": 8
}

# Response example:

hide code
{
    "id": "a0a20ae2-b1fb-4e0f-ae13-710c9598d7ad",
    "body": {
        "date": "2019-06-28T14:00:00.000Z",
        "direction": "source",
        "activeShoreTank": true,
        "measurements": [
            {
                "code": "TCV",
                "name": "Total Calculated Volume",
                "value": 123.456,
                "uom": "d49ba3fc-5442-4d0e-9cd3-045b67211058"
            }
            {
                "code": "GSV",
                "name": "Gross Standard Volume",
                "value": 123.456,
                "uom": "c41fd0c2-210b-54cd-9641-3637d17cb8ae"
            }
            {
                "code": "NSV",
                "name": "Net Standard Volume",
                "value": 123.456,
                "uom": "4ac871b7-2a97-52de-b57b-42e0ca631609"
            }
          ],
       "waterMethod": "Karl Fischer",
       "waterPerc": 0.02,
       "sedimentMethod": "ASTM D 4807",
       "sedimentPerc": 0.03,
       "densityMethod": "ASTM D1298",
       "density15c": 0.1,
       "sedimentWaterPerc": 0.2,
       "meanTemp": {
          "value": 100,
          "uom": "c544eba3-2c67-4d32-869e-7b78adce536a"
      },
       "vcfTable": "ce580152-0a6b-4071-9f56-ad0a4d5f1c47",
       "api": 8
    }

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

# Get a single quantity test result

GET /workspaces/{workspace_id}/jobs/{job_id}/quantity/{quantity_id}

# URL parameters

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

# Response example:

hide code
{
    "date": "2019-06-28T14:00:00.000Z",
    "direction": "source",
    "activeShoreTank": true,
    "measurements": [
        {
            "code": "TCV",
            "name": "Total Calculated Volume",
            "value": 123.456,
            "uom": "d49ba3fc-5442-4d0e-9cd3-045b67211058"
        }
        {
            "code": "GSV",
            "name": "Gross Standard Volume",
            "value": 123.456,
            "uom": "c41fd0c2-210b-54cd-9641-3637d17cb8ae"
        }
        {
            "code": "NSV",
            "name": "Net Standard Volume",
            "value": 123.456,
            "uom": "4ac871b7-2a97-52de-b57b-42e0ca631609"
        }
    ],
    "waterMethod": "Karl Fischer",
    "waterPerc": 0.02,
    "sedimentMethod": "ASTM D 4807",
    "sedimentPerc": 0.03,
    "densityMethod": "ASTM D1298",
    "density15c": 0.1,
    "sedimentWaterPerc": 0.2,
    "meanTemp": {
        "value": 100,
        "uom": "c544eba3-2c67-4d32-869e-7b78adce536a"
    },
    "vcfTable": "ce580152-0a6b-4071-9f56-ad0a4d5f1c47",
    "api": 8
}

# Update a quantity test result

PATCH /workspaces/{workspace_id}/jobs/{job_id}/quantity/{quantity_id}

# URL parameters

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

# Request body

See data model

# Request example:

hide code
{
    "direction": "destination"
}

# Response example:

hide code
{
    "id": "a0a20ae2-b1fb-4e0f-ae13-710c9598d7ad",
    "body": {
        "date": "2019-06-28T14:00:00.000Z",
        "direction": "destination",
        "activeShoreTank": true,
    "measurements": [
        {
            "code": "TCV",
            "name": "Total Calculated Volume",
            "value": 123.456,
            "uom": "d49ba3fc-5442-4d0e-9cd3-045b67211058"
        }
        {
            "code": "GSV",
            "name": "Gross Standard Volume",
            "value": 123.456,
            "uom": "c41fd0c2-210b-54cd-9641-3637d17cb8ae"
        }
        {
            "code": "NSV",
            "name": "Net Standard Volume",
            "value": 123.456,
            "uom": "4ac871b7-2a97-52de-b57b-42e0ca631609"
        }
    ],
    "waterMethod": "Karl Fischer",
    "waterPerc": 0.02,
    "sedimentMethod": "ASTM D 4807",
    "sedimentPerc": 0.03,
    "densityMethod": "ASTM D1298",
    "density15c": 0.1,
    "sedimentWaterPerc": 0.2,
    "meanTemp": {
        "value": 100,
        "uom": "c544eba3-2c67-4d32-869e-7b78adce536a"
    },
    "vcfTable": "ce580152-0a6b-4071-9f56-ad0a4d5f1c47",
    "api": 8
    }

# Delete a quantity test result

DELETE /workspaces/{workspace_id}/jobs/{job_id}/quantity/{quantity_id}

# URL parameters

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

# Response example:

hide code
{
    "date": "2019-06-28T14:00:00.000Z",
    "direction": "source",
    "activeShoreTank": true,
    "measurements": [
        {
            "code": "TCV",
            "name": "Total Calculated Volume",
            "value": 123.456,
            "uom": "d49ba3fc-5442-4d0e-9cd3-045b67211058"
        }
        {
            "code": "GSV",
            "name": "Gross Standard Volume",
            "value": 123.456,
            "uom": "c41fd0c2-210b-54cd-9641-3637d17cb8ae"
        }
        {
            "code": "NSV",
            "name": "Net Standard Volume",
            "value": 123.456,
            "uom": "4ac871b7-2a97-52de-b57b-42e0ca631609"
        }
    ],
    "waterMethod": "Karl Fischer",
    "waterPerc": 0.02,
    "sedimentMethod": "ASTM D 4807",
    "sedimentPerc": 0.03,
    "densityMethod": "ASTM D1298",
    "density15c": 0.1,
    "sedimentWaterPerc": 0.2,
    "meanTemp": {
        "value": 100,
        "uom": "c544eba3-2c67-4d32-869e-7b78adce536a"
    },
    "vcfTable": "ce580152-0a6b-4071-9f56-ad0a4d5f1c47",
    "api": 8
}
Last Updated: 8/24/2021, 7:59:53 PM