Your account has to be on the contract you are editing

Request

POST http:///fleet.roadprotect.co.il/api/v1/contract/{contractId}/reference

Path parameters

Parameter name Value Description Additional
contractId number Required

Request body

The request body takes a complete UpdateContractReferenceDto resource, containing the following writable properties:

{
    "reference": "string"
}

Properties

Name Type Description Additional
reference string

The new reference for this contract

Authorisation

To authenticate your client integration please put your token in the header of your requests with the key Authorization, it should look like this:

Authorization: Bearer YOUR_TOKEN_HERE

Please keep your token secured. If your token is compromised, we can issue a new token for you.

This request requires the use of one of following authorisation methods: API key .

Response

The following HTTP status codes may be returned, optionally with a response resource.

Status code Description Resource
201 Created Contract
400 Bad Request

E050: Contract with id contractId not found

Example Request

NodeJs Request

Replace CONTRACT_ID with the desired contractId. Replace REFERENCE with the desired reference.

var request = require('request');
var options = {
    'method': 'POST',
    'url': 'http://fleet.roadprotect.co.il/api/v1/contract/CONTRACT_ID/reference',
    'headers': {
        'Content-Type': 'application/x-www-form-urlencoded',
            'Authorization': 'Bearer YOUR_TOKEN_HERE'
        },
form: {
'reference': 'REFERENCE'
}
    };
request(options, function (error, response) {
    if (error) throw new Error(error);
    console.log(response.body);
});

Python Requests

Replace CONTRACT_ID with the desired contractId. Replace REFERENCE with the desired reference.

import requests
url = "http://fleet.roadprotect.co.il/api/v1/contract/CONTRACT_ID/reference"
payload='reference=REFERENCE'
headers = {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Authorization': 'Bearer YOUR_TOKEN_HERE'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)