{ "data": $.responses.{ "context": context, "message": { "order": { "type": message.order.type, "provider": { "id": message.order.provider.id, "name": message.order.provider.descriptor.name, "short_desc": message.order.provider.descriptor.short_desc, "long_desc": message.order.provider.descriptor.long_desc, "rating": message.order.provider.rating, "images": message.order.provider.descriptor.images.{ "url": url, "size_type": size_type }, "media": message.order.provider.descriptor.media.{ "url": url } }, "items": message.order.items.{ "id": id, "name": descriptor.name, "short_desc": descriptor.short_desc, "long_desc": descriptor.long_desc, "images": descriptor.images.{"url": url, "size_type": size_type, "width": width, "height": height}[], "price": price, "rating": rating, "rateable": rateable, "time": time, "quantity": quantity, "categories": $map( $filter(%.provider.categories, function($category) { $boolean($category.id in category_ids)}), function($category) { { "id": $category.id, "name": $category.descriptor.name, "code": $category.descriptor.code } } )[], "locations": $map( $filter(%.provider.locations, function($location) { $boolean($location.id in location_ids)}), function($location) { { "id": $location.id, "city": $location.city.name, "state": $location.state.name, "country": $location.country.name } } )[], "tags": tags.{ "code": descriptor.code, "name": descriptor.name, "display": display, "list": list.{ "code": code, "name": name, "value": value }[] }[], "xinput":$xInput(xinput, $action) }[], "xinput": $xInput(message.order.xinput, $action), "fulfillments": message.order.fulfillments, "quote": message.order.quote, "billing": message.order.billing, "payments": message.order.payments, "cancellation_terms": message.order.cancellation_terms, "tags": message.order.tags.{ "code": descriptor.code, "name": descriptor.name, "display": display, "list": list.{ "code": code, "name": name, "value": value }[] }[] } }, "rawResponse": $includeRawResponse ? $ :{} }[] }