Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 KB | None | 0 0
  1. curl -g -X GET "$base_url/index.php/rest/V1/products/24-MB05/"
  2. -H "Authorization: Bearer $token"
  3.  
  4. curl -g -X POST "$base_url/index.php/rest/V1/guest-carts/"
  5. -H "Authorization: Bearer $token"
  6.  
  7. curl -g -X GET "$base_url/index.php/rest/V1/guest-carts/56241bf6bc084cd7589426c8754fc9c5"
  8. -H "Authorization: Bearer $token"
  9.  
  10. curl -g -X POST "$base_url/index.php/rest/V1/guest-carts/56241bf6bc084cd7589426c8754fc9c5/items"
  11. -H "Authorization: Bearer $token"
  12. -H "Content-Type:application/json"
  13. -d '{ "cartItem": { "quote_id": "56241bf6bc084cd7589426c8754fc9c5", "sku": "24-MB05", "qty": 1 } }'
  14.  
  15. curl -g -X POST "$base_url/index.php/rest/V1/guest-carts/56241bf6bc084cd7589426c8754fc9c5/shipping-information"
  16. -H "Authorization: Bearer $token"
  17. -H "Content-Type:application/json"
  18. -d '
  19. {
  20. "addressInformation": {
  21. "shippingAddress": {
  22. "region": "MH",
  23. "region_id": 0,
  24. "country_id": "IN",
  25. "street": [
  26. "Chakala,Kalyan (e)"
  27. ],
  28. "company": "abc",
  29. "telephone": "1111111",
  30. "postcode": "12223",
  31. "city": "Mumbai",
  32. "firstname": "Sameer",
  33. "lastname": "Sawant",
  34. "email": "paul@qooar.com",
  35. "prefix": "address_",
  36. "region_code": "MH",
  37. "sameAsBilling": 1
  38. },
  39. "billingAddress": {
  40. "region": "MH",
  41. "region_id": 0,
  42. "country_id": "IN",
  43. "street": [
  44. "Chakala,Kalyan (e)"
  45. ],
  46. "company": "abc",
  47. "telephone": "1111111",
  48. "postcode": "12223",
  49. "city": "Mumbai",
  50. "firstname": "Sameer",
  51. "lastname": "Sawant",
  52. "email": "paul@qooar.com",
  53. "prefix": "address_",
  54. "region_code": "MH"
  55. },
  56. "shipping_method_code": "flatrate",
  57. "shipping_carrier_code": "flatrate"
  58. }
  59. }
  60. '
  61.  
  62. curl -g -X GET "$base_url/index.php/rest/V1/guest-carts/56241bf6bc084cd7589426c8754fc9c5/payment-information"
  63. -H "Authorization: Bearer $token"
  64.  
  65. curl -g -X PUT "$base_url/index.php/rest/V1/guest-carts/56241bf6bc084cd7589426c8754fc9c5/order"
  66. -H "Authorization: Bearer $token"
  67. -H "Content-Type:application/json"
  68. -d '
  69. {
  70. "paymentMethod": {
  71. "method": "checkmo"
  72. }
  73. }
  74.  
  75. {
  76. "paymentMethod": {
  77. "method": "checkmo"
  78. }
  79. }
  80.  
  81. {"cartItem":{
  82. "sku":"JFCO00017","qty":1,"name":"Devil May Cry III 3 Dante Cosplay Costume","price":81.55,"product_type":"simple","quote_id":"4290","product_option":{"extension_attributes":{"custom_options":[{"option_id":"thumbnail","option_value":"/d/e/devilmaycryiii3dantecosplay_1_.jpg"},{"option_id":"color_2","option_value":"Red"},{"option_id":"google_size","option_value":"xxs"}]}}}
  83. }
  84.  
  85. {
  86. "address": {
  87. "city": "noida",
  88. "company": "iprag",
  89. "countryId": "IN",
  90. "email": "manish+2@gmail.com",
  91. "firstname": "Manish",
  92. "lastname": "Kumar",
  93. "postcode": "201301",
  94. "region": "UP",
  95. "saveInAddressBook": 1,
  96. "street": ["D-84"],
  97. "telephone": "8802045390"
  98. },
  99. "useForShipping": true
  100. }
  101.  
  102. {
  103. "carrier_code": "flatrate",
  104. "method_code": "flatrate",
  105. "carrier_title": "Flat Rate",
  106. "method_title": "Fixed",
  107. "amount": 10,
  108. "base_amount": 10,
  109. "available": true,
  110. "error_message": "",
  111. "price_excl_tax": 10,
  112. "price_incl_tax": 10
  113.  
  114. {
  115. "addressInformation": {
  116. "billingAddress": {
  117. "city": "noida",
  118. "company": "iprag",
  119. "email": "nkn@gmail.com",
  120. "firstname": "Manish",
  121. "lastname": "Kumar",
  122. "postcode": "335001",
  123. "region": "UP",
  124. "street": ["D-84"],
  125. "telephone": "9413433217"
  126. },
  127. "shippingAddress": {
  128. "city": "noida",
  129. "company": "iprag",
  130. "email": "nkn@gmail.com",
  131. "firstname": "Manish",
  132. "lastname": "Kumar",
  133. "postcode": "335001",
  134. "region": "UP",
  135. "street": ["D-84"],
  136. "telephone": "9413433217"
  137. },
  138. "shippingCarrierCode": "flatrate",
  139. "shippingMethodCode": "flatrate"
  140. }
  141. }
  142.  
  143. {
  144. "paymentMethod":{"method":"checkmo"},
  145. "shippingMethod":
  146. {
  147. "method_code":"flatrate",
  148.  
  149. "carrier_code":"flatrate",
  150. "additionalProperties":{}
  151.  
  152. }
  153.  
  154. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement