{
	"description": "Scitegrity Compliance Hub results",
	"type": "object",
	"properties": {
		"jobStatus": {
			"description": "The current status of the job",
			"type": "string",
			"enum": ["submitted", "received", "running", "completed", "error"]
		},
		"remainingChecks": {
			"description" : "The number of remaining credits/checks. If this is negative this is the number of checks that will be billed in the next invoice",
			"type": "number"
		},
		"searchQuery": {
			"description": "The parameters used in the search. Used for internal debugging",
			"type": "string"
		},
		"jobResult": {
			"description": "Object containing the CS2 result data",
			"type": "object",
			"properties": {
				"records": {
					"description": "List of CS2 result data",
					"type": "array",
					"items": {
						"type": "object",
						"properties": {
							"corporateId": {
								"description": "identifier for the compound input provided by user",
								"type": "string"
							},
							"legislationName": {
								"description": "the name of the piece of legislation in which this control is located",
								"type": "string"
							},
							"nativeLink": {
								"description": "a URL link to the piece of legislation in which this control is located. This goes direct to legislators website so may not be in English",
								"type": "string"
							},
							"link": {
								"description": "a URL link to the piece of legislation where the control is located via google translate API",
								"type": "string"
							},
							"idJurisdiction": {
								"description": "the jurisdiction id in which this control is in",
								"type": "number"
							},
							"jurisdictionName": {
								"description": "the name of the jurisdiction in which the control is in",
								"type": "string"
							},
							"substanceLegislationName": {
								"description": "the name under which that substance has been controlled in that piece of legislation",
								"type": "string"
							},
							"codeName": {
								"description": "the list of control code names which apply to this control",
								"type": "array",
								"items": { "type": "string" }
							},
							"resultComments": {
								"description": "any information about the type of match (i.e. Generic match, salt hit etc.)",
								"type": "string"
							},
							"controlledStatus": {
								"description": "controlled status of the result",
								"type": "string",
								"enum": ["Controlled", "Possibly controlled", "Not controlled", "Not Determined", "No"]
							},
							"ruleName": {
								"description": "This will be populated when result is a generic structure match (also known as a Markush match) and gives a brief description of the generic statement (i.e.. US Fentanyl Derivatives)",
								"type": "string"
							},
							"additionalInformation": {
								"description": "Gives extra information associated with the substance being assessed",
								"type": "string"
							}
						}
					}
				}
			}							
		}
	}
}