POST
Request
Headers
Header |
Description |
|
The instruction key for the account. Required. |
|
The content type of the request. Required. Currently we
only support |
|
The length of the body. Required. |
Note
Content-Length
In php this would be calculated as
strlen($body);
Body
The body of the request should be a json object with the following keys:
jobStatus
The value must exactly match one of the job statuses in the target account.
Required.
jobType
The value must exactly match one of the job types in the target account.
Required.
fields
A dictionary object who’s keys must exactly match the
nameof fields in the target account.Required.
Example
An example of a request to submit an instruction:
POST /api/v1/instructions
X-Key 1234567890
Content-Type application/json
Content-Length 508
{
"jobStatus": "New",
"jobType": "Inspection",
"fields": {
"fields.inspectionLocation": "location",
"fields.registration": "registration",
"fields.make": "make",
"fields.model": "model",
"fields.purchaser": {
"name": "purchaser-name",
"email": "purchaser-email",
"phone": "purchaser-phone",
"mobile": "purchaser-mobile",
"address": "purchaser-address"
},
"fields.seller": {
"name": "seller-name",
"email": "seller-email",
"phone": "seller-phone",
"mobile": "seller-mobile",
"address": "seller-address"
}
}
}
Response
Status Codes
Code |
Description |
201 |
Created |
400 |
{error message} |
403 |
Authentication required |
404 |
Not found |
409 |
Not unique |
500 |
{error message} |
Body
n/a