Closed gplsek closed 10 years ago
-----GET ALL ORDERS WHERE USER AS BUYER------- GET http://fitmoostore.loc/fit_store/order?buyer=1 X-CSRF-Token: m9o0DtovaW2kaK2uR963JbCgqp1revaFxiuG3D9a7lw Cookie: SESSb22f1e1c07a26da425a441410bf4eb41=KxCCygCEP6q0fLaMgjG2a5s03YAfk-RRA0CZs4OKtgs -- response -- [{"order_number":"32","revision_id":"182","revision_uid":"1","mail":"sabre+1@tut.by","status":"completed","log":"Created as a shopping cart order.","revision_timestamp":"1395687247","revision_hostname":"127.0.0.1","data":[],"order_id":"32","type":"commerce_order","uid":"4","created":"1395682675","changed":"1395687247","hostname":"127.0.0.1","commerce_line_items":{"und":[{"line_item_id":"82"},{"line_item_id":"83"},{"line_item_id":"84"},{"line_item_id":"86"},{"line_item_id":"87"}]},"commerce_order_total":{"und":[{"amount":"4021","currency_code":"USD","data":{"components":[{"name":"base_price","price":{"amount":4021,"currency_code":"USD","data":[]},"included":true}]}}]},"commerce_customer_billing":{"und":[{"profile_id":"16"}]},"commerce_customer_shipping":{"und":[{"profile_id":"17"}]},"commerce_discounts":[],"field_commerce_sp_paypal":{"und":[{"value":"0"}]},"rdf_mapping":[],"commerce_order_total_formatted":"$40.21"},{"order_number":"32","revision_id":"182","revision_uid":"1","mail":"sabre+1@tut.by","status":"completed","log":"Created as a shopping cart order.","revision_timestamp":"1395687247","revision_hostname":"127.0.0.1","data":[],"order_id":"32","type":"commerce_order","uid":"4","created":"1395682675","changed":"1395687247","hostname":"127.0.0.1","commerce_line_items":{"und":[{"line_item_id":"82"},{"line_item_id":"83"},{"line_item_id":"84"},{"line_item_id":"86"},{"line_item_id":"87"}]},"commerce_order_total":{"und":[{"amount":"4021","currency_code":"USD","data":{"components":[{"name":"base_price","price":{"amount":4021,"currency_code":"USD","data":[]},"included":true}]}}]},"commerce_customer_billing":{"und":[{"profile_id":"16"}]},"commerce_customer_shipping":{"und":[{"profile_id":"17"}]},"commerce_discounts":[],"field_commerce_sp_paypal":{"und":[{"value":"0"}]},"rdf_mapping":[],"commerce_order_total_formatted":"$40.21"},{"order_number":"33","revision_id":"183","revision_uid":"1","mail":"sabre+1@tut.by","status":"completed","log":"Created as a shopping cart order.","revision_timestamp":"1395687364","revision_hostname":"127.0.0.1","data":[],"order_id":"33","type":"commerce_order","uid":"4","created":"1395687291","changed":"1395687364","hostname":"127.0.0.1","commerce_line_items":{"und":[{"line_item_id":"88"},{"line_item_id":"89"}]},"commerce_order_total":{"und":[{"amount":"22","currency_code":"USD","data":{"components":[{"name":"base_price","price":{"amount":22,"currency_code":"USD","data":[]},"included":true}]}}]},"commerce_customer_billing":{"und":[{"profile_id":"16"}]},"commerce_customer_shipping":{"und":[{"profile_id":"17"}]},"commerce_discounts":[],"field_commerce_sp_paypal":{"und":[{"value":"0"}]},"rdf_mapping":[],"commerce_order_total_formatted":"$0.22"},{"order_number":"33","revision_id":"183","revision_uid":"1","mail":"sabre+1@tut.by","status":"completed","log":"Created as a shopping cart order.","revision_timestamp":"1395687364","revision_hostname":"127.0.0.1","data":[],"order_id":"33","type":"commerce_order","uid":"4","created":"1395687291","changed":"1395687364","hostname":"127.0.0.1","commerce_line_items":{"und":[{"line_item_id":"88"},{"line_item_id":"89"}]},"commerce_order_total":{"und":[{"amount":"22","currency_code":"USD","data":{"components":[{"name":"base_price","price":{"amount":22,"currency_code":"USD","data":[]},"included":true}]}}]},"commerce_customer_billing":{"und":[{"profile_id":"16"}]},"commerce_customer_shipping":{"und":[{"profile_id":"17"}]},"commerce_discounts":[],"field_commerce_sp_paypal":{"und":[{"value":"0"}]},"rdf_mapping":[],"commerce_order_total_formatted":"$0.22"},{"order_number":"34","revision_id":"184","revision_uid":"4","mail":"sabre+1@tut.by","status":"cart","log":"Created as a shopping cart order.","revision_timestamp":1395691144,"revision_hostname":"127.0.0.1","data":[],"order_id":"34","type":"commerce_order","uid":"4","created":"1395687383","changed":1395691144,"hostname":"127.0.0.1","commerce_line_items":{"und":[{"line_item_id":"90"},{"line_item_id":"91"}]},"commerce_order_total":{"und":[{"amount":3012,"currency_code":"USD","data":{"components":[{"name":"base_price","price":{"amount":3012,"currency_code":"USD","data":[]},"included":true}]}}]},"commerce_customer_billing":{"und":[{"profile_id":"16"}]},"commerce_customer_shipping":{"und":[{"profile_id":"17"}]},"commerce_discounts":{"und":[]},"field_commerce_sp_paypal":{"und":[{"value":"0"}]},"rdf_mapping":[],"commerce_order_total_formatted":"$30.12"},{"order_number":"34","revision_id":"184","revision_uid":"4","mail":"sabre+1@tut.by","status":"cart","log":"Created as a shopping cart order.","revision_timestamp":1395691144,"revision_hostname":"127.0.0.1","data":[],"order_id":"34","type":"commerce_order","uid":"4","created":"1395687383","changed":1395691144,"hostname":"127.0.0.1","commerce_line_items":{"und":[{"line_item_id":"90"},{"line_item_id":"91"}]},"commerce_order_total":{"und":[{"amount":3012,"currency_code":"USD","data":{"components":[{"name":"base_price","price":{"amount":3012,"currency_code":"USD","data":[]},"included":true}]}}]},"commerce_customer_billing":{"und":[{"profile_id":"16"}]},"commerce_customer_shipping":{"und":[{"profile_id":"17"}]},"commerce_discounts":{"und":[]},"field_commerce_sp_paypal":{"und":[{"value":"0"}]},"rdf_mapping":[],"commerce_order_total_formatted":"$30.12"}]
-----GET ALL ORDERS WHERE USER AS SELLER------- GET http://fitmoostore.loc/fit_store/order?seller=1 X-CSRF-Token: m9o0DtovaW2kaK2uR963JbCgqp1revaFxiuG3D9a7lw Cookie: SESSb22f1e1c07a26da425a441410bf4eb41=KxCCygCEP6q0fLaMgjG2a5s03YAfk-RRA0CZs4OKtgs -- response -- [{"order_number":"33","revision_id":"183","revision_uid":"1","mail":"sabre+1@tut.by","status":"completed","log":"Created as a shopping cart order.","revision_timestamp":"1395687364","revision_hostname":"127.0.0.1","data":[],"order_id":"33","type":"commerce_order","uid":"4","created":"1395687291","changed":"1395687364","hostname":"127.0.0.1","commerce_line_items":{"und":[{"line_item_id":"88"},{"line_item_id":"89"}]},"commerce_order_total":{"und":[{"amount":"22","currency_code":"USD","data":{"components":[{"name":"base_price","price":{"amount":22,"currency_code":"USD","data":[]},"included":true}]}}]},"commerce_customer_billing":{"und":[{"profile_id":"16"}]},"commerce_customer_shipping":{"und":[{"profile_id":"17"}]},"commerce_discounts":[],"field_commerce_sp_paypal":{"und":[{"value":"0"}]},"rdf_mapping":[],"commerce_order_total_formatted":"$0.22"}]
====GET ORDER==== GET http://fitmoostore.loc/fit_store/order/38 Cookie: SESSb22f1e1c07a26da425a441410bf4eb41=obMaNc86xXu4ORpH9egTxLjca6L45lHctsTWTBkMiXI X-CSRF-Token: eiYvGjzOp6kU0OiXPh3-_2PZ05GV4uXd2u5m9B-Q1lw -- response -- { "order_number":"38", "revision_id":"202", "revision_uid":"4", "mail":"sabre+1@tut.by", "status":"pending", "log":"Order state updated via Rules.", "revision_timestamp":"1395753575", "revision_hostname":"134.17.143.204", "data":{ "payment_method":"paypal_wpp|commerce_payment_paypal_wpp" }, "order_id":"38", "type":"commerce_order", "uid":"4", "created":"1395748732", "changed":"1395753575", "hostname":"134.17.143.204", "commerce_line_items":[ "97" ], "commerce_order_total":{ "amount":"213", "currency_code":"USD", "data":{ "components":[ { "name":"base_price", "price":{ "amount":213, "currency_code":"USD", "data":[
]
},
"included":true
}
]
}
}, "commerce_customer_billing":"18", "commerce_customer_shipping":"19", "commerce_discounts":[
], "field_commerce_sp_paypal":false, "rdf_mapping":[
], "commerce_order_total_formatted":"$2.13", "commerce_line_items_entities":{ "97":{ "line_item_id":"97", "order_id":"38", "type":"product", "line_item_label":"Gear_15d4b8864500c8f9daa5b5f03076d0", "quantity":"1.00", "created":"1395753245", "changed":"1395753574", "data":[
],
"commerce_unit_price":{
"amount":"213",
"currency_code":"USD",
"data":{
"components":[
{
"name":"base_price",
"price":{
"amount":"213",
"currency_code":"USD",
"data":{
"components":[
]
}
},
"included":true
}
]
}
},
"commerce_total":{
"amount":"213",
"currency_code":"USD",
"data":{
"components":[
{
"name":"base_price",
"price":{
"amount":213,
"currency_code":"USD",
"data":{
"components":[
]
}
},
"included":true
}
]
}
},
"commerce_product":"734",
"commerce_display_path":"",
"rdf_mapping":[
],
"line_item_title":"dfsa",
"commerce_unit_price_formatted":"$2.13",
"commerce_total_formatted":"$2.13"
}
}, "commerce_customer_billing_entities":{ "18":{ "revision_id":"18", "revision_uid":"4", "status":"1", "log":"", "revision_timestamp":"1395753563", "data":false, "profile_id":"18", "type":"billing", "uid":"4", "created":"1395748828", "changed":"1395753563", "commerce_customer_address":{ "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"11735", "thoroughfare":"350-B Great Neck Road", "premise":"#135384", "sub_premise":null, "organisation_name":null, "name_line":"Maksim Klimchuk", "first_name":"Maksim", "last_name":"Klimchuk", "data":null }, "rdf_mapping":[
]
}
}, "commerce_customer_shipping_entities":{ "19":{ "revision_id":"19", "revision_uid":"4", "status":"1", "log":"", "revision_timestamp":"1395753563", "data":false, "profile_id":"19", "type":"shipping", "uid":"4", "created":"1395748828", "changed":"1395753563", "commerce_customer_address":{ "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"11735", "thoroughfare":"350-B Great Neck Road", "premise":"#135384", "sub_premise":null, "organisation_name":null, "name_line":"MAx Klimchuk", "first_name":"MAx", "last_name":"Klimchuk", "data":null }, "rdf_mapping":[
]
}
} }
{ "order_number":"41", "revision_id":"209", "revision_uid":"1", "mail":"test3@test.com", "status":"completed", "log":"Created as a shopping cart order.", "revision_timestamp":1395892591, "revision_hostname":"127.0.0.1", "data":[
], "order_id":"41", "type":"commerce_order", "uid":"112", "created":"1395800331", "changed":1395892591, "hostname":"117.3.103.203", "commerce_line_items":[ "99" ], "commerce_order_total":{ "amount":1000, "currency_code":"USD", "data":{ "components":{ "0":{ "name":"base_price", "price":{ "amount":1000, "currency_code":"USD", "data":[
]
},
"included":true
},
"data":{
"components":[
]
}
}
},
"und":[
{
"amount":0,
"currency_code":"USD",
"data":{
"components":[
{
"name":"base_price",
"price":{
"amount":0,
"currency_code":"USD",
"data":[
]
},
"included":true
}
]
}
}
]
}, "commerce_customer_billing":"51", "commerce_customer_shipping":"50", "commerce_discounts":[
], "field_commerce_sp_paypal":null, "rdf_mapping":[
], "commerce_order_total_formatted":"$10.00", "commerce_customer_shipping_entities":{ "50":{ "type":"shipping", "uid":"1", "profile_id":"50", "revision_id":"50", "status":1, "created":1395892591, "changed":1395892591, "commerce_customer_address":{ "und":[ { "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735", "thoroughfare":"3213B Great Neck Road", "premise":"#135841", "sub_premise":null, "organisation_name":null, "name_line":"MAx2 Klimchuk", "first_name":"MAx2", "last_name":"Klimchuk", "data":null } ] }, "revision_uid":"1", "revision_timestamp":1395892591, "log":"" } }, "commerce_customer_billing_entities":{ "51":{ "type":"billing", "uid":"1", "profile_id":"51", "revision_id":"51", "status":1, "created":1395892591, "changed":1395892591, "commerce_customer_address":{ "und":[ { "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735asd", "thoroughfare":"32B Gt Neck Road", "premise":"#131", "sub_premise":null, "organisation_name":null, "name_line":"M Klimchuk", "first_name":"M", "last_name":"Klimchuk", "data":null } ] }, "revision_uid":"1", "revision_timestamp":1395892591, "log":"" } } }
-----UPDATE ORDER SHIPPING/BILLING ADRESSES---- PUT http://fitmoostore.loc/fit_store/order/41 Cookie: SESSb22f1e1c07a26da425a441410bf4eb41=RttkuowAExqlaePGnT7S__pLbZxkBGJZuipctuMfYZE X-CSRF-Token: VDAALgxMTpEOIH1o2wFv-6CXvLMuW_T2ty8oMkg593U Content-Type: application/json { "commerce_customer_shipping":{ "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735", "thoroughfare":"3213B Great Neck Road", "premise":"#135841", "sub_premise":null, "organisation_name":null, "name_line":"MAx2 Klimchuk", "first_name":"MAx1", "last_name":"Klimchuk2", "data":null }, "commerce_customer_billing":{ "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735asd", "thoroughfare":"32B Gt Neck Road", "premise":"#131", "sub_premise":null, "organisation_name":null, "name_line":"M Klimchuk", "first_name":"MA", "last_name":"Klim", "data":null }
} -- response --
{ "order_number":"41", "revision_id":"209", "revision_uid":"1", "mail":"test3@test.com", "status":"completed", "log":"Created as a shopping cart order.", "revision_timestamp":1395892591, "revision_hostname":"127.0.0.1", "data":[
], "order_id":"41", "type":"commerce_order", "uid":"112", "created":"1395800331", "changed":1395892591, "hostname":"117.3.103.203", "commerce_line_items":[ "99" ], "commerce_order_total":{ "amount":1000, "currency_code":"USD", "data":{ "components":{ "0":{ "name":"base_price", "price":{ "amount":1000, "currency_code":"USD", "data":[
]
},
"included":true
},
"data":{
"components":[
]
}
}
},
"und":[
{
"amount":0,
"currency_code":"USD",
"data":{
"components":[
{
"name":"base_price",
"price":{
"amount":0,
"currency_code":"USD",
"data":[
]
},
"included":true
}
]
}
}
]
}, "commerce_customer_billing":"51", "commerce_customer_shipping":"50", "commerce_discounts":[
], "field_commerce_sp_paypal":null, "rdf_mapping":[
], "commerce_order_total_formatted":"$10.00", "commerce_customer_shipping_entities":{ "50":{ "type":"shipping", "uid":"1", "profile_id":"50", "revision_id":"50", "status":1, "created":1395892591, "changed":1395892591, "commerce_customer_address":{ "und":[ { "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735", "thoroughfare":"3213B Great Neck Road", "premise":"#135841", "sub_premise":null, "organisation_name":null, "name_line":"MAx2 Klimchuk", "first_name":"MAx2", "last_name":"Klimchuk", "data":null } ] }, "revision_uid":"1", "revision_timestamp":1395892591, "log":"" } }, "commerce_customer_billing_entities":{ "51":{ "type":"billing", "uid":"1", "profile_id":"51", "revision_id":"51", "status":1, "created":1395892591, "changed":1395892591, "commerce_customer_address":{ "und":[ { "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735asd", "thoroughfare":"32B Gt Neck Road", "premise":"#131", "sub_premise":null, "organisation_name":null, "name_line":"M Klimchuk", "first_name":"M", "last_name":"Klimchuk", "data":null } ] }, "revision_uid":"1", "revision_timestamp":1395892591, "log":"" } } }
-----UPDATE ORDER SHIPPING/BILLING ADRESSES---- PUT http://fitmoostore.loc/fit_store/order/41 Cookie: SESSb22f1e1c07a26da425a441410bf4eb41=RttkuowAExqlaePGnT7S__pLbZxkBGJZuipctuMfYZE X-CSRF-Token: VDAALgxMTpEOIH1o2wFv-6CXvLMuW_T2ty8oMkg593U Content-Type: application/json { "commerce_customer_shipping":{ "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735", "thoroughfare":"3213B Great Neck Road", "premise":"#135841", "sub_premise":null, "organisation_name":null, "name_line":"MAx2 Klimchuk", "first_name":"MAx1", "last_name":"Klimchuk2", "data":null }, "commerce_customer_billing":{ "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735asd", "thoroughfare":"32B Gt Neck Road", "premise":"#131", "sub_premise":null, "organisation_name":null, "name_line":"M Klimchuk", "first_name":"MA", "last_name":"Klim", "data":null }
}
==UPDATE ORDER SHIPPING BILLING ADRESSES=== PUT http://fitmoostore.loc/fit_store/order/41 Cookie: SESSb22f1e1c07a26da425a441410bf4eb41=RttkuowAExqlaePGnT7S__pLbZxkBGJZuipctuMfYZE X-CSRF-Token: VDAALgxMTpEOIH1o2wFv-6CXvLMuW_T2ty8oMkg593U Content-Type: application/json { "commerce_customer_shipping":{ "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735", "thoroughfare":"3213B Great Neck Road", "premise":"#135841", "sub_premise":null, "organisation_name":null, "name_line":"MAx2 Klimchuk", "first_name":"MAx1", "last_name":"Klimchuk2", "data":null }, "commerce_customer_billing":{ "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735asd", "thoroughfare":"32B Gt Neck Road", "premise":"#131", "sub_premise":null, "organisation_name":null, "name_line":"M Klimchuk", "first_name":"MA", "last_name":"Klim", "data":null }
}
-----UPDATE ORDER SHIPPING/BILLING ADRESSES---- PUT http://fitmoostore.loc/fit_store/order/41 Cookie: SESSb22f1e1c07a26da425a441410bf4eb41=RttkuowAExqlaePGnT7S__pLbZxkBGJZuipctuMfYZE X-CSRF-Token: VDAALgxMTpEOIH1o2wFv-6CXvLMuW_T2ty8oMkg593U Content-Type: application/json { "commerce_customer_shipping":{ "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735", "thoroughfare":"3213B Great Neck Road", "premise":"#135841", "sub_premise":null, "organisation_name":null, "name_line":"MAx2 Klimchuk", "first_name":"MAx1", "last_name":"Klimchuk2", "data":null }, "commerce_customer_billing":{ "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735asd", "thoroughfare":"32B Gt Neck Road", "premise":"#131", "sub_premise":null, "organisation_name":null, "name_line":"M Klimchuk", "first_name":"MA", "last_name":"Klim", "data":null }
}
-- response --
{ "order_number":"41", "revision_id":"209", "revision_uid":"1", "mail":"test3@test.com", "status":"completed", "log":"Created as a shopping cart order.", "revision_timestamp":1395892591, "revision_hostname":"127.0.0.1", "data":[
], "order_id":"41", "type":"commerce_order", "uid":"112", "created":"1395800331", "changed":1395892591, "hostname":"117.3.103.203", "commerce_line_items":[ "99" ], "commerce_order_total":{ "amount":1000, "currency_code":"USD", "data":{ "components":{ "0":{ "name":"base_price", "price":{ "amount":1000, "currency_code":"USD", "data":[
]
},
"included":true
},
"data":{
"components":[
]
}
}
},
"und":[
{
"amount":0,
"currency_code":"USD",
"data":{
"components":[
{
"name":"base_price",
"price":{
"amount":0,
"currency_code":"USD",
"data":[
]
},
"included":true
}
]
}
}
]
}, "commerce_customer_billing":"51", "commerce_customer_shipping":"50", "commerce_discounts":[
], "field_commerce_sp_paypal":null, "rdf_mapping":[
], "commerce_order_total_formatted":"$10.00", "commerce_customer_shipping_entities":{ "50":{ "type":"shipping", "uid":"1", "profile_id":"50", "revision_id":"50", "status":1, "created":1395892591, "changed":1395892591, "commerce_customer_address":{ "und":[ { "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735", "thoroughfare":"3213B Great Neck Road", "premise":"#135841", "sub_premise":null, "organisation_name":null, "name_line":"MAx2 Klimchuk", "first_name":"MAx2", "last_name":"Klimchuk", "data":null } ] }, "revision_uid":"1", "revision_timestamp":1395892591, "log":"" } }, "commerce_customer_billing_entities":{ "51":{ "type":"billing", "uid":"1", "profile_id":"51", "revision_id":"51", "status":1, "created":1395892591, "changed":1395892591, "commerce_customer_address":{ "und":[ { "country":"US", "administrative_area":"NY", "sub_administrative_area":null, "locality":"Farmingdale", "dependent_locality":null, "postal_code":"12735asd", "thoroughfare":"32B Gt Neck Road", "premise":"#131", "sub_premise":null, "organisation_name":null, "name_line":"M Klimchuk", "first_name":"M", "last_name":"Klimchuk", "data":null } ] }, "revision_uid":"1", "revision_timestamp":1395892591, "log":"" } } }
{ "fitmooProdId":"6", "BuyerUID":"12", -- this is the drupal ID for the buyer "size":"Extra Large", "quantity":"2", "status":"Pending", "status date":"12/12/2014", "OrderNum":"1212", "OrderDate":"12/12/2014", "ShipAddress":"", "LineItems":{"Price":"24.00", "Tax":"0", "Shipping":"4.50", "Total":"28.50" }, "card":"visa 2345", }