# Grades Catalog

# Search all grades

To perform this operation, you must be authenticated by means of one of the following methods: sessionAuth

# GET /grades

Parameters

Name In Type Required Description
page query integer false Page
Default: 1
resultsPerPage query integer false Results per page
Default: 25
Maximum: 200
dateModifiedFrom query string(date-time) false Date modified from
Example: 2016-01-16 00:00:00
dateModifiedTo query string(date-time) false Date modified to
Example: 2016-02-16 23:59:59
clientCodes query string false Client codes in JSON format
Example: ["code1","code2"]
Maximum: 200

# Response example:

200 Response

{
  "totalResultsAvailable": 0,
  "firstResultPosition": 0,
  "resultsPerPage": 0,
  "results": [
    {
      "clientCode": "string",
      "name": "string",
      "gradeTypeCode": "string",
      "description": "string",
      "gradeStatusCode": "ACTIVE",
      "isSensitive": true,
      "dateCreated": "string",
      "creator": "string",
      "dateModified": "string",
      "modifier": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK (opens new window) Successful response Grades

Code examples:

# You can also use wget
curl -X GET /api/rest/1.0/grades \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('/api/rest/1.0/grades',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/api/rest/1.0/grades', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

# Get details of a grade

To perform this operation, you must be authenticated by means of one of the following methods: sessionAuth

# GET /grades/{clientCode}

Parameters

Name In Type Required Description
clientCode path string true Resource client code

# Response example:

200 Response

{
  "clientCode": "string",
  "name": "string",
  "gradeTypeCode": "string",
  "description": "string",
  "gradeStatusCode": "ACTIVE",
  "isSensitive": true,
  "dateCreated": "string",
  "creator": "string",
  "dateModified": "string",
  "modifier": "string"
}

Responses

Status Meaning Description Schema
200 OK (opens new window) Successful response GradeExtra

Code examples:

# You can also use wget
curl -X GET /api/rest/1.0/grades/{clientCode} \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('/api/rest/1.0/grades/{clientCode}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/api/rest/1.0/grades/{clientCode}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

# Create or update a grade

To perform this operation, you must be authenticated by means of one of the following methods: sessionAuth

# PUT /grades/{clientCode}

Parameters

Name In Type Required Description
clientCode path string true Resource client code
body body object true none
name body string true Grade name
gradeTypeCode body string true Grade type
description body string true Grade description
gradeStatusCode body string true Grade status
isSensitive body boolean true Grade is sensitive

# Enumerated Values

Parameter Value Parent Grade Category / Description
gradeTypeCode NDP_BIODIESEL Biofuel / Biodiesel
gradeTypeCode NDP_ETHANOL Biofuel / Ethanol
gradeTypeCode NDP_HYDROGEN Chemical / Hydrogen
gradeTypeCode NDP_SULFUR Chemical / Sulfur
gradeTypeCode NDP_CONDENSATE Crudes / Condensate
gradeTypeCode NDP_CRUDE Crudes / Crude
gradeTypeCode NDP_SYNTHETIC_CRUDE Crudes / Synthetic Crude
gradeTypeCode NDP_CYCLE_OIL Cutter / Cycle Oil
gradeTypeCode NDP_ATMOSPHERIC_RESIDUE Feedstock / Atmospheric Residue
gradeTypeCode NDP_CARBON_BLACK_OIL Feedstock / Carbon Black Oil
gradeTypeCode NDP_COKER_GASOIL Feedstock / Coker Gasoil
gradeTypeCode NDP_DECANT_OIL Feedstock / Decant Oil
gradeTypeCode NDP_HYDROCRAKATE_RECYCLE_OIL Feedstock / Hydrocrakate Recycle Oil
gradeTypeCode NDP_STRAIGHT_RUN_FUEL_OIL Feedstock / Straight Run Fuel Oil
gradeTypeCode NDP_TRANSMIX Feedstock / Transmix
gradeTypeCode NDP_VACUUM_GASOIL Feedstock / Vacuum Gasoil
gradeTypeCode NDP_VACUUM_RESIDUE Feedstock / Vacuum Residue
gradeTypeCode NDP_AVIATION_GASOLINE Gasoline / Aviation Gasoline
gradeTypeCode NDP_MOTOR_GASOLINE Gasoline / Motor Gasoline
gradeTypeCode NDP_ALKYLATE Gasoline Components / Alkylate
gradeTypeCode NDP_COKER_GASOLINE_COKER_NAPHTHA Gasoline Components / Coker Gasoline (Coker Naphtha)
gradeTypeCode NDP_DIMERATE_ISOOCTANE Gasoline Components / Dimerate (IsoOctane)
gradeTypeCode NDP_FLUID_CATALYTIC_CRACKER _GASOLINE_FCC_NAPHTHA Gasoline Components / Fluid Catalytic Cracker Gasoline (FCC Naphtha)
gradeTypeCode NDP_HYDROCRAKATE Gasoline Components / Hydrocrakate
gradeTypeCode NDP_ISOMERATE Gasoline Components / Isomerate
gradeTypeCode NDP_POLYMERATE Gasoline Components / Polymerate
gradeTypeCode NDP_PYROLYSIS_GASOLINE Gasoline Components / Pyrolysis Gasoline
gradeTypeCode NDP_RAFFINATE Gasoline Components / Raffinate
gradeTypeCode NDP_REFORMATE Gasoline Components / Reformate
gradeTypeCode NDP_VISBREAKER_GASOLINE _VISBREAKER_NAPHTHA Gasoline Components / Visbreaker Gasoline (Visbreaker Naphtha)
gradeTypeCode NDP_RESIDUAL_FUEL_OIL Heavy Fuel Oils / Residual Fuel Oil
gradeTypeCode NDP_JET Kerosenes / Jet
gradeTypeCode NDP_KEROSENE Kerosenes / Kerosene
gradeTypeCode NDP_KEROSENE_BLENDSTOCK Kerosenes / Kerosene Blendstock
gradeTypeCode NDP_TETRA_ETHYL_LEAD_TEL Lead / Tetra Ethyl Lead (TEL)
gradeTypeCode NDP_DIESEL_FUELS Light Fuel Oils & Gas Oils / Diesel Fuels
gradeTypeCode NDP_DISTILLATE_BLENDSTOCK Light Fuel Oils & Gas Oils / Distillate Blendstock
gradeTypeCode NDP_LIGHT_FUEL_OIL Light Fuel Oils & Gas Oils / Light Fuel Oil
gradeTypeCode NDP_HEAVY_NAPHTHA_NAPHTHENES _AND_AROMATICS_NAPHTHA Naphthas / Heavy Naphtha (Naphthenes and Aromatics naphtha)
gradeTypeCode NDP_LIGHT_NAPHTHA Naphthas / Light Naphtha
gradeTypeCode NDP_LIQUEFIED_NATURAL_GAS Natural Gas / Liquefied Natural Gas
gradeTypeCode NDP_METHANE Natural Gas / Methane
gradeTypeCode NDP_ETHYL_TERTIARY_BUTYL_ETHER_ETBE Oxygenates / Ethyl Tertiary Butyl Ether (ETBE)
gradeTypeCode NDP_METHANOL Oxygenates / Methanol
gradeTypeCode NDP_METHYL_TERTIARY_BUTYL_ETHER_MTBE Oxygenates / Methyl Tertiary Butyl Ether (MTBE)
gradeTypeCode NDP_TERTIARY_AMYL_METHYL_ETHER_TAME Oxygenates / Tertiary Amyl Methyl Ether (TAME)
gradeTypeCode NDP_AROMATICS Petrochemicals / Aromatics
gradeTypeCode NDP_BENZENE Petrochemicals / Benzene
gradeTypeCode NDP_BUTADIENE Petrochemicals / Butadiene
gradeTypeCode NDP_BUTYLENE Petrochemicals / Butylene
gradeTypeCode NDP_ETHYLENE Petrochemicals / Ethylene
gradeTypeCode NDP_ISOBUTYLENE Petrochemicals / Isobutylene
gradeTypeCode NDP_PROPYLENE Petrochemicals / Propylene
gradeTypeCode NDP_TOULENE Petrochemicals / Toulene
gradeTypeCode NDP_XYLENE Petrochemicals / Xylene
gradeTypeCode NDP_BUTANE Petroleum Gas Liquids (PGLs) / Butane
gradeTypeCode NDP_ETHANE Petroleum Gas Liquids (PGLs) / Ethane
gradeTypeCode NDP_PROPANE Petroleum Gas Liquids (PGLs) / Propane
gradeTypeCode NDP_ASPHALT/BITUMEN Specialty Products / Asphalt/Bitumen
gradeTypeCode NDP_BASE_OILS_&_FINISHED_LUBRICANTS Specialty Products / Base Oils & Finished Lubricants
gradeTypeCode NDP_CARBON_BLACK Specialty Products / Carbon Black
gradeTypeCode NDP_PETROLEUM_COKE Specialty Products / Petroleum Coke
gradeTypeCode NDP_WAXES Specialty Products / Waxes
gradeStatusCode ACTIVE
gradeStatusCode INACTIVE

Response examples:

200 Response

{
  "clientCode": "string",
  "name": "string",
  "gradeTypeCode": "string",
  "description": "string",
  "gradeStatusCode": "ACTIVE",
  "isSensitive": true
}

Responses

Status Meaning Description Schema
200 OK (opens new window) Resource Updated Grade
201 Created (opens new window) Resource Created Grade

Code examples:

# You can also use wget
curl -X PUT /api/rest/1.0/grades/{clientCode} \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json'

const inputBody = '{
  "name": "string",
  "gradeTypeCode": "LIGHT",
  "description": "string",
  "gradeStatusCode": "ACTIVE",
  "isSensitive": true
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json'
};

fetch('/api/rest/1.0/grades/{clientCode}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/x-www-form-urlencoded',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','/api/rest/1.0/grades/{clientCode}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

name: string
gradeTypeCode: LIGHT
description: string
gradeStatusCode: ACTIVE
isSensitive: true

# Delete or deactivate a grade

To perform this operation, you must be authenticated by means of one of the following methods: sessionAuth

# DELETE /grades/{clientCode}

Parameters

Name In Type Required Description
clientCode path string true Resource client code

Response examples:

200 Response

{
  "clientCode": "string",
  "statusCode": "ACTIVE"
}

Responses

Status Meaning Description Schema
200 OK (opens new window) Successful response ResourceStatus

Code examples:

# You can also use wget
curl -X DELETE /api/rest/1.0/grades/{clientCode} \
  -H 'Accept: application/json'


const headers = {
  'Accept':'application/json'
};

fetch('/api/rest/1.0/grades/{clientCode}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','/api/rest/1.0/grades/{clientCode}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

Last Updated: 7/20/2021, 9:58:21 PM