@ultracart/bq-skill 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +952 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +42 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commands/alarm.d.ts +3 -0
  8. package/dist/commands/alarm.d.ts.map +1 -0
  9. package/dist/commands/alarm.js +146 -0
  10. package/dist/commands/alarm.js.map +1 -0
  11. package/dist/commands/config.d.ts +3 -0
  12. package/dist/commands/config.d.ts.map +1 -0
  13. package/dist/commands/config.js +749 -0
  14. package/dist/commands/config.js.map +1 -0
  15. package/dist/commands/deck.d.ts +3 -0
  16. package/dist/commands/deck.d.ts.map +1 -0
  17. package/dist/commands/deck.js +567 -0
  18. package/dist/commands/deck.js.map +1 -0
  19. package/dist/commands/dry-run.d.ts +3 -0
  20. package/dist/commands/dry-run.d.ts.map +1 -0
  21. package/dist/commands/dry-run.js +105 -0
  22. package/dist/commands/dry-run.js.map +1 -0
  23. package/dist/commands/history.d.ts +3 -0
  24. package/dist/commands/history.d.ts.map +1 -0
  25. package/dist/commands/history.js +127 -0
  26. package/dist/commands/history.js.map +1 -0
  27. package/dist/commands/init.d.ts +3 -0
  28. package/dist/commands/init.d.ts.map +1 -0
  29. package/dist/commands/init.js +302 -0
  30. package/dist/commands/init.js.map +1 -0
  31. package/dist/commands/install-skill.d.ts +3 -0
  32. package/dist/commands/install-skill.d.ts.map +1 -0
  33. package/dist/commands/install-skill.js +132 -0
  34. package/dist/commands/install-skill.js.map +1 -0
  35. package/dist/commands/list.d.ts +3 -0
  36. package/dist/commands/list.d.ts.map +1 -0
  37. package/dist/commands/list.js +89 -0
  38. package/dist/commands/list.js.map +1 -0
  39. package/dist/commands/query.d.ts +3 -0
  40. package/dist/commands/query.d.ts.map +1 -0
  41. package/dist/commands/query.js +152 -0
  42. package/dist/commands/query.js.map +1 -0
  43. package/dist/commands/render.d.ts +3 -0
  44. package/dist/commands/render.d.ts.map +1 -0
  45. package/dist/commands/render.js +107 -0
  46. package/dist/commands/render.js.map +1 -0
  47. package/dist/commands/run-all.d.ts +3 -0
  48. package/dist/commands/run-all.d.ts.map +1 -0
  49. package/dist/commands/run-all.js +285 -0
  50. package/dist/commands/run-all.js.map +1 -0
  51. package/dist/commands/run.d.ts +3 -0
  52. package/dist/commands/run.d.ts.map +1 -0
  53. package/dist/commands/run.js +321 -0
  54. package/dist/commands/run.js.map +1 -0
  55. package/dist/commands/schema.d.ts +3 -0
  56. package/dist/commands/schema.d.ts.map +1 -0
  57. package/dist/commands/schema.js +271 -0
  58. package/dist/commands/schema.js.map +1 -0
  59. package/dist/commands/validate.d.ts +3 -0
  60. package/dist/commands/validate.d.ts.map +1 -0
  61. package/dist/commands/validate.js +109 -0
  62. package/dist/commands/validate.js.map +1 -0
  63. package/dist/lib/alarm-notify.d.ts +16 -0
  64. package/dist/lib/alarm-notify.d.ts.map +1 -0
  65. package/dist/lib/alarm-notify.js +312 -0
  66. package/dist/lib/alarm-notify.js.map +1 -0
  67. package/dist/lib/alarm-state.d.ts +26 -0
  68. package/dist/lib/alarm-state.d.ts.map +1 -0
  69. package/dist/lib/alarm-state.js +118 -0
  70. package/dist/lib/alarm-state.js.map +1 -0
  71. package/dist/lib/alarm.d.ts +28 -0
  72. package/dist/lib/alarm.d.ts.map +1 -0
  73. package/dist/lib/alarm.js +215 -0
  74. package/dist/lib/alarm.js.map +1 -0
  75. package/dist/lib/analysis.d.ts +16 -0
  76. package/dist/lib/analysis.d.ts.map +1 -0
  77. package/dist/lib/analysis.js +134 -0
  78. package/dist/lib/analysis.js.map +1 -0
  79. package/dist/lib/bigquery.d.ts +55 -0
  80. package/dist/lib/bigquery.d.ts.map +1 -0
  81. package/dist/lib/bigquery.js +321 -0
  82. package/dist/lib/bigquery.js.map +1 -0
  83. package/dist/lib/config-writer.d.ts +3 -0
  84. package/dist/lib/config-writer.d.ts.map +1 -0
  85. package/dist/lib/config-writer.js +60 -0
  86. package/dist/lib/config-writer.js.map +1 -0
  87. package/dist/lib/config.d.ts +63 -0
  88. package/dist/lib/config.d.ts.map +1 -0
  89. package/dist/lib/config.js +151 -0
  90. package/dist/lib/config.js.map +1 -0
  91. package/dist/lib/dashboard.d.ts +3 -0
  92. package/dist/lib/dashboard.d.ts.map +1 -0
  93. package/dist/lib/dashboard.js +468 -0
  94. package/dist/lib/dashboard.js.map +1 -0
  95. package/dist/lib/deck.d.ts +58 -0
  96. package/dist/lib/deck.d.ts.map +1 -0
  97. package/dist/lib/deck.js +232 -0
  98. package/dist/lib/deck.js.map +1 -0
  99. package/dist/lib/deliver-email.d.ts +14 -0
  100. package/dist/lib/deliver-email.d.ts.map +1 -0
  101. package/dist/lib/deliver-email.js +360 -0
  102. package/dist/lib/deliver-email.js.map +1 -0
  103. package/dist/lib/deliver-slack.d.ts +6 -0
  104. package/dist/lib/deliver-slack.d.ts.map +1 -0
  105. package/dist/lib/deliver-slack.js +73 -0
  106. package/dist/lib/deliver-slack.js.map +1 -0
  107. package/dist/lib/deliver.d.ts +10 -0
  108. package/dist/lib/deliver.d.ts.map +1 -0
  109. package/dist/lib/deliver.js +95 -0
  110. package/dist/lib/deliver.js.map +1 -0
  111. package/dist/lib/llm/anthropic.d.ts +7 -0
  112. package/dist/lib/llm/anthropic.d.ts.map +1 -0
  113. package/dist/lib/llm/anthropic.js +69 -0
  114. package/dist/lib/llm/anthropic.js.map +1 -0
  115. package/dist/lib/llm/bedrock.d.ts +7 -0
  116. package/dist/lib/llm/bedrock.d.ts.map +1 -0
  117. package/dist/lib/llm/bedrock.js +67 -0
  118. package/dist/lib/llm/bedrock.js.map +1 -0
  119. package/dist/lib/llm/gemini.d.ts +7 -0
  120. package/dist/lib/llm/gemini.d.ts.map +1 -0
  121. package/dist/lib/llm/gemini.js +67 -0
  122. package/dist/lib/llm/gemini.js.map +1 -0
  123. package/dist/lib/llm/index.d.ts +5 -0
  124. package/dist/lib/llm/index.d.ts.map +1 -0
  125. package/dist/lib/llm/index.js +61 -0
  126. package/dist/lib/llm/index.js.map +1 -0
  127. package/dist/lib/llm/models.d.ts +5 -0
  128. package/dist/lib/llm/models.d.ts.map +1 -0
  129. package/dist/lib/llm/models.js +33 -0
  130. package/dist/lib/llm/models.js.map +1 -0
  131. package/dist/lib/llm/openai.d.ts +8 -0
  132. package/dist/lib/llm/openai.d.ts.map +1 -0
  133. package/dist/lib/llm/openai.js +48 -0
  134. package/dist/lib/llm/openai.js.map +1 -0
  135. package/dist/lib/llm/provider.d.ts +28 -0
  136. package/dist/lib/llm/provider.d.ts.map +1 -0
  137. package/dist/lib/llm/provider.js +3 -0
  138. package/dist/lib/llm/provider.js.map +1 -0
  139. package/dist/lib/manifest.d.ts +95 -0
  140. package/dist/lib/manifest.d.ts.map +1 -0
  141. package/dist/lib/manifest.js +105 -0
  142. package/dist/lib/manifest.js.map +1 -0
  143. package/dist/lib/params.d.ts +27 -0
  144. package/dist/lib/params.d.ts.map +1 -0
  145. package/dist/lib/params.js +192 -0
  146. package/dist/lib/params.js.map +1 -0
  147. package/dist/lib/pdf.d.ts +8 -0
  148. package/dist/lib/pdf.d.ts.map +1 -0
  149. package/dist/lib/pdf.js +86 -0
  150. package/dist/lib/pdf.js.map +1 -0
  151. package/dist/lib/renderer.d.ts +17 -0
  152. package/dist/lib/renderer.d.ts.map +1 -0
  153. package/dist/lib/renderer.js +166 -0
  154. package/dist/lib/renderer.js.map +1 -0
  155. package/dist/lib/schema-filter.d.ts +3 -0
  156. package/dist/lib/schema-filter.d.ts.map +1 -0
  157. package/dist/lib/schema-filter.js +49 -0
  158. package/dist/lib/schema-filter.js.map +1 -0
  159. package/dist/lib/template.d.ts +4 -0
  160. package/dist/lib/template.d.ts.map +1 -0
  161. package/dist/lib/template.js +37 -0
  162. package/dist/lib/template.js.map +1 -0
  163. package/dist/lib/validator.d.ts +8 -0
  164. package/dist/lib/validator.d.ts.map +1 -0
  165. package/dist/lib/validator.js +88 -0
  166. package/dist/lib/validator.js.map +1 -0
  167. package/package.json +59 -0
  168. package/schemas/deck.schema.json +122 -0
  169. package/schemas/report-manifest.schema.json +309 -0
  170. package/schemas/tables/README.md +45 -0
  171. package/schemas/tables/ultracart_dw/uc_affiliate_clicks.json +186 -0
  172. package/schemas/tables/ultracart_dw/uc_affiliate_commission_groups.json +317 -0
  173. package/schemas/tables/ultracart_dw/uc_affiliate_ledgers.json +404 -0
  174. package/schemas/tables/ultracart_dw/uc_affiliate_network_pixel_postback_logs.json +166 -0
  175. package/schemas/tables/ultracart_dw/uc_affiliate_network_pixels.json +106 -0
  176. package/schemas/tables/ultracart_dw/uc_affiliate_payments.json +204 -0
  177. package/schemas/tables/ultracart_dw/uc_affiliate_postback_logs.json +90 -0
  178. package/schemas/tables/ultracart_dw/uc_affiliates.json +425 -0
  179. package/schemas/tables/ultracart_dw/uc_auto_orders.json +13848 -0
  180. package/schemas/tables/ultracart_dw/uc_cart_abandons.json +3971 -0
  181. package/schemas/tables/ultracart_dw/uc_conversation_pbx_calls.json +374 -0
  182. package/schemas/tables/ultracart_dw/uc_conversations.json +374 -0
  183. package/schemas/tables/ultracart_dw/uc_coupons.json +1893 -0
  184. package/schemas/tables/ultracart_dw/uc_customers.json +11886 -0
  185. package/schemas/tables/ultracart_dw/uc_fraud_rules.json +239 -0
  186. package/schemas/tables/ultracart_dw/uc_gift_certificates.json +135 -0
  187. package/schemas/tables/ultracart_dw/uc_item_inventory_history.json +79 -0
  188. package/schemas/tables/ultracart_dw/uc_items.json +4437 -0
  189. package/schemas/tables/ultracart_dw/uc_orders.json +6629 -0
  190. package/schemas/tables/ultracart_dw/uc_rotating_transaction_gateway_history.json +271 -0
  191. package/schemas/tables/ultracart_dw/uc_rotating_transaction_gateways.json +416 -0
  192. package/schemas/tables/ultracart_dw/uc_shipping_methods.json +1372 -0
  193. package/schemas/tables/ultracart_dw/uc_storefront_customers.json +261 -0
  194. package/schemas/tables/ultracart_dw/uc_storefront_experiments.json +386 -0
  195. package/schemas/tables/ultracart_dw/uc_storefront_pages.json +513 -0
  196. package/schemas/tables/ultracart_dw/uc_storefront_upsell_offer_events.json +338 -0
  197. package/schemas/tables/ultracart_dw/uc_storefront_upsell_offers.json +431 -0
  198. package/schemas/tables/ultracart_dw/uc_storefront_upsell_paths.json +163 -0
  199. package/schemas/tables/ultracart_dw/uc_storefronts.json +62 -0
  200. package/schemas/tables/ultracart_dw/uc_surveys.json +238 -0
  201. package/schemas/tables/ultracart_dw/uc_workflow_tasks.json +377 -0
  202. package/schemas/tables/ultracart_dw/uc_zoho_desk_tickets.json +1184 -0
  203. package/schemas/tables/ultracart_dw_high/uc_affiliate_clicks.json +186 -0
  204. package/schemas/tables/ultracart_dw_high/uc_affiliate_commission_groups.json +317 -0
  205. package/schemas/tables/ultracart_dw_high/uc_affiliate_ledgers.json +404 -0
  206. package/schemas/tables/ultracart_dw_high/uc_affiliate_network_pixel_postback_logs.json +166 -0
  207. package/schemas/tables/ultracart_dw_high/uc_affiliate_network_pixels.json +106 -0
  208. package/schemas/tables/ultracart_dw_high/uc_affiliate_payments.json +204 -0
  209. package/schemas/tables/ultracart_dw_high/uc_affiliate_postback_logs.json +90 -0
  210. package/schemas/tables/ultracart_dw_high/uc_affiliates.json +425 -0
  211. package/schemas/tables/ultracart_dw_high/uc_auto_orders.json +14332 -0
  212. package/schemas/tables/ultracart_dw_high/uc_cart_abandons.json +4245 -0
  213. package/schemas/tables/ultracart_dw_high/uc_conversation_pbx_calls.json +415 -0
  214. package/schemas/tables/ultracart_dw_high/uc_conversations.json +415 -0
  215. package/schemas/tables/ultracart_dw_high/uc_coupons.json +1893 -0
  216. package/schemas/tables/ultracart_dw_high/uc_customers.json +12250 -0
  217. package/schemas/tables/ultracart_dw_high/uc_fraud_rules.json +239 -0
  218. package/schemas/tables/ultracart_dw_high/uc_gift_certificates.json +135 -0
  219. package/schemas/tables/ultracart_dw_high/uc_item_inventory_history.json +79 -0
  220. package/schemas/tables/ultracart_dw_high/uc_items.json +4437 -0
  221. package/schemas/tables/ultracart_dw_high/uc_orders.json +6871 -0
  222. package/schemas/tables/ultracart_dw_high/uc_rotating_transaction_gateway_history.json +271 -0
  223. package/schemas/tables/ultracart_dw_high/uc_rotating_transaction_gateways.json +416 -0
  224. package/schemas/tables/ultracart_dw_high/uc_shipping_methods.json +1372 -0
  225. package/schemas/tables/ultracart_dw_high/uc_storefront_customers.json +261 -0
  226. package/schemas/tables/ultracart_dw_high/uc_storefront_experiments.json +386 -0
  227. package/schemas/tables/ultracart_dw_high/uc_storefront_pages.json +513 -0
  228. package/schemas/tables/ultracart_dw_high/uc_storefront_upsell_offer_events.json +338 -0
  229. package/schemas/tables/ultracart_dw_high/uc_storefront_upsell_offers.json +431 -0
  230. package/schemas/tables/ultracart_dw_high/uc_storefront_upsell_paths.json +163 -0
  231. package/schemas/tables/ultracart_dw_high/uc_storefronts.json +62 -0
  232. package/schemas/tables/ultracart_dw_high/uc_surveys.json +269 -0
  233. package/schemas/tables/ultracart_dw_high/uc_workflow_tasks.json +377 -0
  234. package/schemas/tables/ultracart_dw_high/uc_zoho_desk_tickets.json +1330 -0
  235. package/schemas/tables/ultracart_dw_low/uc_affiliate_clicks.json +186 -0
  236. package/schemas/tables/ultracart_dw_low/uc_affiliate_commission_groups.json +317 -0
  237. package/schemas/tables/ultracart_dw_low/uc_affiliate_ledgers.json +404 -0
  238. package/schemas/tables/ultracart_dw_low/uc_affiliate_network_pixel_postback_logs.json +166 -0
  239. package/schemas/tables/ultracart_dw_low/uc_affiliate_network_pixels.json +106 -0
  240. package/schemas/tables/ultracart_dw_low/uc_affiliate_payments.json +204 -0
  241. package/schemas/tables/ultracart_dw_low/uc_affiliate_postback_logs.json +90 -0
  242. package/schemas/tables/ultracart_dw_low/uc_affiliates.json +425 -0
  243. package/schemas/tables/ultracart_dw_low/uc_auto_orders.json +13868 -0
  244. package/schemas/tables/ultracart_dw_low/uc_cart_abandons.json +3971 -0
  245. package/schemas/tables/ultracart_dw_low/uc_conversation_pbx_calls.json +374 -0
  246. package/schemas/tables/ultracart_dw_low/uc_conversations.json +374 -0
  247. package/schemas/tables/ultracart_dw_low/uc_coupons.json +1893 -0
  248. package/schemas/tables/ultracart_dw_low/uc_customers.json +11900 -0
  249. package/schemas/tables/ultracart_dw_low/uc_fraud_rules.json +239 -0
  250. package/schemas/tables/ultracart_dw_low/uc_gift_certificates.json +135 -0
  251. package/schemas/tables/ultracart_dw_low/uc_item_inventory_history.json +79 -0
  252. package/schemas/tables/ultracart_dw_low/uc_items.json +4437 -0
  253. package/schemas/tables/ultracart_dw_low/uc_orders.json +6639 -0
  254. package/schemas/tables/ultracart_dw_low/uc_rotating_transaction_gateway_history.json +271 -0
  255. package/schemas/tables/ultracart_dw_low/uc_rotating_transaction_gateways.json +416 -0
  256. package/schemas/tables/ultracart_dw_low/uc_shipping_methods.json +1372 -0
  257. package/schemas/tables/ultracart_dw_low/uc_storefront_customers.json +261 -0
  258. package/schemas/tables/ultracart_dw_low/uc_storefront_experiments.json +386 -0
  259. package/schemas/tables/ultracart_dw_low/uc_storefront_pages.json +513 -0
  260. package/schemas/tables/ultracart_dw_low/uc_storefront_upsell_offer_events.json +338 -0
  261. package/schemas/tables/ultracart_dw_low/uc_storefront_upsell_offers.json +431 -0
  262. package/schemas/tables/ultracart_dw_low/uc_storefront_upsell_paths.json +163 -0
  263. package/schemas/tables/ultracart_dw_low/uc_storefronts.json +62 -0
  264. package/schemas/tables/ultracart_dw_low/uc_surveys.json +238 -0
  265. package/schemas/tables/ultracart_dw_low/uc_workflow_tasks.json +377 -0
  266. package/schemas/tables/ultracart_dw_low/uc_zoho_desk_tickets.json +1184 -0
  267. package/schemas/tables/ultracart_dw_medium/uc_affiliate_clicks.json +186 -0
  268. package/schemas/tables/ultracart_dw_medium/uc_affiliate_commission_groups.json +317 -0
  269. package/schemas/tables/ultracart_dw_medium/uc_affiliate_ledgers.json +404 -0
  270. package/schemas/tables/ultracart_dw_medium/uc_affiliate_network_pixel_postback_logs.json +166 -0
  271. package/schemas/tables/ultracart_dw_medium/uc_affiliate_network_pixels.json +106 -0
  272. package/schemas/tables/ultracart_dw_medium/uc_affiliate_payments.json +204 -0
  273. package/schemas/tables/ultracart_dw_medium/uc_affiliate_postback_logs.json +90 -0
  274. package/schemas/tables/ultracart_dw_medium/uc_affiliates.json +425 -0
  275. package/schemas/tables/ultracart_dw_medium/uc_auto_orders.json +14320 -0
  276. package/schemas/tables/ultracart_dw_medium/uc_cart_abandons.json +4245 -0
  277. package/schemas/tables/ultracart_dw_medium/uc_conversation_pbx_calls.json +415 -0
  278. package/schemas/tables/ultracart_dw_medium/uc_conversations.json +415 -0
  279. package/schemas/tables/ultracart_dw_medium/uc_coupons.json +1893 -0
  280. package/schemas/tables/ultracart_dw_medium/uc_customers.json +12250 -0
  281. package/schemas/tables/ultracart_dw_medium/uc_fraud_rules.json +239 -0
  282. package/schemas/tables/ultracart_dw_medium/uc_gift_certificates.json +135 -0
  283. package/schemas/tables/ultracart_dw_medium/uc_item_inventory_history.json +79 -0
  284. package/schemas/tables/ultracart_dw_medium/uc_items.json +4437 -0
  285. package/schemas/tables/ultracart_dw_medium/uc_orders.json +6865 -0
  286. package/schemas/tables/ultracart_dw_medium/uc_rotating_transaction_gateway_history.json +271 -0
  287. package/schemas/tables/ultracart_dw_medium/uc_rotating_transaction_gateways.json +416 -0
  288. package/schemas/tables/ultracart_dw_medium/uc_shipping_methods.json +1372 -0
  289. package/schemas/tables/ultracart_dw_medium/uc_storefront_customers.json +261 -0
  290. package/schemas/tables/ultracart_dw_medium/uc_storefront_experiments.json +386 -0
  291. package/schemas/tables/ultracart_dw_medium/uc_storefront_pages.json +513 -0
  292. package/schemas/tables/ultracart_dw_medium/uc_storefront_upsell_offer_events.json +338 -0
  293. package/schemas/tables/ultracart_dw_medium/uc_storefront_upsell_offers.json +431 -0
  294. package/schemas/tables/ultracart_dw_medium/uc_storefront_upsell_paths.json +163 -0
  295. package/schemas/tables/ultracart_dw_medium/uc_storefronts.json +62 -0
  296. package/schemas/tables/ultracart_dw_medium/uc_surveys.json +269 -0
  297. package/schemas/tables/ultracart_dw_medium/uc_workflow_tasks.json +377 -0
  298. package/schemas/tables/ultracart_dw_medium/uc_zoho_desk_tickets.json +1330 -0
  299. package/schemas/tables/ultracart_dw_streaming/uc_analytics_session_streaming.json +2444 -0
  300. package/schemas/tables/ultracart_dw_streaming/uc_screen_recording_streaming.json +509 -0
  301. package/schemas/ultracart-bq-config.schema.json +140 -0
  302. package/skill/skill.md +1228 -0
  303. package/templates/render.html +73 -0
