Advertisement
Guest User

Post to api/method/item

a guest
Mar 14th, 2019
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.24 KB | None | 0 0
  1. // POST to api/method/item
  2. // request body:
  3. {
  4. "Code": "RM-001",
  5. "UnitCost": "10000",
  6. "UnitPrice": "9000",
  7. "Article": "Hijab",
  8. "Category": "Hijab",
  9. "Brand": "Ria Miranda",
  10. "Product": "Hijab Jarik Collection",
  11. "name": "RM-001",
  12. "submit": 1,
  13. "Color": "Blue",
  14. "Size": "M",
  15. "Variant": "Blue",
  16. "Option 3": "Blue"
  17. }
  18.  
  19. // Result:
  20. {
  21. "message": {
  22. "message": "OK",
  23. "data": {
  24. "website_specifications": [],
  25. "enable_deferred_expense": 0,
  26. "disabled": 0,
  27. "reorder_levels": [],
  28. "modified_by": "rm@pts.sc",
  29. "item_name": "Hijab Blue M Blue Blue",
  30. "has_expiry_date": 0,
  31. "default_material_request_type": "Purchase",
  32. "is_purchase_item": 1,
  33. "website_item_groups": [],
  34. "max_discount": 0,
  35. "name": "RM-001",
  36. "item_group": "Hijab - RM",
  37. "weight_per_unit": 0,
  38. "creation": "2019-03-14 16:37:44.597566",
  39. "doctype": "Item",
  40. "variant_of": "Hijab",
  41. "taxes": [],
  42. "create_new_batch": 0,
  43. "has_variants": 0,
  44. "supplier_items": [
  45. {
  46. "modified_by": "rm@pts.sc",
  47. "name": "ad47398552",
  48. "parent": "RM-001",
  49. "creation": "2019-03-14 16:37:44.597566",
  50. "modified": "2019-03-14 16:37:44.597566",
  51. "doctype": "Item Supplier",
  52. "idx": 1,
  53. "parenttype": "Item",
  54. "owner": "rm@pts.sc",
  55. "docstatus": 0,
  56. "supplier": "Global Supplier",
  57. "parentfield": "supplier_items"
  58. }
  59. ],
  60. "enable_deferred_revenue": 0,
  61. "inspection_required_before_delivery": 0,
  62. "is_sales_item": 1,
  63. "is_sub_contracted_item": 0,
  64. "shelf_life_in_days": 0,
  65. "allow_transfer_for_manufacture": 1,
  66. "tolerance": 0,
  67. "customer_code": "",
  68. "is_stock_item": 1,
  69. "idx": 0,
  70. "variant_based_on": "Item Attribute",
  71. "min_order_qty": 0,
  72. "length": 0,
  73. "valuation_rate": 10000,
  74. "attributes": [
  75. {
  76. "modified_by": "rm@pts.sc",
  77. "name": "7707e34515",
  78. "parent": "RM-001",
  79. "numeric_values": 0,
  80. "attribute": "Colour",
  81. "creation": "2019-03-14 16:37:44.597566",
  82. "modified": "2019-03-14 16:37:44.597566",
  83. "to_range": 0,
  84. "idx": 1,
  85. "parenttype": "Item",
  86. "increment": 0,
  87. "attribute_value": "Blue",
  88. "owner": "rm@pts.sc",
  89. "docstatus": 0,
  90. "doctype": "Item Variant Attribute",
  91. "from_range": 0,
  92. "parentfield": "attributes"
  93. },
  94. {
  95. "modified_by": "rm@pts.sc",
  96. "name": "80473fc904",
  97. "parent": "RM-001",
  98. "numeric_values": 0,
  99. "attribute": "Size",
  100. "creation": "2019-03-14 16:37:44.597566",
  101. "modified": "2019-03-14 16:37:44.597566",
  102. "to_range": 0,
  103. "idx": 2,
  104. "parenttype": "Item",
  105. "increment": 0,
  106. "attribute_value": "M",
  107. "owner": "rm@pts.sc",
  108. "docstatus": 0,
  109. "doctype": "Item Variant Attribute",
  110. "from_range": 0,
  111. "parentfield": "attributes"
  112. },
  113. {
  114. "modified_by": "rm@pts.sc",
  115. "name": "b264787d4b",
  116. "parent": "RM-001",
  117. "numeric_values": 0,
  118. "attribute": "Variant",
  119. "creation": "2019-03-14 16:37:44.597566",
  120. "modified": "2019-03-14 16:37:44.597566",
  121. "to_range": 0,
  122. "idx": 3,
  123. "parenttype": "Item",
  124. "increment": 0,
  125. "attribute_value": "Blue",
  126. "owner": "rm@pts.sc",
  127. "docstatus": 0,
  128. "doctype": "Item Variant Attribute",
  129. "from_range": 0,
  130. "parentfield": "attributes"
  131. },
  132. {
  133. "modified_by": "rm@pts.sc",
  134. "name": "bc59ae9bfe",
  135. "parent": "RM-001",
  136. "numeric_values": 0,
  137. "attribute": "Sole",
  138. "creation": "2019-03-14 16:37:44.597566",
  139. "modified": "2019-03-14 16:37:44.597566",
  140. "to_range": 0,
  141. "idx": 4,
  142. "parenttype": "Item",
  143. "increment": 0,
  144. "attribute_value": "Blue",
  145. "owner": "rm@pts.sc",
  146. "docstatus": 0,
  147. "doctype": "Item Variant Attribute",
  148. "from_range": 0,
  149. "parentfield": "attributes"
  150. }
  151. ],
  152. "height": 0,
  153. "owner": "rm@pts.sc",
  154. "is_customer_provided_item": 0,
  155. "customer_items": [],
  156. "barcodes": [],
  157. "item_level": "Regular",
  158. "width": 0,
  159. "item_defaults": [
  160. {
  161. "modified_by": "rm@pts.sc",
  162. "name": "25bcee9132",
  163. "parent": "RM-001",
  164. "company": "Ria Miranda",
  165. "creation": "2019-03-12 19:52:34.861518",
  166. "modified": "2019-03-14 16:37:44.597566",
  167. "idx": 1,
  168. "parenttype": "Item",
  169. "doctype": "Item Default",
  170. "owner": "dipta@pts.sc",
  171. "docstatus": 0,
  172. "default_warehouse": "Stores - RM",
  173. "parentfield": "item_defaults"
  174. }
  175. ],
  176. "product_group": "Hijab Jarik Collection",
  177. "is_item_from_hub": 0,
  178. "valuation_method": "",
  179. "brand": "Ria Miranda",
  180. "item_code": "RM-001",
  181. "retain_sample": 0,
  182. "show_in_website": 0,
  183. "safety_stock": 0,
  184. "modified": "2019-03-14 16:37:44.597566",
  185. "delivered_by_supplier": 0,
  186. "uoms": [
  187. {
  188. "modified_by": "rm@pts.sc",
  189. "name": "98dfcc3002",
  190. "parent": "RM-001",
  191. "creation": "2019-03-14 16:37:44.670285",
  192. "modified": "2019-03-14 16:37:44.670285",
  193. "doctype": "UOM Conversion Detail",
  194. "idx": 1,
  195. "parenttype": "Item",
  196. "conversion_factor": 1,
  197. "docstatus": 0,
  198. "uom": "Unit",
  199. "parentfield": "uoms"
  200. }
  201. ],
  202. "last_purchase_rate": 0,
  203. "naming_series": "ITEM-",
  204. "publish_in_hub": 0,
  205. "allow_alternative_item": 0,
  206. "no_of_months": 0,
  207. "end_of_life": "2099-12-31",
  208. "synced_with_hub": 0,
  209. "stock_uom": "Unit",
  210. "show_variant_in_website": 0,
  211. "docstatus": 0,
  212. "sample_quantity": 0,
  213. "description": "Hijab Blue M Blue Blue",
  214. "weightage": 0,
  215. "no_of_months_exp": 0,
  216. "total_projected_qty": 0,
  217. "lead_time_days": 0,
  218. "opening_stock": 0,
  219. "has_batch_no": 0,
  220. "has_serial_no": 0,
  221. "standard_rate": 9000,
  222. "is_fixed_asset": 0,
  223. "inspection_required_before_purchase": 0
  224. }
  225. }
  226. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement