get_items_by_supp_field_m Sample Call and Response
This example returns the inventory items that carry a particular value in a supplemental object field, rather than items belonging to a particular class. It is based on the get_items_by_supp_field_m method as defined in plsql_m_r73.yml.
This example covers a lookup by supplemental field number and value. It does not cover the alternative lookup by supplemental field name.
Sample call
{
"rest_call": "get_items_by_supp_field_m",
"output_format": "json",
"client_no": 100234,
"auth_key": "8f3d2a19c6b74e0a9d1f5c6e7a8b9c0d",
"field_no": 712,
"field_val": "extended_warranty_eligible"
}
The field_no field and the field_name field are alternatives to one another; this example uses the Aria-assigned field_no rather than the client-defined field_name. The field_val field is required regardless of which of those two identifiers is used, since it specifies the actual supplemental field value that qualifying items must carry. In this example, supplemental field number 712 stores an eligibility tag, and the value "extended_warranty_eligible" identifies inventory items that qualify for an extended warranty promotion. The rest_call and output_format fields are added by the REST layer and are not part of the method's own argument list.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"items_by_supp_field": [
{
"item_no": 90441,
"item_label": "USB-C Charging Cable, 2m",
"service_no": 3301,
"service_desc": "Inventory Item Fulfillment",
"client_sku": "ACC-USBC-2M",
"price": 14.99,
"item_plan": 6601,
"item_months": 0,
"currency_cd": "usd",
"class_no": 4021,
"class_label": "Electronics Accessories",
"stock_level": 482.0,
"avg_ratings": 4.5,
"num_ratings": 118,
"num_reviews": 42,
"image_url": "https://cdn.acmewidgets.com/items/90441.png",
"image_text": "USB-C charging cable",
"client_service_id": "SVC-FULFILL",
"client_item_plan_id": "ACC-PLAN-01"
},
{
"item_no": 90444,
"item_label": "Portable Bluetooth Speaker",
"service_no": 3301,
"service_desc": "Inventory Item Fulfillment",
"client_sku": "ACC-SPKR-01",
"price": 79.99,
"item_plan": 6601,
"item_months": 0,
"currency_cd": "usd",
"class_no": 4021,
"class_label": "Electronics Accessories",
"stock_level": 96.0,
"avg_ratings": 4.8,
"num_ratings": 63,
"num_reviews": 21,
"image_url": "https://cdn.acmewidgets.com/items/90444.png",
"image_text": "Portable bluetooth speaker",
"client_service_id": "SVC-FULFILL",
"client_item_plan_id": "ACC-PLAN-01"
}
]
}
An error_code of zero, paired with an error_msg of "OK", indicates the call succeeded. The items_by_supp_field array shown here contains two representative items tagged with the requested supplemental field value; a broader promotion could tag many more items. The error_details field is left out of this response entirely because it is a nonpublic field not exposed to callers. The client_item_id field is also left out, because it is deprecated as of version forty-three.