Post /api/v1/stops/{id}/notes

Add note to a Stop.

This endpoint allows you to add a note to a specific stop identified by the stop ID.

Input Parameters: 
id

id * required integer($int32)(path)

This id here is the unique stop id for stop in your Locate2u account.

Request body:

  • note (string, optional): The note to be added.
  • type (string, optional): The type of the note.
  • photoFileNames (array of strings, optional): List of photo file names.
  • documentFileNames (array of strings, optional): List of document file names.
  • metadata (object, optional): Additional metadata for the note.

Example request:

{
  "note": "Please call before you deliver",
  "type": "Stop Note",
  "photoFileNames": [
    "FileNames1.jpg",
    "FileNames2.png"
  ],
  "documentFileNames": [
    "FileNames1.xlsx",
    "FileNames2.docx"
  ],
  "metadata": null
}

Sample code

C#
Java
NodeJS
PHP
Python
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.locate2u.com/api/v1/stops/5176243/notes");
request.Headers.Add("Authorization", "Bearer yourBearerTokenHere");
var content = new StringContent("{\r\n  \"note\": \"Please call before you deliver\",\r\n  \"type\": \"Stop Note\",\r\n  \"photoFileNames\": [\r\n    \"FileNames1.jpg\",\r\n    \"FileNames2.png\"\r\n  ],\r\n  \"documentFileNames\": [\r\n    \"FileNames1.xlsx\",\r\n    \"FileNames2.docx\"\r\n  ],\r\n  \"metadata\": null\r\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"note\": \"Please call before you deliver\",\r\n  \"type\": \"Stop Note\",\r\n  \"photoFileNames\": [\r\n    \"FileNames1.jpg\",\r\n    \"FileNames2.png\"\r\n  ],\r\n  \"documentFileNames\": [\r\n    \"FileNames1.xlsx\",\r\n    \"FileNames2.docx\"\r\n  ],\r\n  \"metadata\": null\r\n}");
Request request = new Request.Builder()
  .url("https://api.locate2u.com/api/v1/stops/5176243/notes")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer yourBearerTokenHere")
  .build();
Response response = client.newCall(request).execute();
var https = require('follow-redirects').https;
var fs = require('fs');


var options = {
  'method': 'POST',
  'hostname': 'api.locate2u.com',
  'path': '/api/v1/stops/5176243/notes',
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer yourBearerTokenHere'
  },
  'maxRedirects': 20
};


var req = https.request(options, function (res) {
  var chunks = [];


  res.on("data", function (chunk) {
    chunks.push(chunk);
  });


  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });


  res.on("error", function (error) {
    console.error(error);
  });
});


var postData = JSON.stringify({
  "note": "Please call before you deliver",
  "type": "Stop Note",
  "photoFileNames": [
    "FileNames1.jpg",
    "FileNames2.png"
  ],
  "documentFileNames": [
    "FileNames1.xlsx",
    "FileNames2.docx"
  ],
  "metadata": null
});


req.write(postData);


req.end();
 'https://api.locate2u.com/api/v1/stops/5176243/notes',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "note": "Please call before you deliver",
  "type": "Stop Note",
  "photoFileNames": [
    "FileNames1.jpg",
    "FileNames2.png"
  ],
  "documentFileNames": [
    "FileNames1.xlsx",
    "FileNames2.docx"
  ],
  "metadata": null
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer yourBearerTokenHere'
  ),
));


$response = curl_exec($curl);


curl_close($curl);
echo $response;
import requests
import json


url = "https://api.locate2u.com/api/v1/stops/5176243/notes"


payload = json.dumps({
  "note": "Please call before you deliver",
  "type": "Stop Note",
  "photoFileNames": [
    "FileNames1.jpg",
    "FileNames2.png"
  ],
  "documentFileNames": [
    "FileNames1.xlsx",
    "FileNames2.docx"
  ],
  "metadata": None
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer yourBearerTokenHere'
}


response = requests.request("POST", url, headers=headers, data=payload)


print(response.text)

Response

Response

Upon successful execution, the endpoint returns a status code of 200 and a JSON object with the following fields:

  • noteId (number): The ID of the added note.
  • stopId (number): The ID of the stop to which the note is added.
  • photoUploadUrls (array of objects): List of photo upload URLs with new file names, original file names, and upload URLs.
  • documentUploadUrls (array of objects): List of document upload URLs with new file names, original file names, and upload URLs.
200 Success

401 Unauthorized

403 Forbidden