openapi: 3.2.0 info: title: Online Store Marketing API version: '1.0' description: Online Store API servers: - url: https://www.yoursite.com/api/v1 description: '' security: - X-AC-Auth-Token: [] tags: - name: Marketing paths: /discount_actions: get: summary: Discount Actions tags: - Marketing responses: '200': description: OK content: application/json: schema: type: object properties: total_count: type: integer discount_actions: type: - array items: $ref: '#/components/schemas/discount_actions' operationId: get-discount_actions description: Gets an array of discount actions. post: summary: Create a Discount Actions operationId: post-discount_actions responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/discount_actions' requestBody: content: application/json: schema: description: '' type: object properties: discount_method_id: type: integer is_exclusive: type: boolean is_strict: type: boolean is_active: type: boolean modifier_operation: type: string modifier_amount: type: string modifier_type: type: string modifier_target: type: string sort_order: type: integer examples: Example: value: discount_method_id: 4 is_exclusive: true is_strict: false is_active: false modifier_operation: subtract modifier_amount: '1' modifier_type: dollars modifier_target: total sort_order: 0 tags: - Marketing description: Creates a discount action. /discount_actions/{id}: parameters: - schema: type: string name: id in: path required: true description: The ID of the `discount_action` put: summary: Update a Discount Action operationId: put-discount_actions-id responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/discount_actions' tags: - Marketing description: Updates a discount action. requestBody: content: application/json: schema: $ref: '#/components/schemas/discount_actions' delete: summary: Delete a Discount Action operationId: delete-discount_actions-id responses: '200': description: OK '404': $ref: '#/components/responses/404' tags: - Marketing description: Deletes a discount action. /discount_methods: get: summary: Discount Methods tags: - Marketing responses: '200': description: OK content: application/json: schema: type: object properties: total_count: type: integer discount_methods: type: - array items: $ref: '#/components/schemas/discount_methods' operationId: get-discount_methods description: Gets an array of discount methods. post: summary: Create a Discount Method operationId: post-discount_methods responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/discount_methods' requestBody: content: application/json: schema: description: '' type: object x-examples: example-1: name: 15 off is_enabled: true is_strict: false use_once: false expires: false expires_at: '' starts_at: 7/7/2021 3:23:11 PM remaining_uses: null notes: '' is_free_shipping_discount: false properties: name: type: string is_enabled: type: boolean is_strict: type: boolean use_once: type: boolean expires: type: boolean expires_at: type: string starts_at: type: string remaining_uses: type: integer notes: type: string is_free_shipping_discount: type: boolean is_exclusive: type: boolean uses: type: integer exclude_child_items: type: boolean exclude_subscription_renew: type: boolean examples: Example: value: name: 15 off is_enabled: true is_strict: false use_once: false expires: false expires_at: '' starts_at: 7/7/2021 3:23:11 PM remaining_uses: 5 notes: '' is_free_shipping_discount: false is_exclusive: false uses: 10 exclude_child_items: false exclude_subscription_renew: true tags: - Marketing description: Creates a discount method. /discount_methods/{id}: parameters: - schema: type: string name: id in: path required: true description: The ID of the `discount_method` put: summary: Update a Discount Method operationId: put-discount_methods-id responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/discount_methods' tags: - Marketing description: Updates a discount method. requestBody: content: application/json: schema: $ref: '#/components/schemas/discount_methods' delete: summary: Delete a Discount Method operationId: delete-discount_methods-id responses: '200': description: OK '404': $ref: '#/components/responses/404' tags: - Marketing description: Deletes a discount method. /discount_rules: get: summary: Get Discount Rules tags: - Marketing responses: '200': description: OK content: application/json: schema: type: object properties: total_count: type: integer discount_rules: type: array items: $ref: '#/components/schemas/discount_rules' operationId: get-discount_rules description: 'Gets an array of discount rules. ' post: summary: Create a Discount Rule operationId: post-discount_rules responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/discount_rules' description: 'Creates a discount rule. ' tags: - Marketing requestBody: content: application/json: schema: description: '' type: object x-examples: example-1: discount_method_id: 41 type: coupon code target: Hello There operator_type: equal to target_quantity: 1 target_quantity_type: MinimumOf discount_action_id: null is_action_rule: false bogo_discount_buy_quantity: null bogo_discount_quantity: null bogo_max_use_per_order: null discount_from_high_to_low: false properties: discount_method_id: type: integer type: type: string target: type: string operator_type: type: string target_quantity: type: integer target_quantity_type: type: string discount_action_id: type: integer is_action_rule: type: boolean bogo_discount_buy_quantity: type: integer bogo_discount_quantity: type: integer bogo_max_use_per_order: type: integer discount_from_high_to_low: type: boolean required: - discount_method_id - type - target examples: Example: value: discount_method_id: 41 type: coupon code target: Hello There operator_type: equal to target_quantity: 1 target_quantity_type: MinimumOf discount_action_id: null is_action_rule: false bogo_discount_buy_quantity: null bogo_discount_quantity: null bogo_max_use_per_order: null discount_from_high_to_low: false /discount_rules/{id}: parameters: - schema: type: integer name: id in: path required: true description: The ID of the `discount_rule` delete: summary: Deletes a Discount Rule operationId: delete-discount_rules-id description: 'Deletes a discount rule. ' tags: - Marketing responses: '200': description: OK '404': $ref: '#/components/responses/404' put: summary: Update a Discount Rule operationId: put-discount_rules-id responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/discount_rules' description: Updates a discount rule. tags: - Marketing requestBody: content: application/json: schema: $ref: '#/components/schemas/discount_rules' /drips: get: summary: Get Drips tags: - Marketing responses: '200': description: OK content: application/json: schema: type: object properties: total_count: type: integer drips: type: array items: $ref: '#/components/schemas/drips' operationId: get-drips description: "Gets an array of drips. \n\nFor more information on drips, please see our Knowedge Base: [Drip Series Emailing](https://support.americommerce.com/hc/en-us/articles/201903290-Drip-Series-Email-Setup)" post: summary: Creates a Drip operationId: post-drips responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/drips' description: "Creates a drip. \n\nFor more information on drips, please see our Knowedge Base: [Drip Series Emailing](https://support.americommerce.com/hc/en-us/articles/201903290-Drip-Series-Email-Setup)" tags: - Marketing requestBody: content: application/json: schema: description: '' type: object x-examples: example-1: name: abandoned cart 2 is_enabled: true properties: name: type: string is_enabled: type: boolean examples: example-1: value: name: abandoned cart is_enabled: true /drips/{id}: parameters: - schema: type: string name: id in: path required: true description: The id of the `drip` put: summary: Update a Drip operationId: put-drips-id responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/drips' tags: - Marketing description: "Updates a drip. \n\nFor more information on drips, please see our Knowedge Base: [Drip Series Emailing](https://support.americommerce.com/hc/en-us/articles/201903290-Drip-Series-Email-Setup)" requestBody: content: application/json: schema: $ref: '#/components/schemas/drips' delete: summary: Delete a Drip operationId: delete-drips-id responses: '200': description: OK '404': $ref: '#/components/responses/404' tags: - Marketing description: 'Deletes a drip. For more information on drips, please see our Knowedge Base: [Drip Series Emailing](https://support.americommerce.com/hc/en-us/articles/201903290-Drip-Series-Email-Setup)' /email_templates: get: summary: Get Email Templates tags: - Marketing responses: '200': description: OK content: application/json: schema: type: object properties: total_count: type: integer email_templates: type: array items: $ref: '#/components/schemas/email_templates' operationId: get-email_templates description: Gets an array of email templates. post: summary: Create an Email Template operationId: post-email_templates responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/email_templates' tags: - Marketing description: Creates an email template. requestBody: content: application/json: schema: description: '' type: object x-examples: example-1: type: Order Confirmation body: "Thank you for your order! Please print this for your records.\n\n--------------------------------\nOrder #\t\t: ##ORDERID##\nEmail\t\t\t: ##CUSTOMEREMAIL##\nOrder Date\t\t: ##ORDERDATE##\nOrder Status\t: ##ORDERSTATUS##\nPayment Status\t: ##PAYMENTSTATUS##\nPayment Method\t: ##PAYMENTMETHOD##\n\n--------------------------------\nShipping Address\n--------------------------------\n##SHIPADDRESS##\n\n--------------------------------\nOrder Details\n##ORDERITEMS##\n--------------------------------\nSub-Total\t\t: ##SUBTOTAL##\nShipping Method\t: ##SHIPPINGMETHOD##\nShipping Amount\t: ##SHIPPING##\nEstimated Tax\t: ##TAX##\n##DISCOUNTSTRING## ##DISCOUNTTOTAL##\n--------------------------------\nTotal\t\t\t: ##TOTAL##\n--------------------------------" subject: 'Confirmation Order ###ORDERID##' from_name: '##STORENAME##' from_email: '##STOREEMAIL##' is_enabled: true admin_alert_header: "\nCustomer Test: ##IF[CustomerType= ]## Worked ##ELSE## didnt ##ENDIF##\n\n##IF[CustomerType=retail]## retail \n##IF[CustomerType=approval needed]## aprlvnad \n##IF[CustomerType=wholesale]## wholesale\n##IF[CustomerType=Drop Shipper]## drop shipper\n##ELSE##\nNew Customer\n###ENDIF##\n\n\n\n\nView this order: \n##ADMINORDERLINK##\n \n\n\nAVS Code: ##AVSCODE## \nSource: ##SOURCE## \nPPC Keyword: ##PPCKEYWORD## \nSearch Phrase: ##SEARCHPHRASE## \nCampaign Code: ##CAMPAIGNCODE##\n\n$$GIFTCERTIFICATEAMOUNT$$ \n##GIFTCERTIFICATEDELIVERYAREA##\n##GIFTCERTIFICATEDELIVERYAREAHTML##\n##GIFTCERTIFICATECODESCSV##\n\n\n##ADMINORDERWARNINGS##" admin_alert_subject: 'Order ID###ORDERID## - ##TOTAL##' is_admin_alert_enabled: true email_format: TEXT attach_invoice_pdf: false properties: type: type: string body: type: string subject: type: string from_name: type: string from_email: type: string is_enabled: type: boolean admin_alert_header: type: string admin_alert_subject: type: string is_admin_alert_enabled: type: boolean email_format: type: string attach_invoice_pdf: type: boolean email_category_id: type: integer admin_alert_email_override: type: string examples: Example: value: type: Order Confirmation body: "Thank you for your order! Please print this for your records.\n\n--------------------------------\nOrder #\t\t: ##ORDERID##\nEmail\t\t\t: ##CUSTOMEREMAIL##\nOrder Date\t\t: ##ORDERDATE##\nOrder Status\t: ##ORDERSTATUS##\nPayment Status\t: ##PAYMENTSTATUS##\nPayment Method\t: ##PAYMENTMETHOD##\n\n--------------------------------\nShipping Address\n--------------------------------\n##SHIPADDRESS##\n\n--------------------------------\nOrder Details\n##ORDERITEMS##\n--------------------------------\nSub-Total\t\t: ##SUBTOTAL##\nShipping Method\t: ##SHIPPINGMETHOD##\nShipping Amount\t: ##SHIPPING##\nEstimated Tax\t: ##TAX##\n##DISCOUNTSTRING## ##DISCOUNTTOTAL##\n--------------------------------\nTotal\t\t\t: ##TOTAL##\n--------------------------------" subject: 'Confirmation Order ###ORDERID##' from_name: '##STORENAME##' from_email: '##STOREEMAIL##' is_enabled: true admin_alert_header: "\nCustomer Test: ##IF[CustomerType= ]## Worked ##ELSE## didnt ##ENDIF##\n\n##IF[CustomerType=retail]## retail \n##IF[CustomerType=approval needed]## aprlvnad \n##IF[CustomerType=wholesale]## wholesale\n##IF[CustomerType=Drop Shipper]## drop shipper\n##ELSE##\nNew Customer\n###ENDIF##\n\n\n\n\nView this order: \n##ADMINORDERLINK##\n \n\n\nAVS Code: ##AVSCODE## \nSource: ##SOURCE## \nPPC Keyword: ##PPCKEYWORD## \nSearch Phrase: ##SEARCHPHRASE## \nCampaign Code: ##CAMPAIGNCODE##\n\n$$GIFTCERTIFICATEAMOUNT$$ \n##GIFTCERTIFICATEDELIVERYAREA##\n##GIFTCERTIFICATEDELIVERYAREAHTML##\n##GIFTCERTIFICATECODESCSV##\n\n\n##ADMINORDERWARNINGS##" admin_alert_subject: 'Order ID###ORDERID## - ##TOTAL##' is_admin_alert_enabled: true email_format: TEXT attach_invoice_pdf: false email_category_id: 1 admin_alert_email_override: coolGuy89@americommerce.com /email_templates/{id}: parameters: - schema: type: integer name: id in: path required: true description: The ID of the `email_template` put: summary: Update an Email Template operationId: put-email_templates-id responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/email_templates' tags: - Marketing description: Updates an email template. requestBody: content: application/json: schema: $ref: '#/components/schemas/email_templates' delete: summary: Delete an Email Template operationId: delete-email_templates-id responses: '200': description: OK '404': $ref: '#/components/responses/404' tags: - Marketing description: Deletes an email template. /gift_certificate_transactions: get: summary: Get Gift Certificate Transactions tags: - Marketing responses: '200': description: OK content: application/json: schema: type: object properties: total_count: type: integer gift_certificate_transactions: type: array items: $ref: '#/components/schemas/gift_certificate_transactions' operationId: get-gift_certificate_transactions description: Gets an array of gift certificate transactions. post: summary: Create a Gift Certificate Transaction operationId: post-gift_certificate_transactions responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/gift_certificate_transactions' tags: - Marketing description: Creates a gift certificate transactions requestBody: content: application/json: schema: description: '' type: object x-examples: example-1: gift_certificate_id: 28 action: SetActive amount: 0 is_pre_tax_discount: false order_id: 0 order_payment_id: null status: Approved properties: gift_certificate_id: type: integer action: type: string amount: type: number is_pre_tax_discount: type: boolean order_id: type: number order_payment_id: type: integer status: type: string examples: Example: value: gift_certificate_id: 28 action: SetActive amount: 0 is_pre_tax_discount: false order_id: 0 order_payment_id: null status: Approved /gift_certificate_transactions/{id}: parameters: - schema: type: integer name: id in: path required: true description: The ID of the `gift_certificate_transactions` put: summary: Update a Gift Certificate Transaction operationId: put-gift_certificate_transactions-id responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/gift_certificate_transactions' description: 'Updates a gift certificate transaction. ' tags: - Marketing requestBody: content: application/json: schema: $ref: '#/components/schemas/gift_certificate_transactions' delete: summary: Delete a Gift Certificate Transaction operationId: delete-gift_certificate_transactions-id responses: '200': description: OK '404': $ref: '#/components/responses/404' description: Deletes a gift certificate transaction. tags: - Marketing /gift_certificates: get: summary: Get Gift Certificates responses: '200': description: OK content: application/json: schema: type: object properties: total_count: type: integer gift_certificates: type: array items: $ref: '#/components/schemas/gift_certificates' operationId: get-gift_certificates tags: - Marketing description: Gets an array of gift certificates. post: summary: Creates a Gift Certificate operationId: post-gift_certificates responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/gift_certificates' tags: - Marketing description: Creates a gift certificate. requestBody: content: application/json: schema: description: '' type: object x-examples: example-1: id: 4 code: GC-NCC-67-M1VGS7 original_order_id: null from_customer_id: null recipient_email: '' recipient_name: '' recipient_shipping_address: '' gift_message: '' status: Active is_pre_tax_discount: false gift_certificate_type: free gc comments: '' expires_at: '1900-01-01T00:00:00-06:00' store_id: 1 current_amount: 10 original_amount: 10 customer_id: 16 expires: false order_item_id: null properties: code: type: string original_order_id: type: integer from_customer_id: type: integer recipient_email: type: string recipient_name: type: string recipient_shipping_address: type: string gift_message: type: string status: type: string is_pre_tax_discount: type: boolean gift_certificate_type: type: string comments: type: string expires_at: type: string store_id: type: integer current_amount: type: number original_amount: type: number customer_id: type: integer expires: type: boolean order_item_id: type: integer examples: Example: value: id: 4 code: GC-NCC-67-M1VGS7 original_order_id: null from_customer_id: null recipient_email: '' recipient_name: '' recipient_shipping_address: '' gift_message: '' status: Active is_pre_tax_discount: false gift_certificate_type: free gc comments: '' expires_at: '1900-01-01T00:00:00-06:00' store_id: 1 current_amount: 10.0 original_amount: 10.0 customer_id: 16 expires: false order_item_id: null /gift_certificates/{id}: parameters: - schema: type: string name: id in: path required: true description: The ID of the `gift_certificate` put: summary: Update a Gift Certificate operationId: put-gift_certificates-id responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/gift_certificates' tags: - Marketing description: Updates a gift certificate. requestBody: content: application/json: schema: $ref: '#/components/schemas/gift_certificates' delete: summary: Deletes a Gift Certificate operationId: delete-gift_certificates-id responses: '200': description: OK '404': $ref: '#/components/responses/404' tags: - Marketing description: 'Deletes a gift certificate. ' /mailing_lists: get: summary: Get Mailing Lists tags: - Marketing responses: '200': description: OK content: application/json: schema: type: object properties: total_count: type: integer mailing_lists: type: array items: $ref: '#/components/schemas/mailing_lists' operationId: get-mailing_lists description: Gets an array of mailing lists. post: summary: Create a Mailing List operationId: post-mailing_lists responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/mailing_lists' tags: - Marketing description: Creates a mailing list. requestBody: content: application/json: schema: description: '' type: object x-examples: example-1: type: Internal admin_list_name: InternalList public_list_name: '' store_id: 4 is_store_default: true auto_opt_in: false is_hidden: false url_based_subscribe_url: '' welcome_email_template_id: 0 properties: type: type: string admin_list_name: type: string public_list_name: type: string store_id: type: integer is_store_default: type: boolean auto_opt_in: type: boolean is_hidden: type: boolean url_based_subscribe_url: type: string welcome_email_template_id: type: integer required: - store_id examples: Example: value: type: Internal admin_list_name: InternalList public_list_name: '' store_id: 4 is_store_default: true auto_opt_in: false is_hidden: false url_based_subscribe_url: '' welcome_email_template_id: 0 /mailing_lists/{id}: parameters: - schema: type: string name: id in: path required: true description: The ID of the `mailing_list` put: summary: Update a Mailing List operationId: put-maling_lists-id responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/mailing_lists' tags: - Marketing description: Updates a mailing list. requestBody: content: application/json: schema: $ref: '#/components/schemas/mailing_lists' delete: summary: Delete a Mailing List operationId: delete-maling_lists-id responses: '200': description: OK '404': $ref: '#/components/responses/404' tags: - Marketing description: Deletes a mailing list. components: schemas: discount_methods: type: object properties: id: type: integer name: type: string is_enabled: type: boolean is_strict: type: boolean use_once: type: boolean expires: type: boolean expires_at: type: string updated_at: type: string created_at: type: string starts_at: type: string remaining_uses: type: integer notes: type: string is_free_shipping_discount: type: boolean is_exclusive: type: boolean uses: type: integer exclude_child_items: type: boolean exclude_subscription_renew: type: boolean discount_actions: type: object properties: id: type: integer discount_method_id: type: integer is_exclusive: type: boolean is_strict: type: boolean is_active: type: boolean modifier_operation: type: string modifier_amount: type: string modifier_type: type: string modifier_target: type: string sort_order: type: integer gift_certificates: type: object properties: id: type: integer code: type: string original_order_id: type: integer from_customer_id: type: integer recipient_email: type: string recipient_name: type: string recipient_shipping_address: type: string gift_message: type: string status: type: string is_pre_tax_discount: type: boolean gift_certificate_type: type: string comments: type: string created_at: type: string expires_at: type: string store_id: type: integer current_amount: type: integer original_amount: type: integer updated_at: type: string customer_id: type: integer expires: type: boolean order_item_id: type: integer email_templates: type: object properties: id: type: integer type: type: string body: type: string subject: type: string from_name: type: string from_email: type: string is_enabled: type: boolean admin_alert_header: type: string admin_alert_subject: type: string is_admin_alert_enabled: type: boolean email_format: type: string attach_invoice_pdf: type: boolean email_category_id: type: integer admin_alert_email_override: type: string mailing_lists: type: object properties: id: type: integer type: type: string admin_list_name: type: string public_list_name: type: string store_id: type: integer is_store_default: type: boolean auto_opt_in: type: boolean is_hidden: type: boolean url_based_subscribe_url: type: string updated_at: type: string created_at: type: string welcome_email_template_id: type: string gift_certificate_transactions: type: object properties: id: type: integer gift_certificate_id: type: integer action: type: string amount: type: integer is_pre_tax_discount: type: boolean order_id: type: integer order_payment_id: type: integer updated_at: type: string created_at: type: string status: type: string discount_rules: type: object properties: id: type: integer discount_method_id: type: integer type: type: string target: type: string updated_at: type: string created_at: type: string operator_type: type: string target_quantity: type: integer target_quantity_type: type: string discount_action_id: type: integer is_action_rule: type: boolean bogo_discount_buy_quantity: type: integer bogo_discount_quantity: type: integer bogo_max_use_per_order: type: integer discount_from_high_to_low: type: boolean drips: type: object properties: id: type: integer name: type: string is_enabled: type: boolean responses: '404': description: Resource Not Found content: application/json: schema: description: Not Found type: object x-examples: example-1: status_code: 404 message: Not Found details: No resource found properties: status_code: type: number message: type: string details: type: string examples: {} headers: {} securitySchemes: X-AC-Auth-Token: name: X-AC-Auth-Token type: apiKey in: header