Search Order Notes
Notes can also be searched with the Order Note API. This is useful to find a specific note for an order when the unique Note ID is unknown, because the Order ID can be provided as the search parameter. The API will then return all notes that apply to that order.
The .json address above can be used to access the schema within Postman. An example use of the Order Note API follows below, or view the schema or the sample Postman Collection.
The request itself is built within the URL by adding a “/?” to the call followed by specific parameters joined by the “&” symbol. For instance, searching for public notes from a particular order would use the following format:
- https://integration.shopatron.com/api/v2/orderNote/?orderID=[Order ID]&public=true
GET calls that support pagination for numerous results, such as when searching, also accept a perPage parameter that defines how many results can be returned on each page. The default is 10 and the maximum is 100. Switch between pages of results by appending the page parameter to the call. For example:
- https://integration.shopatron.com/api/v2/orderNote/?orderID=[Order ID]&perPage=2&page=2
The example case will search for all notes that belong to an order with the ID 111111.
Searching for an order note requires one of the following:
|orderID||string||A single or list of unique identifiers for orders. These must all be positive integers.|
|externalOrderID||string||A client-generated unique identifier for the order. The minimum length is 1 and the maximum length is 100.|
Notes can also be found based on one or more of these additional parameters:
|noteStartTime||string (date-time)||Search for order notes created on or after this date.|
|noteEndTime||string (date-time)||Search for order notes created on or before this date.|
|public||boolean||Whether the note is publicly viewable.|
|shipmentID||string||A single or list of unique identifiers for shipments. These must all be positive integers.|
|userID||integer||A unique identifier for the user. The minimum value is "1".|
The Full Request
This is the entire request that will search for Order Notes belonging to the Order 111111.
The Full Response
This is what the collection of note results would look like.
"note": "this is a note",
"userName": "Customer Service Customer Service"
"note": "Here is another note.",
"userName": "ZZZ Company Information System"