OMS DOCUMENTATIONRESOURCE CENTER

These guides provide examples for many tasks that a developer will need to be familiar with during implementation.

KIBO OMS DEVELOPMENT

Documentation

Custom Order Data

To edit custom order data after order creation, an additional API is available to manage that data directly and more efficiently. POST, PUT, DELETE, and GET requests are all supported by this Custom Order Data API to manage that information.

Although this is related to the Custom Order Item Data API, this API pertains only to the custom data applied to a whole order. Custom data made at the line item or product level should be managed through the Custom Order Item Data API.

Version2.0
Callhttps://integration.shopatron.com/api/v2/order/{orderID}/customData
Supported FormatsJSON
HTTP MethodPOST, PUT, DELETE, GET
Schemahttps://integration.shopatron.com/api/v2/schema/order/orderCustomData.json

The .json address above can be used to access the schema within Postman. An example use of the Custom Order Data API follows below, or view the schema.

Required Parameters

These parameters are necessary for the Custom Order Data API to return a successful response for POST and PUT requests, which require a body.

ParameterTypeDescription
namestringThe name of the value in the value store of custom data. The minimum length is 1 and the maximum length is 100.
valuestringThe data for the value portion of the key/value store of custom data. The minimum length is 1 and the maximum length is 1000.

Optional Parameters

Other possible parameters can be provided to specify other details about the order.

ParameterTypeDescription
orderCustomDataIDintegerA unique identifier for each custom data record.
orderIDintegerA unique identifier for the order that the data applies to. The minimum value is “1”.
manufacturerIDintegerA unique identifier for the manufacturer that the order belongs to. The minimum value is “1”.
catalogIDintegerThe catalog number for the manufacturer. The minimum value is “0”.

Add Custom Order Data

The POST request will add a new custom data record to an existing order. The header specifies the Order ID of the order being edited, and references the /customData API endpoint to differentiate this call from any other Order API call.

The header:

https://integration.shopatron.com/api/v2/order/000000/customData

Note that only the name and value of the custom data are required. The order ID is assumed from the header and the custom data ID will be generated by OMS and returned in the response.

The body:

 {
  "name": "Example Data",
  "value": "This is sample custom data."
 }

Update Custom Order Data

The PUT request will update an existing custom data record. The header specifies the Order ID of the order being edited, as well as the Custom Order Data ID that is known from the existing order information. This ID can be found in the response of any call that returns order information.

The header:

https://integration.shopatron.com/api/v2/order/000000/customData/111111

Although the name of the custom data record is included in the body as shown below, it must be the name of an existing record and cannot be changed. Only the value may be different from the existing record.

The body:

 {
  "name": "Example Data",
  "value": "This is new text for the sample custom data."
 }

Delete Custom Order Data

The DELETE request will remove an existing custom data record. There is no required body of the request, as the header specifies which data element is being deleted based on the customDataID. This ID can be found in the response of any call that returns order information.

The header:

https://integration.shopatron.com/api/v2/order/000000/customData/111111

This data will be removed and a “204 No Content” response message will be returned to indicate such.

Get Custom Order Data

The GET request will simply return the custom data of an order. This request can be made in two ways, as shown below. The first header only specifies an orderID, so the response will return all custom data blocks that belong to the order. The second option specifies a particular orderCustomDataID, so only the block with that ID will be returned.

The headers:

https://integration.shopatron.com/api/v2/order/000000/customData
https://integration.shopatron.com/api/v2/order/000000/customData/111111

The information in the body of the response is also often returned as the response of other requests that do make edits, such as the PUT call. A 404 Error will be returned if the user tries to access the data of an order that does not exist.

The body:

{
   "orderCustomDataID": 11111,
   "orderID": 00000,
   "manufacturerID": 010101,
   "catalogID": 4,
   "name": "Custom Data",
   "value": "This is sample custom data."
}