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
In the case of performing a search with multiple terms of the same parameter, such as retrieving multiple order IDs at once, use a comma-separated list as shown below.
- https://integration.shopatron.com/api/v2/orderNote/?orderID=[Order ID One],[Order ID Two],[Order ID Three]
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 any 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.|
|page||integer|| The page number to begin listing the results from. The default and minimum value is “1”. While this parameter is technically required, this default means that it does not have to be provided in the request unless a different page is specifically desired. Also, note that the page cannot be the sole parameter in the search query – if provided, there must be at least one of the other parameters in this table.|
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”.|
|perPage||integer|| The (max) number of items to return per results page. The minimum value is “1” and the maximum value is “100”. The default is “10”.|
|sortBy||string|| The field(s) to sort results by, use a minus (-) in front of field name for descending, a plus (+) for ascending. The minimum length 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"