Search Order Notes

Warning

This documentation is for translated APIs and intended only for some implementations who have upgraded from a previous version of Order Management. Verify whether your implementation uses translated APIs before making this call, as you will experience errors if your tenant is not configured to use these. If your implementation is not configured to do so, then refer to the standard API documentation instead.

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.

Note that the parameter schemas outlined in this guide are the exact same as in the previous version of OMS, as the Unified Commerce platform supports backwards compatibility for this API. The only change to this request is the format of the base endpoint, as shown in the below table. Remember to provide the x-vol-tenant key for authentication in the headers.

Production URLhttps://{tenantId}-translation.mozu.com/api/v2/orderNote/?{parameters}
Sandbox URLhttps://{tenantId}-translation.sandbox.mozu.com/api/v2/orderNote/?{parameters}
Supported FormatsJSON
HTTP MethodGET

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://{tenantId}-translation.mozu.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://{tenantId}-translation.mozu.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://{tenantId}-translation.mozu.com/api/v2/orderNote/?orderID=[Order ID]&perPage=2&page=2

Example

The example will search for all notes that belong to an order with the ID 111111.

Required Parameters

Searching for an order note requires any one of the following:

ParameterTypeDescription
orderIDstringA single or list of unique identifiers for orders. These must all be positive integers.
externalOrderIDstringA client-generated unique identifier for the order. The minimum length is 1 and the maximum length is 100.
pageintegerThe 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.

Optional Parameters

Notes can also be found based on one or more of these additional parameters:

ParameterTypeDescription
noteStartTimestring (date-time)Search for order notes created on or after this date.
noteEndTimestring (date-time)Search for order notes created on or before this date.
publicbooleanWhether the note is publicly viewable.
shipmentIDstringA single or list of unique identifiers for shipments. These must all be positive integers.
userIDintegerA unique identifier for the user. The minimum value is “1”.
perPageintegerThe (max) number of items to return per results page. The minimum value is “1” and the maximum value is “100”. The default is “10”.
sortBystringThe 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.

https://{tenantId}-translation.mozu.com/api/v2/orderNote/?orderID=111111

The Full Response

This is what the collection of note results would look like.

{
    "collection": [
        {
            "noteID": 2299922,
            "orderID": 111111,
            "note": "this is a note",
            "noteTime": "2015-07-21T19:32:50+00:00",
            "public": true,
            "userID": 55555,
            "userName": "Customer Service Customer Service"
        },
        {
            "noteID": 9922299,
            "orderID": 111111,
            "note": "Here is another note.",
            "noteTime": "2017-04-06T15:36:18+00:00",
            "public": true,
            "userID": 66666,
            "userName": "ZZZ Company Information System"
        },

    ],
}