Update an internal note

An inter­nal note added to a freight can be mod­i­fied at any time. The note can­not be longer than 500 char­ac­ters and only one note can be added to the freight.

The freight-id iden­ti­fi­ca­tion num­ber in method call can be tak­en from response after cre­at­ing the freight or by down­load­ing the freight list.

PUT
/ext/freights-api/v1/freights/{freight-id}/internal-note
Request Authorization

Every request MUST include a valid access token obtained dur­ing the user autho­riza­tion process, pro­vid­ed using the Bear­er token scheme in the Autho­riza­tion head­er.

Successful Response
Request Header
PUT /ext/freights-api/v1/freights/{freight-id}/internal-note HTTP/1.1 
Host: api.platform.trans.eu 
Content-Type: application/json
Accept: application/json
Authorization: Bearer {access_token) 
Api-key: {unique_app_api-key}
Request Parameters
AttributeTypeExam­pleManda­to­ryDescrip­tion
con­tentsString“Mem­o­ry note”YesCon­tent of the inter­nal note
Example Request Body
{ 
"contents": "Memory note" 
}
Response Fields
AttributeTypeExam­pleDescrip­tion
con­tentsString“Mem­o­ry note”Con­tent of the inter­nal note
Response Body
{ 
"contents": "Memory note" 
}

Client errors (code 400)

HTTP 4xx sta­tus codes indi­cate client errors, mean­ing that the request could not be processed due to an issue on the client side. Below is a list of request-spe­cif­ic errors.

Example error 1

Length of con­tent is too long

{
    "detail": "Failed Validation",
    "status": 422,
    "title": "Unprocessable Entity",
    "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
    "validation_messages": {
        "contents": {
            "stringLengthTooLong": "The input is more than 500 characters long"
        }
    }
}
Example error 2

Inter­nal note does not exists

{
    "detail": "Internal note for this freight does not exist",
    "status": 422,
    "title": "Unprocessable Entity",
    "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Example error 3

Emp­ty val­ue

{
    "detail": "Failed Validation",
    "status": 422,
    "title": "Unprocessable Entity",
    "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
    "validation_messages": {
        "contents": {
            "isEmpty": "Value is required and can't be empty"
        }
    }
}