Search for Appeasement
The Search Appeasement API offers a means of locating an existing appeasement by specifying one or more possible properties. A specific Appeasement ID does not have to be known to perform the search, as the response will return all results that fit the criteria. As this guide shows, however, an Order ID is necessary and thus appeasements cannot be searched for if the associated order is unknown.
The .json address above can be used to access the schema within Postman. An example use of the 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 an order’s appeasements from the same manufacturer would use the following format:
- https://integration.shopatron.com/api/v2/orderAppeasement/?orderID=[Order ID]&manufacturerID=[Manufacturer ID]
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/orderAppeasement/?orderID=[Order ID]&perPage=2&page=2
This example case creates a call that will search for all of a particular order’s appeasements that are paid by the retailer. The request will specify the following properties:
- Order ID – 01010101
- Credit Payee – Retailer
A variety of possible properties can be used to locate an existing appeasement. The API call always requires at least one of these data points:
|orderID||string||A single or list of unique identifiers for orders. They must be positive integers.|
|externalOrderID||string||A single or list of unique client-generated identifiers for orders. The minimum length is 1 and the maximum length is 100.|
The API can also search for any of these additional elements:
|retailerID||string||A unique identifier for a retailer. The minimum value is "0".|
|manufacturerID||string||A unique identifier for a manufacturer. The minimum value is "1".|
|catalogID||integer||The catalog number for the manufacturer. The minimum value is "0".|
|creditPayee||enum||The entity who will pay for the credit (KIBO, SHOPATRON, MANUFACTURER, or RETAILER).|
The Full Request
Using the URL format as outlined above, the entire call is fairly simple to put together. This sample will search for appeasements matching the example’s parameters. Any amount of additional parameters could be appended if desired.
The Full Response
The API returns the following response. The object returned is a Collection, which contains all of the appeasement results that fit the provided information. The response details all of the information associated with the appeasement: payee and credit details, any connected entities such as a manufacturer, and so forth. It follows the same organizational structure as the standard Get Appeasement Information response.
In this case, the search returned two appeasements (Appeasement 123456 and Appeasement 654321). Their results are clearly separated.
"creditDescription": "No Inventory",
"creditDescription": "Shipment Delayed",