Calibration
Calibrating the machine
Calibrating the machine involves a series of GET or POST requests, one for each phase of the calibration process. Each request is similar in structure, the only value changing
in the following request is the value of the Phase node. On a successful response, the next phase to be called will be retrieved in the NextStep (case insensitive). 
info
Calibration consists of a series of steps in each request and response, both will keep consistent structure while new instruction and information will be given for each step. More details are provided below in the Response section below.
- Step 1: Begin Calibration - phase: start- Begin the calibration process
- Step 2: Capture Background - background- Clear the view in front of the sensors.
- Step 3: Bowl placement - bowls- Place bowls accordingly
<Calibrate/>
Request
- GET
- POST
Endpoint
- Phase values: e.g. start,background,bowls
Header
- XML
- JSON
Desired response format:
Accept: application/xml (default)Desired response format:
Accept: application/jsonEndpoint
A Cargo Spectre POST request is sent to the machine without any API in the endpoint, as below:
Header
- XML
- JSON
Desired response format:
Accept: application/xml (default)Desired response format:
Accept: application/jsonBody
- XML
- JSON
- Phase values: startbackgroundbowls
<Requests>
  <Calibrate>
    <Phase>start</Phase>
  </Calibrate>
</Requests>
- Phase values: startbackgroundbowls
{
    "Requests": {
        "Calibrate": {
            "Phase": "start"
        }
    }
}
Response
The Response/Calibrate node contains several nodes for more information on the current step, see below for more details.
- code- a code "0" means the step was successful, any other value received here would be an error.
- NextStep- The next step in the calibration phase, the value here should inserted into the next requests- phasekey.
- Image- The relative path to the calibration instruction image on the machine. This can be retrieved via the file API.
- Instructions- User instruction for the current step in the calibration process.
- Note: Image/Instructions/ButtonTextcan be used or entirely disregarded - they are used to populate front end facing instructions.
info
Should the machine return an error during the calibration process, it is okay to re-attempt the same step rather than having to start over from the start phase.
- XML
- JSON
<Responses>
    <Calibrate code="0">
        <NextStep>BACKGROUND</NextStep>
        <Image>assets/calibration_wizard/PARCEL-BACKGROUND.jpg</Image>
        <Instructions>Please clear the view in front of the sensors. Only the floor and/or scale should be seen by the camera sensors.</Instructions>
        <ButtonText>Next</ButtonText>
    </Calibrate>
</Responses>
{
    "Responses": {
        "Calibrate": {
            "code": "0",
            "NextStep": "BACKGROUND",
            "Image": "/assets/calibration_wizard/PARCEL-BACKGROUND.jpg",
            "Instructions": "Please clear the view in front of the sensors. Only the floor and/or scale should be seen by the camera sensors.",
            "ButtonText": "Next"
        }
    }
}