@@ -0,0 +1,1893 @@
1
+ [
2
+ {
3
+ "mode": "NULLABLE",
4
+ "name": "partition_oid",
5
+ "type": "INTEGER"
6
+ },
7
+ {
8
+ "mode": "NULLABLE",
9
+ "name": "coupon_oid",
10
+ "description": "Coupon oid.",
11
+ "type": "INTEGER"
12
+ },
13
+ {
14
+ "mode": "NULLABLE",
15
+ "name": "coupon_type",
16
+ "description": "Coupon type.",
17
+ "type": "STRING"
18
+ },
19
+ {
20
+ "mode": "NULLABLE",
21
+ "name": "merchant_code",
22
+ "description": "Merchant code of coupon up to 20 characters.",
23
+ "type": "STRING"
24
+ },
25
+ {
26
+ "mode": "NULLABLE",
27
+ "name": "start_dts",
28
+ "description": "Date/time when coupon is valid",
29
+ "type": "DATETIME"
30
+ },
31
+ {
32
+ "mode": "NULLABLE",
33
+ "name": "expiration_dts",
34
+ "description": "Date/time when coupon expires",
35
+ "type": "DATETIME"
36
+ },
37
+ {
38
+ "mode": "NULLABLE",
39
+ "name": "description",
40
+ "description": "Description of the coupon up to 50 characters.",
41
+ "type": "STRING"
42
+ },
43
+ {
44
+ "mode": "NULLABLE",
45
+ "name": "merchant_notes",
46
+ "description": "Internal notes about this coupon. These are not visible to customer.",
47
+ "type": "STRING"
48
+ },
49
+ {
50
+ "mode": "NULLABLE",
51
+ "name": "calculated_description",
52
+ "description": "Calculated description displayed to the customer if no description is specified.",
53
+ "type": "STRING"
54
+ },
55
+ {
56
+ "allowed_values": [
57
+ "Anyone",
58
+ "UniqueCode",
59
+ "OncePerCustomer",
60
+ "OncePerNewCustomer",
61
+ "OncePerNewCustomerForItem"
62
+ ],
63
+ "mode": "NULLABLE",
64
+ "name": "usable_by",
65
+ "description": "Who may use this coupon.",
66
+ "type": "STRING"
67
+ },
68
+ {
69
+ "mode": "NULLABLE",
70
+ "name": "can_be_used_with_other_coupons",
71
+ "description": "True if this coupon can be used with other coupons in a single order.",
72
+ "type": "BOOLEAN"
73
+ },
74
+ {
75
+ "mode": "NULLABLE",
76
+ "name": "allow_multiple_one_time_codes",
77
+ "description": "True if multiple one time codes for this coupon can be used on a cart at the same time.",
78
+ "type": "BOOLEAN"
79
+ },
80
+ {
81
+ "mode": "NULLABLE",
82
+ "name": "super_coupon",
83
+ "description": "If true, this coupon can be used with ANY other coupon regardless of the other coupons configuration",
84
+ "type": "BOOLEAN"
85
+ },
86
+ {
87
+ "mode": "NULLABLE",
88
+ "name": "quickbooks_code",
89
+ "description": "Quickbooks accounting code.",
90
+ "type": "STRING"
91
+ },
92
+ {
93
+ "mode": "NULLABLE",
94
+ "name": "affiliate_oid",
95
+ "description": "Associates an order with an affiliate when this value is set.",
96
+ "type": "INTEGER"
97
+ },
98
+ {
99
+ "mode": "REPEATED",
100
+ "name": "restrict_by_postal_codes",
101
+ "description": "Optional list of postal codes which restrict a coupon to within these postal codes.",
102
+ "type": "RECORD",
103
+ "fields": [{
104
+ "mode": "NULLABLE",
105
+ "name": "value",
106
+ "type": "STRING"
107
+ }]
108
+ },
109
+ {
110
+ "mode": "REPEATED",
111
+ "name": "restrict_by_screen_branding_theme_codes",
112
+ "description": "Optional list of legacy screen branding theme codes to limit coupon use to only those themes.",
113
+ "type": "RECORD",
114
+ "fields": [
115
+ {
116
+ "mode": "NULLABLE",
117
+ "name": "name",
118
+ "type": "STRING"
119
+ },
120
+ {
121
+ "mode": "NULLABLE",
122
+ "name": "invalidForThis",
123
+ "type": "BOOLEAN"
124
+ },
125
+ {
126
+ "mode": "NULLABLE",
127
+ "name": "validForThis",
128
+ "type": "BOOLEAN"
129
+ },
130
+ {
131
+ "mode": "NULLABLE",
132
+ "name": "validOnlyForThis",
133
+ "type": "BOOLEAN"
134
+ }
135
+ ]
136
+ },
137
+ {
138
+ "mode": "REPEATED",
139
+ "name": "restrict_by_storefronts",
140
+ "description": "Optional list of storefronts to limit coupon use to only those storefronts.",
141
+ "type": "RECORD",
142
+ "fields": [
143
+ {
144
+ "mode": "NULLABLE",
145
+ "name": "name",
146
+ "type": "STRING"
147
+ },
148
+ {
149
+ "mode": "NULLABLE",
150
+ "name": "invalidForThis",
151
+ "type": "BOOLEAN"
152
+ },
153
+ {
154
+ "mode": "NULLABLE",
155
+ "name": "validForThis",
156
+ "type": "BOOLEAN"
157
+ },
158
+ {
159
+ "mode": "NULLABLE",
160
+ "name": "validOnlyForThis",
161
+ "type": "BOOLEAN"
162
+ }
163
+ ]
164
+ },
165
+ {
166
+ "name": "amount_off_subtotal",
167
+ "description": "Amount off subtotal",
168
+ "type": "RECORD",
169
+ "fields": [
170
+ {
171
+ "mode": "NULLABLE",
172
+ "name": "discount_amount",
173
+ "description": "The amount of subtotal discount",
174
+ "type": "NUMERIC"
175
+ },
176
+ {
177
+ "mode": "NULLABLE",
178
+ "name": "currency_code",
179
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
180
+ "type": "STRING"
181
+ }
182
+ ]
183
+ },
184
+ {
185
+ "name": "amount_off_shipping_with_items_purchase",
186
+ "description": "Amount off shipping with items purchase",
187
+ "type": "RECORD",
188
+ "fields": [
189
+ {
190
+ "mode": "NULLABLE",
191
+ "name": "discount_amount",
192
+ "description": "The amount of shipping discount",
193
+ "type": "NUMERIC"
194
+ },
195
+ {
196
+ "mode": "NULLABLE",
197
+ "name": "currency_code",
198
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
199
+ "type": "STRING"
200
+ },
201
+ {
202
+ "mode": "REPEATED",
203
+ "name": "shipping_methods",
204
+ "description": "One or more shipping methods that may receive this discount",
205
+ "type": "RECORD",
206
+ "fields": [{
207
+ "mode": "NULLABLE",
208
+ "name": "value",
209
+ "type": "STRING"
210
+ }]
211
+ },
212
+ {
213
+ "mode": "REPEATED",
214
+ "name": "items",
215
+ "description": "A list of items of which at least one must be purchased for coupon to be valid.",
216
+ "type": "RECORD",
217
+ "fields": [{
218
+ "mode": "NULLABLE",
219
+ "name": "value",
220
+ "type": "STRING"
221
+ }]
222
+ }
223
+ ]
224
+ },
225
+ {
226
+ "name": "free_items_with_item_purchase",
227
+ "description": "Free items with item purchase",
228
+ "type": "RECORD",
229
+ "fields": [
230
+ {
231
+ "mode": "NULLABLE",
232
+ "name": "free_quantity",
233
+ "description": "The quantity of free item that will be received.",
234
+ "type": "INTEGER"
235
+ },
236
+ {
237
+ "mode": "NULLABLE",
238
+ "name": "free_item",
239
+ "description": "The item id of the free item that will be received when the required mix and match group quantity is purchased.",
240
+ "type": "STRING"
241
+ },
242
+ {
243
+ "mode": "NULLABLE",
244
+ "name": "required_purchase_quantity",
245
+ "description": "Required quantity of mix and match group items that must be purchased for coupon to be valid",
246
+ "type": "INTEGER"
247
+ },
248
+ {
249
+ "mode": "NULLABLE",
250
+ "name": "required_purchase_item",
251
+ "description": "Required item that must be purchased for coupon to be valid",
252
+ "type": "STRING"
253
+ },
254
+ {
255
+ "mode": "NULLABLE",
256
+ "name": "limit",
257
+ "description": "The limit of free items that may be received when purchasing multiple items",
258
+ "type": "INTEGER"
259
+ }
260
+ ]
261
+ },
262
+ {
263
+ "name": "free_items_with_mixmatch_purchase",
264
+ "description": "Free items with Mix and Match purchase",
265
+ "type": "RECORD",
266
+ "fields": [
267
+ {
268
+ "mode": "NULLABLE",
269
+ "name": "free_quantity",
270
+ "description": "The quantity of free item that will be received.",
271
+ "type": "INTEGER"
272
+ },
273
+ {
274
+ "mode": "NULLABLE",
275
+ "name": "free_item",
276
+ "description": "The item id of the free item that will be received when the required mix and match group quantity is purchased.",
277
+ "type": "STRING"
278
+ },
279
+ {
280
+ "mode": "NULLABLE",
281
+ "name": "required_purchase_quantity",
282
+ "description": "Required quantity of mix and match group items that must be purchased for coupon to be valid",
283
+ "type": "INTEGER"
284
+ },
285
+ {
286
+ "mode": "NULLABLE",
287
+ "name": "required_purchase_mix_and_match_group",
288
+ "description": "Required mix and match group that must be purchased for coupon to be valid",
289
+ "type": "STRING"
290
+ },
291
+ {
292
+ "mode": "NULLABLE",
293
+ "name": "limit",
294
+ "description": "The limit of free items that may be received when purchasing multiple mix and match group items",
295
+ "type": "INTEGER"
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ "name": "amount_off_subtotal_and_shipping",
301
+ "description": "Amount off subtotal and shipping",
302
+ "type": "RECORD",
303
+ "fields": [
304
+ {
305
+ "mode": "NULLABLE",
306
+ "name": "discount_amount",
307
+ "description": "The amount of subtotal discount",
308
+ "type": "NUMERIC"
309
+ },
310
+ {
311
+ "mode": "NULLABLE",
312
+ "name": "currency_code",
313
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
314
+ "type": "STRING"
315
+ }
316
+ ]
317
+ },
318
+ {
319
+ "name": "amount_off_subtotal_and_free_shipping",
320
+ "description": "Amount off subtotal and free shipping with purchase",
321
+ "type": "RECORD",
322
+ "fields": [
323
+ {
324
+ "mode": "NULLABLE",
325
+ "name": "discount_amount",
326
+ "description": "The amount of subtotal discount",
327
+ "type": "NUMERIC"
328
+ },
329
+ {
330
+ "mode": "NULLABLE",
331
+ "name": "currency_code",
332
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
333
+ "type": "STRING"
334
+ },
335
+ {
336
+ "mode": "REPEATED",
337
+ "name": "shipping_methods",
338
+ "description": "One or more shipping methods that may be free",
339
+ "type": "RECORD",
340
+ "fields": [{
341
+ "mode": "NULLABLE",
342
+ "name": "value",
343
+ "type": "STRING"
344
+ }]
345
+ },
346
+ {
347
+ "mode": "NULLABLE",
348
+ "name": "purchase_amount",
349
+ "description": "The purchase amount to qualify for subtotal discount and free shipping",
350
+ "type": "NUMERIC"
351
+ }
352
+ ]
353
+ },
354
+ {
355
+ "name": "amount_off_subtotal_with_purchase",
356
+ "description": "Amount off subtotal with purchase",
357
+ "type": "RECORD",
358
+ "fields": [
359
+ {
360
+ "mode": "NULLABLE",
361
+ "name": "discount_amount",
362
+ "description": "The amount of subtotal discount",
363
+ "type": "NUMERIC"
364
+ },
365
+ {
366
+ "mode": "NULLABLE",
367
+ "name": "currency_code",
368
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
369
+ "type": "STRING"
370
+ },
371
+ {
372
+ "mode": "NULLABLE",
373
+ "name": "purchase_amount",
374
+ "description": "The purchase amount to qualify for subtotal discount and free shipping",
375
+ "type": "NUMERIC"
376
+ }
377
+ ]
378
+ },
379
+ {
380
+ "name": "amount_off_subtotal_with_block_purchase",
381
+ "description": "Amount off subtotal with block purchase",
382
+ "type": "RECORD",
383
+ "fields": [
384
+ {
385
+ "mode": "NULLABLE",
386
+ "name": "discount_amount",
387
+ "description": "The amount of subtotal discount",
388
+ "type": "NUMERIC"
389
+ },
390
+ {
391
+ "mode": "NULLABLE",
392
+ "name": "currency_code",
393
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
394
+ "type": "STRING"
395
+ },
396
+ {
397
+ "mode": "NULLABLE",
398
+ "name": "required_purchase_quantity",
399
+ "description": "Discount amount is multiplied by the number of blocks. A block is this many quantity of the required item.",
400
+ "type": "INTEGER"
401
+ },
402
+ {
403
+ "mode": "NULLABLE",
404
+ "name": "required_purchase_item",
405
+ "description": "Required item that must be purchased for coupon to be valid",
406
+ "type": "STRING"
407
+ }
408
+ ]
409
+ },
410
+ {
411
+ "name": "percent_off_subtotal_with_subtotal",
412
+ "description": "Percent off subtotal with subtotal",
413
+ "type": "RECORD",
414
+ "fields": [
415
+ {
416
+ "mode": "NULLABLE",
417
+ "name": "discount_percent",
418
+ "description": "The percentage of subtotal discount",
419
+ "type": "NUMERIC"
420
+ },
421
+ {
422
+ "mode": "NULLABLE",
423
+ "name": "subtotal_amount",
424
+ "description": "The amount of subtotal required to receive the discount percent",
425
+ "type": "NUMERIC"
426
+ },
427
+ {
428
+ "mode": "NULLABLE",
429
+ "name": "currency_code",
430
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
431
+ "type": "STRING"
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "name": "percent_off_subtotal_with_items_purchase",
437
+ "description": "Percent off subtotal with items purchase",
438
+ "type": "RECORD",
439
+ "fields": [
440
+ {
441
+ "mode": "NULLABLE",
442
+ "name": "discount_percent",
443
+ "description": "The percentage of subtotal discount",
444
+ "type": "NUMERIC"
445
+ },
446
+ {
447
+ "mode": "REPEATED",
448
+ "name": "items",
449
+ "description": "A list of items of which at least one must be purchased for coupon to be valid.",
450
+ "type": "RECORD",
451
+ "fields": [{
452
+ "mode": "NULLABLE",
453
+ "name": "value",
454
+ "type": "STRING"
455
+ }]
456
+ }
457
+ ]
458
+ },
459
+ {
460
+ "name": "amount_off_subtotal_with_items_purchase",
461
+ "description": "Amount off subtotal with items purchase",
462
+ "type": "RECORD",
463
+ "fields": [
464
+ {
465
+ "mode": "NULLABLE",
466
+ "name": "discount_amount",
467
+ "description": "The amount of shipping discount",
468
+ "type": "NUMERIC"
469
+ },
470
+ {
471
+ "mode": "NULLABLE",
472
+ "name": "currency_code",
473
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
474
+ "type": "STRING"
475
+ },
476
+ {
477
+ "mode": "NULLABLE",
478
+ "name": "required_purchase_quantity",
479
+ "description": "The quantity of items that must be purchased for the discount to be applied.",
480
+ "type": "INTEGER"
481
+ },
482
+ {
483
+ "mode": "REPEATED",
484
+ "name": "items",
485
+ "description": "A list of items of which a quantity of one or many must be purchased for coupon to be valid.",
486
+ "type": "RECORD",
487
+ "fields": [{
488
+ "mode": "NULLABLE",
489
+ "name": "value",
490
+ "type": "STRING"
491
+ }]
492
+ }
493
+ ]
494
+ },
495
+ {
496
+ "name": "percent_off_subtotal",
497
+ "description": "Percent off subtotal",
498
+ "type": "RECORD",
499
+ "fields": [{
500
+ "mode": "NULLABLE",
501
+ "name": "discount_percent",
502
+ "description": "The percentage of subtotal discount",
503
+ "type": "NUMERIC"
504
+ }]
505
+ },
506
+ {
507
+ "name": "percent_off_subtotal_limit",
508
+ "description": "Percent off subtotal with limit",
509
+ "type": "RECORD",
510
+ "fields": [
511
+ {
512
+ "mode": "NULLABLE",
513
+ "name": "discount_percent",
514
+ "description": "The percentage of subtotal discount",
515
+ "type": "NUMERIC"
516
+ },
517
+ {
518
+ "mode": "NULLABLE",
519
+ "name": "limit",
520
+ "description": "The maximum amount of subtotal used to determine discount.",
521
+ "type": "NUMERIC"
522
+ },
523
+ {
524
+ "mode": "NULLABLE",
525
+ "name": "currency_code",
526
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
527
+ "type": "STRING"
528
+ }
529
+ ]
530
+ },
531
+ {
532
+ "name": "tiered_amount_off_subtotal",
533
+ "description": "Tiered amount off subtotal",
534
+ "type": "RECORD",
535
+ "fields": [
536
+ {
537
+ "mode": "REPEATED",
538
+ "name": "items",
539
+ "description": "An optional list of items of which a quantity of one or many must be purchased for coupon to be valid. If empty, all items apply toward subtotal amount.",
540
+ "type": "RECORD",
541
+ "fields": [{
542
+ "mode": "NULLABLE",
543
+ "name": "value",
544
+ "type": "STRING"
545
+ }]
546
+ },
547
+ {
548
+ "mode": "REPEATED",
549
+ "name": "tiers",
550
+ "description": "A list of discount tiers.",
551
+ "type": "RECORD",
552
+ "fields": [
553
+ {
554
+ "mode": "NULLABLE",
555
+ "name": "subtotal_amount",
556
+ "description": "The amount of subtotal required to receive the discount amount",
557
+ "type": "NUMERIC"
558
+ },
559
+ {
560
+ "mode": "NULLABLE",
561
+ "name": "discount_amount",
562
+ "description": "The amount of subtotal discount",
563
+ "type": "NUMERIC"
564
+ },
565
+ {
566
+ "mode": "NULLABLE",
567
+ "name": "quickbooks_code",
568
+ "description": "Quickbooks accounting code.",
569
+ "type": "STRING"
570
+ }
571
+ ]
572
+ }
573
+ ]
574
+ },
575
+ {
576
+ "name": "tiered_percent_off_subtotal",
577
+ "description": "Tiered percent off subtotal",
578
+ "type": "RECORD",
579
+ "fields": [
580
+ {
581
+ "mode": "REPEATED",
582
+ "name": "items",
583
+ "description": "An optional list of items of which a quantity of one or many must be purchased for coupon to be valid. If empty, all items apply toward subtotal amount.",
584
+ "type": "RECORD",
585
+ "fields": [{
586
+ "mode": "NULLABLE",
587
+ "name": "value",
588
+ "type": "STRING"
589
+ }]
590
+ },
591
+ {
592
+ "mode": "REPEATED",
593
+ "name": "tiers",
594
+ "description": "A list of discount tiers.",
595
+ "type": "RECORD",
596
+ "fields": [
597
+ {
598
+ "mode": "NULLABLE",
599
+ "name": "subtotal_amount",
600
+ "description": "The amount of subtotal required to receive the discount percent",
601
+ "type": "NUMERIC"
602
+ },
603
+ {
604
+ "mode": "NULLABLE",
605
+ "name": "discount_percent",
606
+ "description": "The percent of subtotal discount",
607
+ "type": "NUMERIC"
608
+ },
609
+ {
610
+ "mode": "NULLABLE",
611
+ "name": "quickbooks_code",
612
+ "description": "Quickbooks accounting code.",
613
+ "type": "STRING"
614
+ }
615
+ ]
616
+ }
617
+ ]
618
+ },
619
+ {
620
+ "name": "tiered_percent_off_subtotal_based_on_msrp",
621
+ "description": "Tiered percent off subtotal based on MSRP",
622
+ "type": "RECORD",
623
+ "fields": [
624
+ {
625
+ "mode": "REPEATED",
626
+ "name": "items",
627
+ "description": "An optional list of items of which a quantity of one or many must be purchased for coupon to be valid. If empty, all items apply toward subtotal amount.",
628
+ "type": "RECORD",
629
+ "fields": [{
630
+ "mode": "NULLABLE",
631
+ "name": "value",
632
+ "type": "STRING"
633
+ }]
634
+ },
635
+ {
636
+ "mode": "REPEATED",
637
+ "name": "tiers",
638
+ "description": "A list of discount tiers.",
639
+ "type": "RECORD",
640
+ "fields": [
641
+ {
642
+ "mode": "NULLABLE",
643
+ "name": "subtotal_amount",
644
+ "description": "The amount of subtotal required to receive the discount percent",
645
+ "type": "NUMERIC"
646
+ },
647
+ {
648
+ "mode": "NULLABLE",
649
+ "name": "discount_percent",
650
+ "description": "The percent of subtotal discount",
651
+ "type": "NUMERIC"
652
+ },
653
+ {
654
+ "mode": "NULLABLE",
655
+ "name": "quickbooks_code",
656
+ "description": "Quickbooks accounting code.",
657
+ "type": "STRING"
658
+ }
659
+ ]
660
+ }
661
+ ]
662
+ },
663
+ {
664
+ "name": "tiered_percent_off_shipping",
665
+ "description": "Tiered percent off shipping",
666
+ "type": "RECORD",
667
+ "fields": [
668
+ {
669
+ "mode": "REPEATED",
670
+ "name": "shipping_methods",
671
+ "description": "One or more shipping methods that may receive this discount",
672
+ "type": "RECORD",
673
+ "fields": [{
674
+ "mode": "NULLABLE",
675
+ "name": "value",
676
+ "type": "STRING"
677
+ }]
678
+ },
679
+ {
680
+ "mode": "REPEATED",
681
+ "name": "tiers",
682
+ "description": "A list of discount tiers.",
683
+ "type": "RECORD",
684
+ "fields": [
685
+ {
686
+ "mode": "NULLABLE",
687
+ "name": "subtotal_amount",
688
+ "description": "The amount of subtotal required to receive the discount percent",
689
+ "type": "NUMERIC"
690
+ },
691
+ {
692
+ "mode": "NULLABLE",
693
+ "name": "discount_percent",
694
+ "description": "The percent of subtotal discount",
695
+ "type": "NUMERIC"
696
+ },
697
+ {
698
+ "mode": "NULLABLE",
699
+ "name": "quickbooks_code",
700
+ "description": "Quickbooks accounting code.",
701
+ "type": "STRING"
702
+ }
703
+ ]
704
+ },
705
+ {
706
+ "mode": "NULLABLE",
707
+ "name": "quickbooks_code",
708
+ "description": "Quickbooks accounting code.",
709
+ "type": "STRING"
710
+ }
711
+ ]
712
+ },
713
+ {
714
+ "name": "tiered_amount_off_items",
715
+ "description": "Tiered amount off items",
716
+ "type": "RECORD",
717
+ "fields": [
718
+ {
719
+ "mode": "REPEATED",
720
+ "name": "items",
721
+ "description": "The items being discounted by this coupon.",
722
+ "type": "RECORD",
723
+ "fields": [{
724
+ "mode": "NULLABLE",
725
+ "name": "value",
726
+ "type": "STRING"
727
+ }]
728
+ },
729
+ {
730
+ "mode": "REPEATED",
731
+ "name": "tiers",
732
+ "description": "A list of discount tiers.",
733
+ "type": "RECORD",
734
+ "fields": [
735
+ {
736
+ "mode": "NULLABLE",
737
+ "name": "item_quantity",
738
+ "description": "The quantity of item purchased (in units)",
739
+ "type": "INTEGER"
740
+ },
741
+ {
742
+ "mode": "NULLABLE",
743
+ "name": "discount_amount",
744
+ "description": "The amount of discount per item.",
745
+ "type": "NUMERIC"
746
+ },
747
+ {
748
+ "mode": "NULLABLE",
749
+ "name": "quickbooks_code",
750
+ "description": "Quickbooks accounting code.",
751
+ "type": "STRING"
752
+ }
753
+ ]
754
+ },
755
+ {
756
+ "mode": "NULLABLE",
757
+ "name": "limit",
758
+ "description": "The maximum number of discounted items.",
759
+ "type": "NUMERIC"
760
+ },
761
+ {
762
+ "mode": "REPEATED",
763
+ "name": "item_tags",
764
+ "description": "An optional list of item tags which will receive a discount. If blank, discount applies to all items except excluded items.",
765
+ "type": "RECORD",
766
+ "fields": [{
767
+ "mode": "NULLABLE",
768
+ "name": "value",
769
+ "type": "STRING"
770
+ }]
771
+ }
772
+ ]
773
+ },
774
+ {
775
+ "name": "tiered_percent_off_items",
776
+ "description": "Tiered percent off items",
777
+ "type": "RECORD",
778
+ "fields": [
779
+ {
780
+ "mode": "REPEATED",
781
+ "name": "items",
782
+ "description": "A list of items of which at least one must be purchased for coupon to be valid.",
783
+ "type": "RECORD",
784
+ "fields": [{
785
+ "mode": "NULLABLE",
786
+ "name": "value",
787
+ "type": "STRING"
788
+ }]
789
+ },
790
+ {
791
+ "mode": "REPEATED",
792
+ "name": "tiers",
793
+ "description": "A list of discount tiers.",
794
+ "type": "RECORD",
795
+ "fields": [
796
+ {
797
+ "mode": "NULLABLE",
798
+ "name": "item_quantity",
799
+ "description": "The quantity of item purchased (in units)",
800
+ "type": "INTEGER"
801
+ },
802
+ {
803
+ "mode": "NULLABLE",
804
+ "name": "discount_percent",
805
+ "description": "The percent of discount per item.",
806
+ "type": "NUMERIC"
807
+ },
808
+ {
809
+ "mode": "NULLABLE",
810
+ "name": "quickbooks_code",
811
+ "description": "Quickbooks accounting code.",
812
+ "type": "STRING"
813
+ }
814
+ ]
815
+ },
816
+ {
817
+ "mode": "NULLABLE",
818
+ "name": "limit",
819
+ "description": "The (optional) maximum quantity of discounted items.",
820
+ "type": "NUMERIC"
821
+ },
822
+ {
823
+ "mode": "REPEATED",
824
+ "name": "item_tags",
825
+ "description": "An optional list of item tags which will receive a discount. If blank, discount applies to all items except excluded items.",
826
+ "type": "RECORD",
827
+ "fields": [{
828
+ "mode": "NULLABLE",
829
+ "name": "value",
830
+ "type": "STRING"
831
+ }]
832
+ }
833
+ ]
834
+ },
835
+ {
836
+ "name": "amount_off_items",
837
+ "description": "Amount off items",
838
+ "type": "RECORD",
839
+ "fields": [
840
+ {
841
+ "mode": "NULLABLE",
842
+ "name": "discount_amount",
843
+ "description": "The amount of shipping discount",
844
+ "type": "NUMERIC"
845
+ },
846
+ {
847
+ "mode": "NULLABLE",
848
+ "name": "currency_code",
849
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
850
+ "type": "STRING"
851
+ },
852
+ {
853
+ "mode": "REPEATED",
854
+ "name": "items",
855
+ "description": "A list of items which are eligible for the discount amount.",
856
+ "type": "RECORD",
857
+ "fields": [{
858
+ "mode": "NULLABLE",
859
+ "name": "value",
860
+ "type": "STRING"
861
+ }]
862
+ },
863
+ {
864
+ "mode": "NULLABLE",
865
+ "name": "limit",
866
+ "description": "The limit of items which are eligible for the discount amount.",
867
+ "type": "INTEGER"
868
+ },
869
+ {
870
+ "mode": "REPEATED",
871
+ "name": "item_tags",
872
+ "description": "An optional list of item tags which will receive a discount.",
873
+ "type": "RECORD",
874
+ "fields": [{
875
+ "mode": "NULLABLE",
876
+ "name": "value",
877
+ "type": "STRING"
878
+ }]
879
+ }
880
+ ]
881
+ },
882
+ {
883
+ "name": "multiple_amounts_off_items",
884
+ "description": "Multiple amounts off items",
885
+ "type": "RECORD",
886
+ "fields": [
887
+ {
888
+ "mode": "REPEATED",
889
+ "name": "discounts",
890
+ "description": "A list of item discounts.",
891
+ "type": "RECORD",
892
+ "fields": [
893
+ {
894
+ "mode": "REPEATED",
895
+ "name": "items",
896
+ "description": "A list of items which will receive this discount.",
897
+ "type": "RECORD",
898
+ "fields": [{
899
+ "mode": "NULLABLE",
900
+ "name": "value",
901
+ "type": "STRING"
902
+ }]
903
+ },
904
+ {
905
+ "mode": "NULLABLE",
906
+ "name": "discount_amount",
907
+ "description": "The amount of subtotal discount",
908
+ "type": "NUMERIC"
909
+ }
910
+ ]
911
+ },
912
+ {
913
+ "mode": "NULLABLE",
914
+ "name": "limit",
915
+ "description": "The (optional) maximum quantity of items that may receive a discount.",
916
+ "type": "INTEGER"
917
+ }
918
+ ]
919
+ },
920
+ {
921
+ "name": "percent_off_items",
922
+ "description": "Percent off items",
923
+ "type": "RECORD",
924
+ "fields": [
925
+ {
926
+ "mode": "NULLABLE",
927
+ "name": "discount_percent",
928
+ "description": "The percentage of subtotal discount",
929
+ "type": "NUMERIC"
930
+ },
931
+ {
932
+ "mode": "REPEATED",
933
+ "name": "items",
934
+ "description": "An optional list of items which will receive a discount. If blank, discount applies to all items except excluded items.",
935
+ "type": "RECORD",
936
+ "fields": [{
937
+ "mode": "NULLABLE",
938
+ "name": "value",
939
+ "type": "STRING"
940
+ }]
941
+ },
942
+ {
943
+ "mode": "REPEATED",
944
+ "name": "excluded_items",
945
+ "description": "A list of items which cannot be discounted.",
946
+ "type": "RECORD",
947
+ "fields": [{
948
+ "mode": "NULLABLE",
949
+ "name": "value",
950
+ "type": "STRING"
951
+ }]
952
+ },
953
+ {
954
+ "mode": "NULLABLE",
955
+ "name": "limit",
956
+ "description": "The (optional) maximum quantity of discounted items.",
957
+ "type": "INTEGER"
958
+ },
959
+ {
960
+ "mode": "REPEATED",
961
+ "name": "item_tags",
962
+ "description": "An optional list of item tags which will receive a discount. If blank, discount applies to all items except excluded items.",
963
+ "type": "RECORD",
964
+ "fields": [{
965
+ "mode": "NULLABLE",
966
+ "name": "value",
967
+ "type": "STRING"
968
+ }]
969
+ },
970
+ {
971
+ "mode": "REPEATED",
972
+ "name": "excluded_item_tags",
973
+ "description": "A list of item tags which cannot be discounted.",
974
+ "type": "RECORD",
975
+ "fields": [{
976
+ "mode": "NULLABLE",
977
+ "name": "value",
978
+ "type": "STRING"
979
+ }]
980
+ }
981
+ ]
982
+ },
983
+ {
984
+ "name": "buy_one_get_one",
985
+ "description": "Buy one get one free",
986
+ "type": "RECORD",
987
+ "fields": [
988
+ {
989
+ "mode": "REPEATED",
990
+ "name": "items",
991
+ "description": "An optional list of items of which one must be purchased to receive free quantity of the same item.",
992
+ "type": "RECORD",
993
+ "fields": [{
994
+ "mode": "NULLABLE",
995
+ "name": "value",
996
+ "type": "STRING"
997
+ }]
998
+ },
999
+ {
1000
+ "mode": "NULLABLE",
1001
+ "name": "limit",
1002
+ "description": "The limit of free items that may be received when purchasing multiple items",
1003
+ "type": "INTEGER"
1004
+ },
1005
+ {
1006
+ "mode": "REPEATED",
1007
+ "name": "item_tags",
1008
+ "description": "An optional list of item tags which will receive a discount.",
1009
+ "type": "RECORD",
1010
+ "fields": [{
1011
+ "mode": "NULLABLE",
1012
+ "name": "value",
1013
+ "type": "STRING"
1014
+ }]
1015
+ }
1016
+ ]
1017
+ },
1018
+ {
1019
+ "name": "percent_off_retail_price_items",
1020
+ "description": "Percent off retail price items",
1021
+ "type": "RECORD",
1022
+ "fields": [
1023
+ {
1024
+ "mode": "NULLABLE",
1025
+ "name": "discount_percent",
1026
+ "description": "The percentage of subtotal discount",
1027
+ "type": "NUMERIC"
1028
+ },
1029
+ {
1030
+ "mode": "REPEATED",
1031
+ "name": "items",
1032
+ "description": "An optional list of items which will receive a discount. If blank, discount applies to all items except excluded items.",
1033
+ "type": "RECORD",
1034
+ "fields": [{
1035
+ "mode": "NULLABLE",
1036
+ "name": "value",
1037
+ "type": "STRING"
1038
+ }]
1039
+ },
1040
+ {
1041
+ "mode": "REPEATED",
1042
+ "name": "excluded_items",
1043
+ "description": "A list of items which cannot be discounted.",
1044
+ "type": "RECORD",
1045
+ "fields": [{
1046
+ "mode": "NULLABLE",
1047
+ "name": "value",
1048
+ "type": "STRING"
1049
+ }]
1050
+ },
1051
+ {
1052
+ "mode": "NULLABLE",
1053
+ "name": "limit",
1054
+ "description": "The (optional) maximum quantity of discounted items.",
1055
+ "type": "INTEGER"
1056
+ }
1057
+ ]
1058
+ },
1059
+ {
1060
+ "name": "percent_off_msrp_items",
1061
+ "description": "Percent off MSRP items",
1062
+ "type": "RECORD",
1063
+ "fields": [
1064
+ {
1065
+ "mode": "NULLABLE",
1066
+ "name": "discount_percent",
1067
+ "description": "The percentage of subtotal discount",
1068
+ "type": "NUMERIC"
1069
+ },
1070
+ {
1071
+ "mode": "REPEATED",
1072
+ "name": "items",
1073
+ "description": "An list of items which will receive a discount.",
1074
+ "type": "RECORD",
1075
+ "fields": [{
1076
+ "mode": "NULLABLE",
1077
+ "name": "value",
1078
+ "type": "STRING"
1079
+ }]
1080
+ },
1081
+ {
1082
+ "mode": "REPEATED",
1083
+ "name": "excluded_items",
1084
+ "description": "A list of items which cannot be discounted.",
1085
+ "type": "RECORD",
1086
+ "fields": [{
1087
+ "mode": "NULLABLE",
1088
+ "name": "value",
1089
+ "type": "STRING"
1090
+ }]
1091
+ },
1092
+ {
1093
+ "mode": "NULLABLE",
1094
+ "name": "limit",
1095
+ "description": "The (optional) maximum quantity of discounted items.",
1096
+ "type": "INTEGER"
1097
+ },
1098
+ {
1099
+ "mode": "NULLABLE",
1100
+ "name": "minimum_cumulative_msrp",
1101
+ "description": "The (optional) minimum cumulative msrp of qualifying items.",
1102
+ "type": "NUMERIC"
1103
+ },
1104
+ {
1105
+ "mode": "NULLABLE",
1106
+ "name": "minimum_subtotal",
1107
+ "description": "The (optional) minimum subtotal of qualifying items.",
1108
+ "type": "NUMERIC"
1109
+ }
1110
+ ]
1111
+ },
1112
+ {
1113
+ "name": "discount_items",
1114
+ "description": "Discount items",
1115
+ "type": "RECORD",
1116
+ "fields": [
1117
+ {
1118
+ "mode": "NULLABLE",
1119
+ "name": "discount_price",
1120
+ "description": "The price (unit cost) of the discounted item",
1121
+ "type": "NUMERIC"
1122
+ },
1123
+ {
1124
+ "mode": "NULLABLE",
1125
+ "name": "currency_code",
1126
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
1127
+ "type": "STRING"
1128
+ },
1129
+ {
1130
+ "mode": "REPEATED",
1131
+ "name": "items",
1132
+ "description": "A list of items that are eligible for this discount_price.",
1133
+ "type": "RECORD",
1134
+ "fields": [{
1135
+ "mode": "NULLABLE",
1136
+ "name": "value",
1137
+ "type": "STRING"
1138
+ }]
1139
+ },
1140
+ {
1141
+ "mode": "NULLABLE",
1142
+ "name": "limit",
1143
+ "description": "The (optional) maximum quantity of discounted items.",
1144
+ "type": "INTEGER"
1145
+ }
1146
+ ]
1147
+ },
1148
+ {
1149
+ "name": "free_item_with_item_purchase",
1150
+ "description": "Free item with item purchase",
1151
+ "type": "RECORD",
1152
+ "fields": [
1153
+ {
1154
+ "mode": "REPEATED",
1155
+ "name": "items",
1156
+ "description": "A list of free items which will receive a discount if one of the required purchase items is purchased.",
1157
+ "type": "RECORD",
1158
+ "fields": [{
1159
+ "mode": "NULLABLE",
1160
+ "name": "value",
1161
+ "type": "STRING"
1162
+ }]
1163
+ },
1164
+ {
1165
+ "mode": "REPEATED",
1166
+ "name": "required_purchase_items",
1167
+ "description": "Required items (at least one from the list) that must be purchased for coupon to be valid",
1168
+ "type": "RECORD",
1169
+ "fields": [{
1170
+ "mode": "NULLABLE",
1171
+ "name": "value",
1172
+ "type": "STRING"
1173
+ }]
1174
+ },
1175
+ {
1176
+ "mode": "NULLABLE",
1177
+ "name": "limit",
1178
+ "description": "The (optional) maximum quantity of discounted items.",
1179
+ "type": "INTEGER"
1180
+ },
1181
+ {
1182
+ "mode": "NULLABLE",
1183
+ "name": "match_required_purchase_item_to_free_item",
1184
+ "description": "If true then the free item is matched 1:1 with the free item in the list.",
1185
+ "type": "BOOLEAN"
1186
+ },
1187
+ {
1188
+ "mode": "REPEATED",
1189
+ "name": "item_tags",
1190
+ "description": "An optional list of item tags which will receive a discount of one of the required purchased items is purchased.",
1191
+ "type": "RECORD",
1192
+ "fields": [{
1193
+ "mode": "NULLABLE",
1194
+ "name": "value",
1195
+ "type": "STRING"
1196
+ }]
1197
+ },
1198
+ {
1199
+ "mode": "REPEATED",
1200
+ "name": "required_purchase_items_tags",
1201
+ "description": "An optional list of item tags which are required to be purchased.",
1202
+ "type": "RECORD",
1203
+ "fields": [{
1204
+ "mode": "NULLABLE",
1205
+ "name": "value",
1206
+ "type": "STRING"
1207
+ }]
1208
+ }
1209
+ ]
1210
+ },
1211
+ {
1212
+ "name": "free_item_with_item_purchase_and_free_shipping",
1213
+ "description": "Free item with item purchase and free shipping",
1214
+ "type": "RECORD",
1215
+ "fields": [
1216
+ {
1217
+ "mode": "REPEATED",
1218
+ "name": "items",
1219
+ "description": "A list of free items which will receive a discount if one of the required purchase items is purchased.",
1220
+ "type": "RECORD",
1221
+ "fields": [{
1222
+ "mode": "NULLABLE",
1223
+ "name": "value",
1224
+ "type": "STRING"
1225
+ }]
1226
+ },
1227
+ {
1228
+ "mode": "REPEATED",
1229
+ "name": "required_purchase_items",
1230
+ "description": "Required items (at least one from the list) that must be purchased for coupon to be valid",
1231
+ "type": "RECORD",
1232
+ "fields": [{
1233
+ "mode": "NULLABLE",
1234
+ "name": "value",
1235
+ "type": "STRING"
1236
+ }]
1237
+ },
1238
+ {
1239
+ "mode": "NULLABLE",
1240
+ "name": "limit",
1241
+ "description": "The (optional) maximum quantity of discounted items. Free shipping will apply to all units of the free item ids though.",
1242
+ "type": "INTEGER"
1243
+ },
1244
+ {
1245
+ "mode": "NULLABLE",
1246
+ "name": "match_required_purchase_item_to_free_item",
1247
+ "description": "If true then the free item is matched 1:1 with the free item in the list.",
1248
+ "type": "BOOLEAN"
1249
+ },
1250
+ {
1251
+ "mode": "REPEATED",
1252
+ "name": "shipping_methods",
1253
+ "description": "One or more shipping methods that may be used with this coupon. If not specified or empty, methods that are marked as qualifies for free shipping will be the only free methods",
1254
+ "type": "RECORD",
1255
+ "fields": [{
1256
+ "mode": "NULLABLE",
1257
+ "name": "value",
1258
+ "type": "STRING"
1259
+ }]
1260
+ }
1261
+ ]
1262
+ },
1263
+ {
1264
+ "name": "free_item_with_subtotal",
1265
+ "description": "Free items with subtotal",
1266
+ "type": "RECORD",
1267
+ "fields": [
1268
+ {
1269
+ "mode": "REPEATED",
1270
+ "name": "items",
1271
+ "description": "A list of items that are eligible for this discount_price.",
1272
+ "type": "RECORD",
1273
+ "fields": [{
1274
+ "mode": "NULLABLE",
1275
+ "name": "value",
1276
+ "type": "STRING"
1277
+ }]
1278
+ },
1279
+ {
1280
+ "mode": "NULLABLE",
1281
+ "name": "subtotal_amount",
1282
+ "description": "The amount of subtotal required to receive the discount percent",
1283
+ "type": "NUMERIC"
1284
+ },
1285
+ {
1286
+ "mode": "NULLABLE",
1287
+ "name": "currency_code",
1288
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
1289
+ "type": "STRING"
1290
+ },
1291
+ {
1292
+ "mode": "NULLABLE",
1293
+ "name": "limit",
1294
+ "description": "The limit of free items that may be received when purchasing multiple items",
1295
+ "type": "INTEGER"
1296
+ }
1297
+ ]
1298
+ },
1299
+ {
1300
+ "name": "free_item_and_shipping_with_subtotal",
1301
+ "description": "Free items and shipping with subtotal",
1302
+ "type": "RECORD",
1303
+ "fields": [
1304
+ {
1305
+ "mode": "REPEATED",
1306
+ "name": "items",
1307
+ "description": "A list of items that are eligible for this discount_price.",
1308
+ "type": "RECORD",
1309
+ "fields": [{
1310
+ "mode": "NULLABLE",
1311
+ "name": "value",
1312
+ "type": "STRING"
1313
+ }]
1314
+ },
1315
+ {
1316
+ "mode": "NULLABLE",
1317
+ "name": "subtotal_amount",
1318
+ "description": "The amount of subtotal required to receive the discount percent",
1319
+ "type": "NUMERIC"
1320
+ },
1321
+ {
1322
+ "mode": "NULLABLE",
1323
+ "name": "currency_code",
1324
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
1325
+ "type": "STRING"
1326
+ },
1327
+ {
1328
+ "mode": "REPEATED",
1329
+ "name": "shipping_methods",
1330
+ "description": "One or more shipping methods that may be free",
1331
+ "type": "RECORD",
1332
+ "fields": [{
1333
+ "mode": "NULLABLE",
1334
+ "name": "value",
1335
+ "type": "STRING"
1336
+ }]
1337
+ },
1338
+ {
1339
+ "mode": "NULLABLE",
1340
+ "name": "limit",
1341
+ "description": "The limit of free items that may be received when purchasing multiple items",
1342
+ "type": "INTEGER"
1343
+ }
1344
+ ]
1345
+ },
1346
+ {
1347
+ "name": "percent_off_items_with_items_purchase",
1348
+ "description": "Percent off items with items purchase",
1349
+ "type": "RECORD",
1350
+ "fields": [
1351
+ {
1352
+ "mode": "NULLABLE",
1353
+ "name": "discount_percent",
1354
+ "description": "The percentage of subtotal discount",
1355
+ "type": "NUMERIC"
1356
+ },
1357
+ {
1358
+ "mode": "REPEATED",
1359
+ "name": "items",
1360
+ "description": "A list of items which will receive a discount if one of the required purchase items is purchased.",
1361
+ "type": "RECORD",
1362
+ "fields": [{
1363
+ "mode": "NULLABLE",
1364
+ "name": "value",
1365
+ "type": "STRING"
1366
+ }]
1367
+ },
1368
+ {
1369
+ "mode": "REPEATED",
1370
+ "name": "required_purchase_items",
1371
+ "description": "Required items (at least one from the list) that must be purchased for coupon to be valid",
1372
+ "type": "RECORD",
1373
+ "fields": [{
1374
+ "mode": "NULLABLE",
1375
+ "name": "value",
1376
+ "type": "STRING"
1377
+ }]
1378
+ },
1379
+ {
1380
+ "mode": "NULLABLE",
1381
+ "name": "limit",
1382
+ "description": "The (optional) maximum quantity of discounted items.",
1383
+ "type": "INTEGER"
1384
+ },
1385
+ {
1386
+ "mode": "REPEATED",
1387
+ "name": "item_tags",
1388
+ "description": "An optional list of item tags which will receive a discount of one of the required purchased items is purchased.",
1389
+ "type": "RECORD",
1390
+ "fields": [{
1391
+ "mode": "NULLABLE",
1392
+ "name": "value",
1393
+ "type": "STRING"
1394
+ }]
1395
+ },
1396
+ {
1397
+ "mode": "REPEATED",
1398
+ "name": "required_purchase_items_tags",
1399
+ "description": "An optional list of item tags which are required to be purchased.",
1400
+ "type": "RECORD",
1401
+ "fields": [{
1402
+ "mode": "NULLABLE",
1403
+ "name": "value",
1404
+ "type": "STRING"
1405
+ }]
1406
+ }
1407
+ ]
1408
+ },
1409
+ {
1410
+ "name": "percent_off_item_with_items_quantity_purchase",
1411
+ "description": "Percent off item with items quantity purchase",
1412
+ "type": "RECORD",
1413
+ "fields": [
1414
+ {
1415
+ "mode": "NULLABLE",
1416
+ "name": "discount_percent",
1417
+ "description": "The percentage of subtotal discount",
1418
+ "type": "NUMERIC"
1419
+ },
1420
+ {
1421
+ "mode": "REPEATED",
1422
+ "name": "items",
1423
+ "description": "A list of items which will receive a discount if one of the required purchase items is purchased.",
1424
+ "type": "RECORD",
1425
+ "fields": [{
1426
+ "mode": "NULLABLE",
1427
+ "name": "value",
1428
+ "type": "STRING"
1429
+ }]
1430
+ },
1431
+ {
1432
+ "mode": "REPEATED",
1433
+ "name": "required_purchase_items",
1434
+ "description": "Required items (at least one from the list) that must be purchased for coupon to be valid",
1435
+ "type": "RECORD",
1436
+ "fields": [{
1437
+ "mode": "NULLABLE",
1438
+ "name": "value",
1439
+ "type": "STRING"
1440
+ }]
1441
+ },
1442
+ {
1443
+ "mode": "NULLABLE",
1444
+ "name": "required_purchase_quantity",
1445
+ "description": "The quantity of items that must be purchased for the discount to be applied.",
1446
+ "type": "INTEGER"
1447
+ },
1448
+ {
1449
+ "mode": "NULLABLE",
1450
+ "name": "limit",
1451
+ "description": "The (optional) maximum quantity of discounted items.",
1452
+ "type": "INTEGER"
1453
+ },
1454
+ {
1455
+ "mode": "REPEATED",
1456
+ "name": "item_tags",
1457
+ "description": "An optional list of item tags which will receive a discount if one of the required purchased items is purchased.",
1458
+ "type": "RECORD",
1459
+ "fields": [{
1460
+ "mode": "NULLABLE",
1461
+ "name": "value",
1462
+ "type": "STRING"
1463
+ }]
1464
+ },
1465
+ {
1466
+ "mode": "REPEATED",
1467
+ "name": "required_purchase_items_tags",
1468
+ "description": "Required item tags (at least one from the list) that must be purchase for coupon to be valid.",
1469
+ "type": "RECORD",
1470
+ "fields": [{
1471
+ "mode": "NULLABLE",
1472
+ "name": "value",
1473
+ "type": "STRING"
1474
+ }]
1475
+ }
1476
+ ]
1477
+ },
1478
+ {
1479
+ "name": "amount_off_shipping",
1480
+ "description": "Amount off shipping",
1481
+ "type": "RECORD",
1482
+ "fields": [
1483
+ {
1484
+ "mode": "NULLABLE",
1485
+ "name": "discount_amount",
1486
+ "description": "The amount of subtotal discount",
1487
+ "type": "NUMERIC"
1488
+ },
1489
+ {
1490
+ "mode": "NULLABLE",
1491
+ "name": "currency_code",
1492
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
1493
+ "type": "STRING"
1494
+ },
1495
+ {
1496
+ "mode": "REPEATED",
1497
+ "name": "shipping_methods",
1498
+ "description": "One or more shipping methods that may be used with this coupon",
1499
+ "type": "RECORD",
1500
+ "fields": [{
1501
+ "mode": "NULLABLE",
1502
+ "name": "value",
1503
+ "type": "STRING"
1504
+ }]
1505
+ }
1506
+ ]
1507
+ },
1508
+ {
1509
+ "name": "amount_shipping_with_subtotal",
1510
+ "description": "Amount shipping with subtotal",
1511
+ "type": "RECORD",
1512
+ "fields": [
1513
+ {
1514
+ "mode": "REPEATED",
1515
+ "name": "shipping_methods",
1516
+ "description": "One or more shipping methods that may be used with this coupon",
1517
+ "type": "RECORD",
1518
+ "fields": [{
1519
+ "mode": "NULLABLE",
1520
+ "name": "value",
1521
+ "type": "STRING"
1522
+ }]
1523
+ },
1524
+ {
1525
+ "mode": "NULLABLE",
1526
+ "name": "currency_code",
1527
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
1528
+ "type": "STRING"
1529
+ },
1530
+ {
1531
+ "mode": "NULLABLE",
1532
+ "name": "purchase_amount",
1533
+ "description": "The purchase amount to qualify for subtotal discount and free shipping",
1534
+ "type": "NUMERIC"
1535
+ },
1536
+ {
1537
+ "mode": "NULLABLE",
1538
+ "name": "shipping_amount",
1539
+ "description": "The amount of the shipping cost (this is not a discount, this is the actual cost of shipping)",
1540
+ "type": "NUMERIC"
1541
+ }
1542
+ ]
1543
+ },
1544
+ {
1545
+ "name": "percent_off_shipping",
1546
+ "description": "Percent off shipping",
1547
+ "type": "RECORD",
1548
+ "fields": [
1549
+ {
1550
+ "mode": "NULLABLE",
1551
+ "name": "discount_percent",
1552
+ "description": "The percentage of subtotal discount",
1553
+ "type": "NUMERIC"
1554
+ },
1555
+ {
1556
+ "mode": "REPEATED",
1557
+ "name": "shipping_methods",
1558
+ "description": "One or more shipping methods that may be used with this coupon",
1559
+ "type": "RECORD",
1560
+ "fields": [{
1561
+ "mode": "NULLABLE",
1562
+ "name": "value",
1563
+ "type": "STRING"
1564
+ }]
1565
+ }
1566
+ ]
1567
+ },
1568
+ {
1569
+ "name": "free_shipping",
1570
+ "description": "Free shipping",
1571
+ "type": "RECORD",
1572
+ "fields": [{
1573
+ "mode": "REPEATED",
1574
+ "name": "shipping_methods",
1575
+ "description": "One or more shipping methods that may be used with this coupon",
1576
+ "type": "RECORD",
1577
+ "fields": [{
1578
+ "mode": "NULLABLE",
1579
+ "name": "value",
1580
+ "type": "STRING"
1581
+ }]
1582
+ }]
1583
+ },
1584
+ {
1585
+ "name": "free_shipping_with_subtotal",
1586
+ "description": "Free shipping with subtotal",
1587
+ "type": "RECORD",
1588
+ "fields": [
1589
+ {
1590
+ "mode": "REPEATED",
1591
+ "name": "shipping_methods",
1592
+ "description": "One or more shipping methods that may be used with this coupon",
1593
+ "type": "RECORD",
1594
+ "fields": [{
1595
+ "mode": "NULLABLE",
1596
+ "name": "value",
1597
+ "type": "STRING"
1598
+ }]
1599
+ },
1600
+ {
1601
+ "mode": "NULLABLE",
1602
+ "name": "currency_code",
1603
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
1604
+ "type": "STRING"
1605
+ },
1606
+ {
1607
+ "mode": "NULLABLE",
1608
+ "name": "purchase_amount",
1609
+ "description": "The purchase amount to qualify for subtotal discount and free shipping",
1610
+ "type": "NUMERIC"
1611
+ }
1612
+ ]
1613
+ },
1614
+ {
1615
+ "name": "free_shipping_with_items_purchase",
1616
+ "description": "Free shipping with items purchase",
1617
+ "type": "RECORD",
1618
+ "fields": [
1619
+ {
1620
+ "mode": "REPEATED",
1621
+ "name": "shipping_methods",
1622
+ "description": "One or more shipping methods that may receive this discount",
1623
+ "type": "RECORD",
1624
+ "fields": [{
1625
+ "mode": "NULLABLE",
1626
+ "name": "value",
1627
+ "type": "STRING"
1628
+ }]
1629
+ },
1630
+ {
1631
+ "mode": "REPEATED",
1632
+ "name": "items",
1633
+ "description": "A list of items of which at least one must be purchased for coupon to be valid.",
1634
+ "type": "RECORD",
1635
+ "fields": [{
1636
+ "mode": "NULLABLE",
1637
+ "name": "value",
1638
+ "type": "STRING"
1639
+ }]
1640
+ }
1641
+ ]
1642
+ },
1643
+ {
1644
+ "name": "free_shipping_specific_items",
1645
+ "description": "Free shipping specific items",
1646
+ "type": "RECORD",
1647
+ "fields": [{
1648
+ "mode": "REPEATED",
1649
+ "name": "items",
1650
+ "description": "A list of items of which at least one must be purchased for coupon to be valid.",
1651
+ "type": "RECORD",
1652
+ "fields": [{
1653
+ "mode": "NULLABLE",
1654
+ "name": "value",
1655
+ "type": "STRING"
1656
+ }]
1657
+ }]
1658
+ },
1659
+ {
1660
+ "name": "discount_item_with_item_purchase",
1661
+ "description": "Discount item with item purchase",
1662
+ "type": "RECORD",
1663
+ "fields": [
1664
+ {
1665
+ "mode": "NULLABLE",
1666
+ "name": "discount_price",
1667
+ "description": "The price (unit cost) of the discounted item",
1668
+ "type": "NUMERIC"
1669
+ },
1670
+ {
1671
+ "mode": "NULLABLE",
1672
+ "name": "currency_code",
1673
+ "description": "The ISO-4217 three letter currency code the customer is viewing prices in",
1674
+ "type": "STRING"
1675
+ },
1676
+ {
1677
+ "mode": "NULLABLE",
1678
+ "name": "required_purchase_item",
1679
+ "description": "The item that must be purchased for the discount to be applied to the discount item.",
1680
+ "type": "STRING"
1681
+ },
1682
+ {
1683
+ "mode": "NULLABLE",
1684
+ "name": "discount_item",
1685
+ "description": "The item that will be sold at the discount_price when required_purchase_item is purchased.",
1686
+ "type": "STRING"
1687
+ },
1688
+ {
1689
+ "mode": "NULLABLE",
1690
+ "name": "limit",
1691
+ "description": "The (optional) maximum quantity of discounted items.",
1692
+ "type": "INTEGER"
1693
+ },
1694
+ {
1695
+ "mode": "REPEATED",
1696
+ "name": "discount_item_tags",
1697
+ "description": "An optional list of item tags which will receive a discount of one of the required purchased items is purchased.",
1698
+ "type": "RECORD",
1699
+ "fields": [{
1700
+ "mode": "NULLABLE",
1701
+ "name": "value",
1702
+ "type": "STRING"
1703
+ }]
1704
+ },
1705
+ {
1706
+ "mode": "REPEATED",
1707
+ "name": "required_purchase_items_tags",
1708
+ "description": "An optional list of item tags which are required to be purchased.",
1709
+ "type": "RECORD",
1710
+ "fields": [{
1711
+ "mode": "NULLABLE",
1712
+ "name": "value",
1713
+ "type": "STRING"
1714
+ }]
1715
+ }
1716
+ ]
1717
+ },
1718
+ {
1719
+ "name": "percent_off_items_and_free_shipping",
1720
+ "description": "Percent off items and free shipping",
1721
+ "type": "RECORD",
1722
+ "fields": [
1723
+ {
1724
+ "mode": "NULLABLE",
1725
+ "name": "discount_percent",
1726
+ "description": "The percentage of subtotal discount",
1727
+ "type": "NUMERIC"
1728
+ },
1729
+ {
1730
+ "mode": "REPEATED",
1731
+ "name": "items",
1732
+ "description": "An optional list of items which will receive a discount. If blank, discount applies to all items except excluded items.",
1733
+ "type": "RECORD",
1734
+ "fields": [{
1735
+ "mode": "NULLABLE",
1736
+ "name": "value",
1737
+ "type": "STRING"
1738
+ }]
1739
+ },
1740
+ {
1741
+ "mode": "REPEATED",
1742
+ "name": "excluded_items",
1743
+ "description": "A list of items which cannot be discounted.",
1744
+ "type": "RECORD",
1745
+ "fields": [{
1746
+ "mode": "NULLABLE",
1747
+ "name": "value",
1748
+ "type": "STRING"
1749
+ }]
1750
+ },
1751
+ {
1752
+ "mode": "REPEATED",
1753
+ "name": "item_tags",
1754
+ "description": "An optional list of item tags which will receive a discount. If blank, discount applies to all items except excluded items.",
1755
+ "type": "RECORD",
1756
+ "fields": [{
1757
+ "mode": "NULLABLE",
1758
+ "name": "value",
1759
+ "type": "STRING"
1760
+ }]
1761
+ },
1762
+ {
1763
+ "mode": "REPEATED",
1764
+ "name": "excluded_item_tags",
1765
+ "description": "A list of item tags which cannot be discounted.",
1766
+ "type": "RECORD",
1767
+ "fields": [{
1768
+ "mode": "NULLABLE",
1769
+ "name": "value",
1770
+ "type": "STRING"
1771
+ }]
1772
+ },
1773
+ {
1774
+ "mode": "REPEATED",
1775
+ "name": "shipping_methods",
1776
+ "description": "One or more shipping methods that may be used with this coupon. If not specified or empty, methods that are marked as qualifies for free shipping will be the only free methods",
1777
+ "type": "RECORD",
1778
+ "fields": [{
1779
+ "mode": "NULLABLE",
1780
+ "name": "value",
1781
+ "type": "STRING"
1782
+ }]
1783
+ }
1784
+ ]
1785
+ },
1786
+ {
1787
+ "name": "percent_off_subtotal_and_free_shipping",
1788
+ "description": "Percent off subtotal and free shipping",
1789
+ "type": "RECORD",
1790
+ "fields": [
1791
+ {
1792
+ "mode": "NULLABLE",
1793
+ "name": "discount_percent",
1794
+ "description": "The percentage of subtotal discount",
1795
+ "type": "NUMERIC"
1796
+ },
1797
+ {
1798
+ "mode": "REPEATED",
1799
+ "name": "shipping_methods",
1800
+ "description": "One or more shipping methods that may be free",
1801
+ "type": "RECORD",
1802
+ "fields": [{
1803
+ "mode": "NULLABLE",
1804
+ "name": "value",
1805
+ "type": "STRING"
1806
+ }]
1807
+ }
1808
+ ]
1809
+ },
1810
+ {
1811
+ "name": "no_discount",
1812
+ "description": "No discount",
1813
+ "type": "RECORD",
1814
+ "fields": [{
1815
+ "mode": "NULLABLE",
1816
+ "name": "ignore_this_property",
1817
+ "description": "This property does nothing but is included in this object to ensure the object is generated by our sdk builders.",
1818
+ "type": "BOOLEAN"
1819
+ }]
1820
+ },
1821
+ {
1822
+ "name": "percent_more_loyalty_points",
1823
+ "description": "Percent more loyalty points",
1824
+ "type": "RECORD",
1825
+ "fields": [{
1826
+ "mode": "NULLABLE",
1827
+ "name": "percent_more_loyalty_points",
1828
+ "description": "The percentage of additional loyalty points",
1829
+ "type": "NUMERIC"
1830
+ }]
1831
+ },
1832
+ {
1833
+ "name": "more_loyalty_points",
1834
+ "description": "More loyalty points",
1835
+ "type": "RECORD",
1836
+ "fields": [{
1837
+ "mode": "NULLABLE",
1838
+ "name": "loyalty_points",
1839
+ "description": "The additional loyalty points",
1840
+ "type": "NUMERIC"
1841
+ }]
1842
+ },
1843
+ {
1844
+ "name": "percent_more_loyalty_cashback",
1845
+ "description": "Percent more loyalty cashback",
1846
+ "type": "RECORD",
1847
+ "fields": [{
1848
+ "mode": "NULLABLE",
1849
+ "name": "percent_more_loyalty_cashback",
1850
+ "description": "The percentage of additional loyalty cashback",
1851
+ "type": "NUMERIC"
1852
+ }]
1853
+ },
1854
+ {
1855
+ "name": "more_loyalty_cashback",
1856
+ "description": "More loyalty cashback",
1857
+ "type": "RECORD",
1858
+ "fields": [{
1859
+ "mode": "NULLABLE",
1860
+ "name": "loyalty_cashback",
1861
+ "description": "The additional loyalty cashback",
1862
+ "type": "NUMERIC"
1863
+ }]
1864
+ },
1865
+ {
1866
+ "name": "automatically_apply_coupon_codes",
1867
+ "description": "Additional coupon codes to automatically apply",
1868
+ "type": "RECORD",
1869
+ "fields": [{
1870
+ "mode": "REPEATED",
1871
+ "name": "coupon_codes",
1872
+ "description": "The coupon codes to automatically apply if this coupon is applied",
1873
+ "type": "RECORD",
1874
+ "fields": [{
1875
+ "mode": "NULLABLE",
1876
+ "name": "value",
1877
+ "type": "STRING"
1878
+ }]
1879
+ }]
1880
+ },
1881
+ {
1882
+ "mode": "NULLABLE",
1883
+ "name": "hide_from_customer",
1884
+ "description": "Hide coupon from customer during checkout. Often used when coupons are automatic discounting mechanisms.",
1885
+ "type": "BOOLEAN"
1886
+ },
1887
+ {
1888
+ "mode": "NULLABLE",
1889
+ "name": "skip_on_rebill",
1890
+ "description": "Skip this coupon when it is on a rebill of an auto order.",
1891
+ "type": "BOOLEAN"
1892
+ }
1893
+ ]