Order Search
POST
{{api_url}}/shop/amazontoday/velocity/order/search?just_count=0&limit=2This call searches for Amazon Today orders in InfiPlex OMS and formats them based on a velocity format that is sent via the POST body
The default response order object can be found in the order search example at: Order Object
Example to generate JSON with a built in store map
POST Body
#set($inputRoot = $this)
#set($our_stores=[{"ssid":"6bbc9250-c0d2-4d10-b9a4-91b640eda328","store_name":"Store 1","store_id":1,"store_contact_email":"store1@example.com"},{"ssid":"123c9250-c0d2-4d10-b9a4-091480eda000","store_name":"Store 2","store_id":2,"store_contact_email":"store2@example.com"}])
#set($orders_total_count = $orders.size())
{
"orders": [
#foreach($order in $orders)
#set($orders_current_count = $foreach.count)
{
"order_id": "$order.shop_orderid",
"amazon_today_shipment_id": "$order.external_order_num",
"amazon_today_order_id": "$order.additional_customer_order_id",
"amazon_today_supply_source_id": "$order.additional_info.amazon_today_location_id",
"creation_date": "$order.order_date",
"item_total": "$order.item_total",
"shipping_total": "$order.ship_price",
"tax_total": "$order.tax_total",
"grand_total": "$order.order_total",
"ship_to_full_name": "$order.ship_first_name $order.ship_last_name",
#foreach($our_store in $our_stores)
#if($order.additional_info.amazon_today_location_id==$our_store.ssid)
"our_store_name": "$our_store.store_name",
"our_store_email": "$our_store.store_contact_email",
"our_store_id": $our_store.store_id,
#end
#end
"order_items": [
#set($order_item_total_count = $order.order_items.size())
#foreach($order_item in $order.order_items)
#set($order_item_current_count = $foreach.count)
{
"sku": "$order_item.sku",
"quantity": $order_item.quantity,
"unit_price": $order_item.price
}
#if($order_item_current_count != $order_item_total_count), #end
#end
]
}
#if($orders_current_count != $orders_total_count), #end
#end
]
}
Response
{
"orders": [
{
"order_id": "103210",
"amazon_today_shipment_id": "Zaaabbb02",
"amazon_today_order_id": "111-1111111-1111112",
"amazon_today_supply_source_id": "6bbc9250-c0d2-4d10-b9a4-91b640eda328",
"creation_date": "2023-02-14 20:18:08",
"item_total": "23.99",
"shipping_total": "0.00",
"tax_total": "1.68",
"grand_total": "25.67",
"ship_to_full_name": "Test User1",
"our_store_name": "Store 1",
"our_store_email": "store1@example.com",
"our_store_id": 1,
"order_items": [
{
"sku": "YS-M524-YU8I",
"quantity": 1,
"unit_price": 23.99
}
]
},
{
"order_id": "103204",
"amazon_today_shipment_id": "Zaaabbb03",
"amazon_today_order_id": "111-1111111-1111113",
"amazon_today_supply_source_id": "123c9250-c0d2-4d10-b9a4-091480eda000",
"creation_date": "2023-06-08 12:23:58",
"item_total": "120.00",
"shipping_total": "40.00",
"tax_total": "33.00",
"grand_total": "193.00",
"ship_to_full_name": "Test User2",
"our_store_name": "Store 2",
"our_store_email": "store2@example.com",
"our_store_id": 2,
"order_items": [
{
"sku": "1002400773021",
"quantity": 2,
"unit_price": 60.00
}
]
}
]
}
Mappings of Amazon order object to InfiPlex order object
| Amazon Field | InfiPlex Field |
|---|---|
| id | external_order_num |
| metadata->buyerOrderId | additional_customer_order_id |
| creationDateTime | order_date |
| locationId | additional_info->amazon_today_location_id |
| shippingInfo->shipToAddress->name | ship_first_name |
| shippingInfo->shipToAddress->name | ship_last_name |
| shippingInfo->shipToAddress->addressLine1 | ship_street1 |
| shippingInfo->shipToAddress->addressLine2 | ship_street2 |
| shippingInfo->shipToAddress->city | ship_city |
| shippingInfo->shipToAddress->state | ship_state |
| shippingInfo->shipToAddress->postalCode | ship_zip |
| shippingInfo->shipToAddress->countryCode | ship_country |
| shippingInfo->recommendedShipMethod | ship_identifier |
| shippingInfo->expectedShippingDateTime | estimated_ship_date |
| lineItems\[\]->id | order_items\[\]->external_itemid |
| lineItems\[\]->merchantSku | order_items\[\]->sku |
| lineItems\[\]->numberOfUnits | order_items\[\]->quantity |
| lineItems\[\]->baseCharge->baseAmount->value / lineItems->numberOfUnits | order_items\[\]->price ** this is the unit price of the item. the value is calculated by taking the sum of all the base charges for an Amazon Today line item, divided by the quantity purchased. |
| lineItems\[\]->totalCharge->discountAmount->value + lineItems\[\]->totalTax->charge->discountAmount->value | order_items\[\]->discount_total |
| lineItems\[\]->totalTax->charge->baseAmount->value | order_items\[\]-> tax_total |
| totalCharge->baseAmount->currencyCode | order_currency |
| charges\[\]->baseCharge->baseAmount->value **charges->chargeType equals "shipping" | ship_price **this is a sum of all shipping charges in the Amazon Today order |
| charges\[\]->totalCharge->discountAmount->value **charges->chargeType equals "total" | discount_total **this is a sum of all discounts in the Amazon Today order |
| charges\[\]->totalTax->charge->baseAmount->value **charges->chargeType equals "total" | tax_total **this is a sum of all taxes in the Amazon Today order |
| charges\[\]->baseCharge->baseAmount->value - charges\[\]->baseCharge->baseAmount->value **charges->chargeType equals "total" for first operand and charges->chargeType equals "shipping" for second operand. | item_total |
| charges\[\]->totalCharge->netAmount->value **charges->chargeType equals "total" | order_total |
Amazon Today order object
{
"id": "D1px1063T",
"locationId": "43cd8cd4-a944-4fa8-a584-5e3b3efdb045",
"channelName": "FBA",
"channelLocationId": "ABCD",
"metadata": {
"numberOfUnits": 2,
"priority": false,
"invoiceInformation": {
"id": "IN-ABCD-124"
},
"buyerOrderId": "407-7727827-8514700",
"adapterApp": {
"id": "YojakaFbaAdapterService",
"name": "YojakaFbaAdapterService"
}
},
"charges": [
{
"baseCharge": {
"baseAmount": {
"value": "160",
"currencyCode": "INR"
},
"discountAmount": {
"value": "30",
"currencyCode": "INR"
},
"netAmount": {
"value": "130",
"currencyCode": "INR"
}
},
"taxBreakup": [
{
"type": "IGST",
"rate": "0.18",
"charge": {
"baseAmount": {
"value": "33",
"currencyCode": "INR"
},
"discountAmount": {
"value": "11",
"currencyCode": "INR"
},
"netAmount": {
"value": "22",
"currencyCode": "INR"
}
}
}
],
"totalCharge": {
"baseAmount": {
"value": "193",
"currencyCode": "INR"
},
"discountAmount": {
"value": "41",
"currencyCode": "INR"
},
"netAmount": {
"value": "152",
"currencyCode": "INR"
}
},
"totalTax": {
"type": "TOTAL",
"rate": "0.18",
"charge": {
"baseAmount": {
"value": "33",
"currencyCode": "INR"
},
"discountAmount": {
"value": "11",
"currencyCode": "INR"
},
"netAmount": {
"value": "22",
"currencyCode": "INR"
}
}
},
"chargeType": "TOTAL"
},
{
"baseCharge": {
"baseAmount": {
"value": "40",
"currencyCode": "INR"
},
"discountAmount": {
"value": "10",
"currencyCode": "INR"
},
"netAmount": {
"value": "30",
"currencyCode": "INR"
}
},
"taxBreakup": [
{
"type": "IGST",
"rate": "0.25",
"amount": {
"baseAmount": {
"value": "10",
"currencyCode": "INR"
},
"discountAmount": {
"value": "5",
"currencyCode": "INR"
},
"netAmount": {
"value": "5",
"currencyCode": "INR"
}
}
}
],
"totalCharge": {
"baseAmount": {
"value": "50",
"currencyCode": "INR"
},
"discountAmount": {
"value": "15",
"currencyCode": "INR"
},
"netAmount": {
"value": "35",
"currencyCode": "INR"
}
},
"totalTax": {
"type": "TOTAL",
"rate": "0.25",
"charge": {
"baseAmount": {
"value": "10",
"currencyCode": "INR"
},
"discountAmount": {
"value": "5",
"currencyCode": "INR"
},
"netAmount": {
"value": "5",
"currencyCode": "INR"
}
}
},
"chargeType": "SHIPPING"
}
],
"status": "ACCEPTED",
"lineItems": [
{
"id": "1",
"merchantSku": "1002400773021",
"numberOfUnits": 2,
"serialNumberRequired": false,
"hazmatLabelsRequired": false,
"giftAttributes": {
"giftWrapRequired": false,
"giftMessagePresent": false
},
"charges": [
{
"baseCharge": {
"baseAmount": {
"value": "100",
"currencyCode": "INR"
},
"discountAmount": {
"value": "20",
"currencyCode": "INR"
},
"netAmount": {
"value": "80",
"currencyCode": "INR"
}
},
"taxBreakup": [
{
"type": "IGST",
"rate": "0.18",
"charge": {
"baseAmount": {
"value": "18",
"currencyCode": "INR"
},
"discountAmount": {
"value": "6",
"currencyCode": "INR"
},
"netAmount": {
"value": "12",
"currencyCode": "INR"
}
}
}
],
"totalCharge": {
"baseAmount": {
"value": "118",
"currencyCode": "INR"
},
"discountAmount": {
"value": "26",
"currencyCode": "INR"
},
"netAmount": {
"value": "92",
"currencyCode": "INR"
}
},
"totalTax": {
"type": "TOTAL",
"rate": "0.18",
"charge": {
"baseAmount": {
"value": "18",
"currencyCode": "INR"
},
"discountAmount": {
"value": "6",
"currencyCode": "INR"
},
"netAmount": {
"value": "12",
"currencyCode": "INR"
}
}
},
"chargeType": "PRODUCT"
},
{
"baseCharge": {
"baseAmount": {
"value": "20",
"currencyCode": "INR"
},
"discountAmount": {
"value": "0",
"currencyCode": "INR"
},
"netAmount": {
"value": "20",
"currencyCode": "INR"
}
},
"taxBreakup": [
{
"type": "IGST",
"rate": "0.25",
"charge": {
"baseAmount": {
"value": "5",
"currencyCode": "INR"
},
"discountAmount": {
"value": "0",
"currencyCode": "INR"
},
"netAmount": {
"value": "5",
"currencyCode": "INR"
}
}
}
],
"totalCharge": {
"baseAmount": {
"value": "25",
"currencyCode": "INR"
},
"discountAmount": {
"value": "0",
"currencyCode": "INR"
},
"netAmount": {
"value": "25",
"currencyCode": "INR"
}
},
"totalTax": {
"type": "IGST",
"rate": "0.25",
"charge": {
"baseAmount": {
"value": "5",
"currencyCode": "INR"
},
"discountAmount": {
"value": "0",
"currencyCode": "INR"
},
"netAmount": {
"value": "5",
"currencyCode": "INR"
}
}
},
"chargeType": "GIFT"
}
]
}
],
"shippingInfo": {
"recommendedShipMethod": "ATS_STANDARD",
"expectedShippingDateTime": "2020-06-09T14:00:00Z",
"shipToAddress": {
"name": "ABC",
"addressLine1": "1st Main Rd",
"addressLine2": "Milk Colony",
"addressLine3": "Subramanyanagar,2 State, Rajajinagar",
"city": "Bengaluru",
"state": "Karnataka",
"district": "Bengaluru",
"postalCode": "560055",
"countryCode": "IN",
"phoneNumber": "080 49019010"
}
},
"packages": [
{
"id": "001",
"dimensions": {
"length": {
"value": "10.0",
"dimensionUnit": "CM"
},
"width": {
"value": "10.0",
"dimensionUnit": "CM"
},
"height": {
"value": "10.0",
"dimensionUnit": "CM"
}
},
"weight": {
"value": "200.0",
"weightUnit": "grams"
},
"hazmatLabels": [
],
"packageLineItems": [
{
"packageLineItem": {
"id": "1"
},
"quantity": 1,
"serialNumbers": [
]
}
]
}
],
"creationDateTime": "2020-06-08T11:13:58Z",
"lastUpdatedDateTime": "2020-06-08T12:00:15Z"
}
InfiPlex order object
{
"shop_orderid": "103210",
"shop_order_siteareaid": "16",
"shop_order_uid": "0",
"order_key": "CPwImXWfWG8oMbXdeLKkWNaBMPbsHFAlPyZq8ee6QMK9Lb5OP",
"order_source": "Amazon Today",
"order_date": "2023-02-14 20:18:08",
"email": "test@infiplex.com",
"phone": "",
"ship_first_name": "Test",
"ship_last_name": "User",
"ship_company": "",
"ship_street1": "1st Main Rd",
"ship_street2": "",
"ship_city": "Naperville",
"ship_state": "IL",
"ship_region": "",
"ship_zip": "33431-4043",
"ship_country": "US",
"bill_first_name": "Test",
"bill_last_name": "User",
"bill_company": "",
"bill_street1": "123 Main",
"bill_street2": "",
"bill_city": "Naperville",
"bill_state": "IL",
"bill_region": "",
"bill_zip": "33431-4043",
"bill_country": "US",
"ship_price": "0.00",
"ship_handling": "0.00",
"ship_identifier": "AMZL_US_SP_RUSH",
"ship_type": "0",
"ship_label": "AMZL_US_SP_PICKUP",
"ship_weight_total": "0.00",
"ship_speed": "1",
"item_total": "23.99",
"discount_total": "0.00",
"ship_total": "0.00",
"tax_total": "1.68",
"order_total": "25.67",
"cc_type": "",
"cc_num": null,
"cc_exp_mon": "",
"cc_exp_year": "",
"cc_last_four": "",
"is_processed": "1",
"external_order_num": "Zaaabbb02",
"external_order_source": null,
"fully_shipped": "0",
"is_amazon_payment": "0",
"is_paypal_payment": "0",
"is_canceled": "0",
"order_tag": null,
"in_process": "0",
"processed_by": null,
"processed_date": null,
"order_tak": null,
"order_referer": "",
"date_created": "2023-02-15 21:27:09",
"po_number": null,
"session_id": null,
"user_unq_identifier": null,
"has_outstanding_pre_order_items": "0",
"pre_order_completed_date": null,
"pre_order_release_date": null,
"order_currency": "USD",
"order_currency_symbol": "$",
"last_modified": "2023-08-10 14:36:36",
"is_seller_fulfilled_prime": "0",
"gift_card_total": "0.00",
"order_fully_saved": "1",
"additional_customer_order_id": "111-1111111-1111113",
"external_external_order_num": null,
"external_external_order_source": null,
"estimated_ship_date": "2023-02-15 17:00:00",
"estimated_delivery_date": null,
"marketplace_fulfillment_error": "0",
"picking_status": "0",
"shop_order_shop_batch_pick_id": null,
"misc_flag_1": "0",
"misc_flag_2": "0",
"misc_flag_3": "0",
"requested_warehouse_id": null,
"fulfillment_type_id": "0",
"invoice_flag": "0",
"order_state": "1",
"order_status": "new",
"tracking_numbers": [
{
"shop_order_ship_trackingid": "1557",
"sost_orderid": "103210",
"tracking_num": "Track112233",
"date_created": "2023-07-31 15:54:33",
"email_sent": null,
"email_sent_date": null,
"balancemaxx_tracking_sent": "0",
"balancemaxx_tracking_sent_date": null,
"label_cost": null,
"label_img": "data:image/png;base64, JOIfz85M2BHE1aLCk5++84S9EzEKH3y/wraHxRwx1+lEq6ataVmAWleXCsCI/EzJHcvdLNN8fWN11H5qWGswbQcMMMAAAwwwwAADDDDAAAMMMCgoX72CORtggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQYYYIABBhhggAEGGGCAAQaYuwzzf1QNTGmNL9dXAAAAAElFTkSuQmCC",
"overload_ship_weight_total": null,
"length_inches": "0",
"width_inches": "0",
"height_inches": "0",
"carrier_name": "USPS",
"carrier_method": "AMZL_US_SP_PICKUP",
"is_amazon_fba": "0",
"is_residential": "0",
"use_negotiated": "0",
"worldship_downloaded": "0",
"standard_downloaded": "0",
"signature_type": null,
"is_delivered": "0",
"estimated_delivery": null,
"delivery_time": null,
"tracking_activity_summary": null,
"is_ups": "0",
"is_fedex": "0",
"is_stamps": "0",
"should_still_check_tracking": "1",
"last_tracking_activity_check": "2023-07-31 15:54:33",
"carrier_will_pick_up": "0",
"declared_value": null,
"external_shipment_id": null,
"is_walmart_dsv_ship_to_store": "0",
"walmart_asn": null,
"usps_zone": null,
"package_size_name": null,
"packing_slip_id": null,
"has_zpl_label": "0",
"label_zpl": null,
"ship_from_name": null,
"ship_from_street1": null,
"ship_from_street2": null,
"ship_from_city": null,
"ship_from_state": null,
"ship_from_zip": null,
"ship_from_country": null,
"ship_from_warehouse_id": null,
"insurance_amount": "0.00",
"label_created_date": "2023-07-31 15:54:33",
"easypost_scan_form_create": "0",
"easypost_scan_form_id": null,
"easypost_predefined_package": null,
"pick_cart_num": null,
"pick_status": "0",
"pick_order_pick_id": null,
"pick_started_time": null,
"pick_ended_time": null,
"label_purchased_from": null,
"is_easypost_fbe": "0",
"is_shipstream_fbs": "0",
"sscc_value": null,
"external_shipment_id_2": null,
"external_shipment_id_3": null,
"external_shipment_id_4": null,
"order_source": "Amazon Today",
"external_order_num": "111-6396806-2772215",
"shop_order_siteareaid": "16",
"package_items": [
{
"shop_order_ship_tracking_itemid": "2014",
"sosti_trackingid": "1557",
"sosti_itemid": "20524",
"quantity_shipped": "1",
"serial_number": null,
"lot_number": null,
"warehouse_identifier": null,
"single_qty_weight_oz": "0.00",
"ident_imei": null,
"ident_eid": null,
"ident_iccid": null,
"ident_other": null,
"product_name": "YS-M524-YU8I",
"ship_weight": "0.00",
"external_itemid": "1",
"sku": "YS-M524-YU8I",
"ship_length_inches": "0.00",
"ship_width_inches": "0.00",
"ship_height_inches": "0.00",
"quantity": "1",
"item_price": "23.99",
"item_upc": null,
"item_isbn": null,
"item_asin": "B001KYQODW",
"item_gtin": null,
"item_ean": null,
"item_additional_id": null,
"item_cost": "0.00",
"custom_data1": null,
"custom_data2": null,
"custom_data3": null,
"created_from_line_modify": "0",
"sku_custom_data": [
{
"shop_product_sku_custom_data_id": "183",
"shop_product_sku_custom_data_siteareaid": "16",
"sku": "YS-M524-YU8I",
"data_name": "sldpi_note_package_1",
"data_value": "YS-M524-YU8I package 1"
},
{
"shop_product_sku_custom_data_id": "184",
"shop_product_sku_custom_data_siteareaid": "16",
"sku": "YS-M524-YU8I",
"data_name": "sldpi_note_package_2",
"data_value": "YS-M524-YU8I package 2"
}
]
}
],
"calculated_ship_weight_ounces": 0,
"actual_ship_weight_lbs": 0,
"actual_ship_weight_oz": 0,
"tracking_activity": null
}
],
"order_automation": {
"shop_order_process_automation_rule_id": "1404",
"sopar_orderid": "103210",
"siteareaid": "16",
"rules_run": "1",
"date_created": "2023-02-15 21:27:09",
"date_rules_run": "2023-02-15 21:27:10",
"rule_logs": [
{
"shop_order_process_automation_rule_log_id": "503",
"soparl_process_id": "1404",
"date_run": "2023-02-15 21:27:10",
"rule_id": "16",
"rule_name": "Dynamic Map",
"rule_type": "9",
"rule_automation_data": ""
}
]
},
"order_used_warehouses": [
{
"shop_order_warehouse_id": "12",
"shop_order_warehouse_orderid": "103210",
"warehouse_id": "3",
"warehouse_identifier": "secondary"
}
],
"additional_info": {
"test_custom_field_Order Source": "Amazon Today",
"amazon_today_location_id": "6bbc9250-c0d2-4d10-b9a4-91b640eda328",
"some_other_info": "hello"
},
"order_items": [
{
"shop_order_itemid": "20524",
"shop_order_item_orderid": "103210",
"shop_order_item_productid": "1938",
"shop_order_item_skuid": null,
"shop_order_item_clientid": null,
"product_name": "YS-M524-YU8I",
"product_description": "",
"sku": "YS-M524-YU8I",
"sku_description": "",
"out_of_stock_message": null,
"price": "23.99",
"quantity": "1",
"ship_weight": "0.00",
"ship_weight_total": "0.00",
"ship_total": "0.00",
"tax_total": "1.68",
"discount_total": "0.00",
"item_total": "23.99",
"tax_name": "",
"tax_rate": "0.070",
"external_itemid": "1",
"quickbooks_listid": null,
"is_queued_for_quickbooks_save": "0",
"ship_length_inches": "0.00",
"ship_width_inches": "0.00",
"ship_height_inches": "0.00",
"item_cost": "0.00",
"pre_order_amount_remaining": "0.00",
"pre_order_completed_date": null,
"pre_order_release_date": null,
"amazon_custom_prod": "0",
"amazon_custom_prod_processed": "0",
"is_amazon_fba": "0",
"item_note": null,
"item_upc": null,
"item_isbn": null,
"item_asin": "B001KYQODW",
"item_gtin": null,
"item_ean": null,
"item_additional_id": null,
"item_barcode": null,
"custom_data1": null,
"custom_data2": null,
"custom_data3": null,
"created_from_line_modify": "0",
"is_easypost_fbe": "0",
"is_shipstream_fbs": "0",
"is_flexe_fbf": "0",
"is_threepl_central_fbt": "1",
"wholesale_price": "23.99",
"option_info": null,
"input_option_info": null,
"warehouse": [
{
"shop_order_item_warehouse": "13687",
"soiw_itemid": "20524",
"warehouse_name": "Secondary Warehouse (Vegas)",
"warehouse_identifier": "secondary",
"quantity": "1",
"bin_location": null,
"drop_shipper_id": "1"
}
],
"quantity_shipped": "1",
"quantity_to_ship": 0,
"quantity_returned": 0,
"quantity_to_return": "1",
"return_requested": false,
"infiplex_rma_id": null,
"customization_info": null,
"serial_numbers": null,
"friendly_url": "",
"price_group_info": [
{
"shop_product_priceid": "16516",
"sp_price_productid": "1938",
"sp_price_price_groupid": "3",
"price": "23.99",
"can_purchase": "1"
},
{
"shop_product_priceid": "16517",
"sp_price_productid": "1938",
"sp_price_price_groupid": "4",
"price": "23.99",
"can_purchase": "1"
}
],
"images": null
}
]
}
Authorization
Bearer token, sent in the Authorization header. Inherited from the collection.
Headers
| Key | Value | Description |
|---|---|---|
Authorization | Bearer YOUR_API_KEY |
Query Parameters
| Key | Value | Description |
|---|---|---|
date_created_greater_equal_than optional | Searches for orders created after the date sent. 2018-01-01 10:10:10 AM | |
date_created_less_equal_than optional | Searches for orders created before the date sent. 2018-01-01 10:10:10 AM | |
fully_shipped optional | Set to 1 for fully shipped orders only | |
just_count | 0 | Set to 1 if you want a count of orders found |
last_modified_start_date optional | Searches for orders modified after the date sent. 2018-01-01 10:10:10 AM | |
last_modified_end_date optional | Searches for orders modified before the date sent. 2018-01-01 10:10:10 AM | |
limit_start optional | If 100 results are returned and this is set to 25, the first 25 results will be omitted | |
maximum_order_number optional | Order ID must be less than or equal to this value. | |
minimum_order_number optional | Order ID must be greater than or equal to this value. | |
order_max_total optional | Total price for order must be less than or equal to this value | |
order_min_total optional | Total price for order must be greater than or equal to this value | |
order_tag optional | The order tag you want to filter on | |
product_sku optional | Search for orders that contain a specific sku | |
sort optional | Default is shop_orderid DESC | |
text_search optional | ||
order_status_eq optional | new | If you want to filter for a specific order status. Valid statuses are: new, needs_review, in_process, pick_up_ready, pick_up_confirmed, closed |
include_order_additional_info optional | 1 | If you want to include additional info from orders, set this to 1. |
limit | 2 |
Body
#set($inputRoot = $this)
#set($our_stores=[{"ssid":"6bbc9250-c0d2-4d10-b9a4-91b640eda328","store_name":"Store 1","store_id":1,"store_contact_email":"store1@example.com"},{"ssid":"123c9250-c0d2-4d10-b9a4-091480eda000","store_name":"Store 2","store_id":2,"store_contact_email":"store2@example.com"}])
#set($orders_total_count = $orders.size())
{
"orders": [
#foreach($order in $orders)
#set($orders_current_count = $foreach.count)
{
"order_id": "$order.shop_orderid",
"amazon_today_shipment_id": "$order.external_order_num",
"amazon_today_order_id": "$order.additional_customer_order_id",
"amazon_supply_source_id": "$order.additional_info.amazon_today_location_id",
"creation_date": "$order.order_date",
"creation_date_year": "$order.order_date.substring(0,4)",
"creation_date_dmy": "$order.order_date.substring(8,10)/$order.order_date.substring(5,7)/$order.order_date.substring(0,4)",
"item_total": "$order.item_total",
"shipping_total": "$order.ship_price",
"tax_total": "$order.tax_total",
"grand_total": "$order.order_total",
"ship_to_full_name": "$order.ship_first_name $order.ship_last_name",
#foreach($our_store in $our_stores)
#if($order.additional_info.amazon_today_location_id==$our_store.ssid)
"our_store_name": "$our_store.store_name",
"our_store_email": "$our_store.store_contact_email",
"our_store_id": $our_store.store_id,
#end
#end
"order_items": [
#set($order_item_total_count = $order.order_items.size())
#foreach($order_item in $order.order_items)
#set($order_item_current_count = $foreach.count)
{
"sku": "$order_item.sku",
"asin": "$order_item.item_asin",
"quantity": $order_item.quantity,
"unit_price": $order_item.price
}
#if($order_item_current_count != $order_item_total_count), #end
#end
]
}
#if($orders_current_count != $orders_total_count), #end
#end
]
}Example Request
curl --location --request POST '{{api_url}}/shop/amazontoday/velocity/order/search?just_count=0&limit=2' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '#set($inputRoot = $this)
#set($our_stores=[{"ssid":"6bbc9250-c0d2-4d10-b9a4-91b640eda328","store_name":"Store 1","store_id":1,"store_contact_email":"store1@example.com"},{"ssid":"123c9250-c0d2-4d10-b9a4-091480eda000","store_name":"Store 2","store_id":2,"store_contact_email":"store2@example.com"}])
#set($orders_total_count = $orders.size())
{
"orders": [
#foreach($order in $orders)
#set($orders_current_count = $foreach.count)
{
"order_id": "$order.shop_orderid",
"amazon_today_shipment_id": "$order.external_order_num",
"amazon_today_order_id": "$order.additional_customer_order_id",
"amazon_supply_source_id": "$order.additional_info.amazon_today_location_id",
"creation_date": "$order.order_date",
"creation_date_year": "$order.order_date.substring(0,4)",
"creation_date_dmy": "$order.order_date.substring(8,10)/$order.order_date.substring(5,7)/$order.order_date.substring(0,4)",
"item_total": "$order.item_total",
"shipping_total": "$order.ship_price",
"tax_total": "$order.tax_total",
"grand_total": "$order.order_total",
"ship_to_full_name": "$order.ship_first_name $order.ship_last_name",
#foreach($our_store in $our_stores)
#if($order.additional_info.amazon_today_location_id==$our_store.ssid)
"our_store_name": "$our_store.store_name",
"our_store_email": "$our_store.store_contact_email",
"our_store_id": $our_store.store_id,
#end
#end
"order_items": [
#set($order_item_total_count = $order.order_items.size())
#foreach($order_item in $order.order_items)
#set($order_item_current_count = $foreach.count)
{
"sku": "$order_item.sku",
"asin": "$order_item.item_asin",
"quantity": $order_item.quantity,
"unit_price": $order_item.price
}
#if($order_item_current_count != $order_item_total_count), #end
#end
]
}
#if($orders_current_count != $orders_total_count), #end
#end
]
}'Example Responses
Order Search - JSON with store map
Request
curl --location --request POST 'https://example.com/api/admin/shop/amazontoday/velocity/order/search?just_count=0&limit=1' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '#set($inputRoot = $this)
#set($our_stores=[{"ssid":"6bbc9250-c0d2-4d10-b9a4-91b640eda328","store_name":"Store 1","store_id":1,"store_contact_email":"store1@example.com"},{"ssid":"123c9250-c0d2-4d10-b9a4-091480eda000","store_name":"Store 2","store_id":2,"store_contact_email":"store2@example.com"}])
#set($orders_total_count = $orders.size())
{
"orders": [
#foreach($order in $orders)
#set($orders_current_count = $foreach.count)
{
"order_id": "$order.shop_orderid",
"amazon_today_shipment_id": "$order.external_order_num",
"amazon_today_order_id": "$order.additional_customer_order_id",
"amazon_today_supply_source_id": "$order.additional_info.amazon_today_location_id",
"creation_date": "$order.order_date",
"creation_date_dmy": "$order.order_date.substring(8,10)/$order.order_date.substring(5,7)/$order.order_date.substring(0,4)",
"item_total": "$order.item_total",
"shipping_total": "$order.ship_price",
"tax_total": "$order.tax_total",
"grand_total": "$order.order_total",
"ship_to_full_name": "$order.ship_first_name $order.ship_last_name",
#foreach($our_store in $our_stores)
#if($order.additional_info.amazon_today_location_id==$our_store.ssid)
"our_store_name": "$our_store.store_name",
"our_store_email": "$our_store.store_contact_email",
"our_store_id": $our_store.store_id,
#end
#end
"order_items": [
#set($order_item_total_count = $order.order_items.size())
#foreach($order_item in $order.order_items)
#set($order_item_current_count = $foreach.count)
{
"sku": "$order_item.sku",
"quantity": $order_item.quantity,
"unit_price": $order_item.price
}
#if($order_item_current_count != $order_item_total_count), #end
#end
]
}
#if($orders_current_count != $orders_total_count), #end
#end
]
}'Response
{
"orders": [
{
"order_id": "103210",
"amazon_today_shipment_id": "Zaaabbb02",
"amazon_today_order_id": "111-1111111-1111112",
"amazon_today_supply_source_id": "6bbc9250-c0d2-4d10-b9a4-91b640eda328",
"creation_date": "2023-02-14 20:18:08",
"creation_date_dmy": "14/02/2023",
"item_total": "23.99",
"shipping_total": "0.00",
"tax_total": "1.68",
"grand_total": "25.67",
"ship_to_full_name": "Test User1",
"our_store_name": "Store 1",
"our_store_email": "store1@example.com",
"our_store_id": 1,
"order_items": [
{
"sku": "YS-M524-YU8I",
"quantity": 1,
"unit_price": 23.99
}
]
},
{
"order_id": "103204",
"amazon_today_shipment_id": "Zaaabbb03",
"amazon_today_order_id": "111-1111111-1111113",
"amazon_today_supply_source_id": "123c9250-c0d2-4d10-b9a4-091480eda000",
"creation_date": "2023-06-08 12:23:58",
"item_total": "120.00",
"shipping_total": "40.00",
"tax_total": "33.00",
"grand_total": "193.00",
"ship_to_full_name": "Test User2",
"our_store_name": "Store 2",
"our_store_email": "store2@example.com",
"our_store_id": 2,
"order_items": [
{
"sku": "1002400773021",
"quantity": 2,
"unit_price": 60
}
]
}
]
}Order Search - Simple JSON
Request
curl --location --request POST 'https://example.com/api/admin/shop/amazontoday/velocity/order/search?just_count=0&limit=1' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '#set($inputRoot = $this)
#set($orders_total_count = $orders.size())
{
"orders": [
#foreach($order in $orders)
#set($orders_current_count = $foreach.count)
{
"order_id": "$order.shop_orderid",
"amazon_today_shipment_id": "$order.external_order_num",
"amazon_today_order_id": "$order.additional_customer_order_id",
"amazon_today_supply_source_id": "$order.additional_info.amazon_today_location_id",
"creation_date": "$order.order_date",
"ship_to_full_name": "$order.ship_first_name $order.ship_last_name",
"order_items": [
#set($order_item_total_count = $order.order_items.size())
#foreach($order_item in $order.order_items)
#set($order_item_current_count = $foreach.count)
{
"sku": "$order_item.sku",
"quantity": $order_item.quantity,
"unit_price": $order_item.price
}
#if($order_item_current_count != $order_item_total_count), #end
#end
]
}
#if($orders_current_count != $orders_total_count), #end
#end
]
}'Response
{
"orders": [
{
"order_id": "103210",
"amazon_today_shipment_id": "Zaaabbb02",
"amazon_today_order_id": "111-1111111-1111112",
"amazon_today_supply_source_id": "6bbc9250-c0d2-4d10-b9a4-91b640eda328",
"creation_date": "2023-02-14 20:18:08",
"ship_to_full_name": "Test User1",
"order_items": [
{
"sku": "YS-M524-YU8I",
"quantity": 1,
"unit_price": 23.99
}
]
},
{
"order_id": "103204",
"amazon_today_shipment_id": "Zaaabbb03",
"amazon_today_order_id": "111-1111111-1111113",
"amazon_today_supply_source_id": "6bbc9250-c0d2-4d10-b9a4-91b640eda328",
"creation_date": "2023-06-08 12:23:58",
"ship_to_full_name": "Test User2",
"order_items": [
{
"sku": "1002400773021",
"quantity": 2,
"unit_price": 60
}
]
}
]
}Order Search - Simple XML
Request
curl --location --request POST 'https://example.com/api/admin/shop/amazontoday/velocity/order/search?just_count=0&limit=1' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '#set($inputRoot = $this)
<orders>
#foreach($order in $orders)
<order>
<order_id>$order.shop_orderid</order_id>
<amazon_today_shipment_id>$order.external_order_num</amazon_today_shipment_id>
<amazon_today_order_id>$order.additional_customer_order_id</amazon_today_order_id>
<amazon_today_supply_source_id>$order.additional_info.amazon_today_location_id</amazon_today_supply_source_id>
<creation_date>$order.order_date</creation_date>
<ship_to_full_name>$order.ship_first_name $order.ship_last_name</ship_to_full_name>
<order_items>
#foreach($order_item in $order.order_items)
<order_item>
<sku>$order_item.sku</sku>
<quantity>$order_item.quantity</quantity>
<unit_price>$order_item.price</unit_price>
<order_item>
#end
</order_items>
<order>
#end
</orders>
'Response
<orders>
<order>
<order_id>103210</order_id>
<amazon_today_shipment_id>Zaaabbb02</amazon_today_shipment_id>
<amazon_today_order_id>111-1111111-1111112</amazon_today_order_id>
<amazon_today_supply_source_id>6bbc9250-c0d2-4d10-b9a4-91b640eda328</amazon_today_supply_source_id>
<creation_date>2023-02-14 20:18:08</creation_date>
<ship_to_full_name>Test User1</ship_to_full_name>
<order_items>
<order_item>
<sku>YS-M524-YU8I</sku>
<quantity>1</quantity>
<unit_price>23.99</unit_price>
<order_item>
</order_items>
<order>
<order>
<order_id>103204</order_id>
<amazon_today_shipment_id>Zaaabbb03</amazon_today_shipment_id>
<amazon_today_order_id>111-1111111-1111113</amazon_today_order_id>
<amazon_today_supply_source_id>6bbc9250-c0d2-4d10-b9a4-91b640eda328</amazon_today_supply_source_id>
<creation_date>2023-06-08 12:23:58</creation_date>
<ship_to_full_name>Test User2</ship_to_full_name>
<order_items>
<order_item>
<sku>1002400773021</sku>
<quantity>2</quantity>
<unit_price>60.00</unit_price>
<order_item>
</order_items>
<order>
</orders>
