sak1b

CreateNewOrder mutation with variables

Feb 15th, 2021 (edited)
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. mutation CreateNewOrder(
  2. $userEmail: String
  3. $userPhone: String
  4. $partnerOrderId: String!
  5. $customerNote: String
  6. $shippingAddress: AddressInput
  7. $billingAddress: AddressInput
  8. $products: [OrderProductLineInput]!
  9. $paymentStatus: PaymentChargeStatusEnum
  10. $shipping: ShippingPriceInput
  11. $discount: VoucherInput
  12. ) {
  13. createNewOrder(
  14. input: {
  15. userEmail: $userEmail
  16. userPhone: $userPhone
  17. partnerOrderId: $partnerOrderId
  18. shippingAddress: $shippingAddress
  19. billingAddress: $billingAddress
  20. customerNote: $customerNote
  21. products: $products
  22. paymentStatus: $paymentStatus
  23. shipping: $shipping
  24. discount: $discount
  25. }
  26. ) {
  27. order {
  28. id
  29. number
  30. userEmail
  31. status
  32. total {
  33. net {
  34. amount
  35. }
  36. }
  37. voucher {
  38. discountValue
  39. }
  40. totalBalance {
  41. amount
  42. }
  43. shippingMethod {
  44. name
  45. price {
  46. amount
  47. }
  48. }
  49.  
  50. fulfillments {
  51. lines {
  52. quantity
  53. }
  54. status
  55. }
  56. payments {
  57. chargeStatus
  58. capturedAmount {
  59. amount
  60. }
  61. }
  62. shippingAddress {
  63. streetAddress1
  64. city
  65. }
  66. billingAddress {
  67. streetAddress1
  68. city
  69. }
  70. total {
  71. net {
  72. amount
  73. }
  74. }
  75. customerNote
  76. events {
  77. type
  78. date
  79. email
  80. }
  81. lines {
  82. productName
  83. productSku
  84. quantity
  85. unitPrice {
  86. net {
  87. amount
  88. }
  89. }
  90. }
  91. }
  92. orderErrors {
  93. code
  94. field
  95. message
  96. }
  97. __typename
  98. }
  99. }
  100. # ===========================================================================
  101. {
  102. "userEmail": "[email protected]",
  103. "userPhone": "01800000123",
  104. "partnerOrderId": "546",
  105. "customerNote": "try catch check",
  106. "paymentStatus": "FULLY_CHARGED",
  107. "shipping":{
  108. "name": "KCS",
  109. "price": 15
  110. },
  111. "discount": {
  112. "name": "new-year",
  113. "code": "ny",
  114. "discountValueType": "FIXED",
  115. "discountValue": 10
  116. },
  117.  
  118. "shippingAddress": {
  119. "firstName": "Link road",
  120. "city": "Dhaka",
  121. "streetAddress1": "BADDA",
  122. "country": "BD"
  123. },
  124. "billingAddress": {
  125. "firstName": "Kazipara",
  126. "city": "Dhaka",
  127. "streetAddress1": "MIRPUR",
  128. "country": "BD"
  129. },
  130. "products": [
  131. {
  132. "name": "xiaomi monitor",
  133. "sku": "623",
  134. "basePrice": 1,
  135. "quantity": 20,
  136. "description": "hi",
  137. "category": "entertainment"
  138. },
  139. {
  140. "name": "ps 5",
  141. "sku": "624",
  142. "basePrice": 40,
  143. "quantity": 2,
  144. "description": "hi",
  145. "category": "entertainment7",
  146. "metaData": [
  147. {
  148. "key": "ram",
  149. "value": "8GB"
  150. },
  151. {
  152. "key": "brand",
  153. "value": "samsung"
  154. }
  155. ]
  156. }
  157. ]
  158. }
  159.  
  160. #===============================================
  161. {
  162. "Authorization": "bearer gyMd70P7QUcvbzlEPp7TVbPJJf6AEt"
  163. }
Add Comment
Please, Sign In to add comment