{ "parameters": { "couponCode": { "name": "couponCode", "in": "formData", "description": "The coupon code representing a discount to be applied against the user's cart.", "required": true, "type": "string" }, "shippingOption": { "name": "shippingOption", "in": "formData", "description": "The shipping option selected by the user, that will be applied to the order. Must be in the same format as the shippingOption field outputted by /CheckoutShippingForm.", "required": true, "type": "string" }, "paymentFormCount": { "name": "paymentFormCount", "in": "formData", "description": "A number corresponding to the payment option being used for the order. Use /CheckoutPaymentForm to retrieve the paymentFormCount value of each payment option.", "required": true, "type": "integer" }, "purchaseOrderNumber": { "name": "purchaseOrderNumber", "in": "formData", "description": "Required by the PurchaseOrderPaymentProcessor. Indicates the purchase number order the user is using to pay for the order.", "required": false, "type": "string" }, "purchaseOrderNotes": { "name": "purchaseOrderNotes", "in": "formData", "description": "Used by the PurchaseOrderPaymentProcessor. Optional. Indicates any notes the user wishes to submit with the purchase order number.", "required": false, "type": "string" }, "creditCardName": { "name": "creditCardName", "in": "formData", "description": "Required by the BasicPaymentProcessor. The name listed on the credit card.", "required": false, "type": "string" }, "decryptedNumber": { "name": "decryptedNumber", "in": "formData", "description": "Required by the BasicPaymentProcessor and other payment processors that process credit cards. The credit card number used to pay for the order.", "required": false, "type": "string" }, "creditCardExpirationMonth": { "name": "creditCardExpirationMonth", "in": "formData", "description": "Required by the BasicPaymentProcessor and other payment processors that process credit cards. The month the card expires in the form of MM.", "required": false, "type": "string" }, "creditCardExpirationYear": { "name": "creditCardExpirationYear", "in": "formData", "description": "Required by the BasicPaymentProcessor and other payment processors that process credit cards. The year the card expires, in the form of YYYY (all four digits).", "required": false, "type": "string" }, "creditCardSecurityCode": { "name": "creditCardSecurityCode", "in": "formData", "description": "Required by the BasicPaymentProcessor and other payment processors that process credit cards if dictated under Payment Configuration -> Payment Settings. The security code on the back of the credit card.", "required": false, "type": "string" }, "creditCardType": { "name": "creditCardType", "in": "formData", "description": "Used by the BasicPaymentProcessor. Optional. The brand of credit card, eg., Visa, MasterCard, etc. This is derived from the decryptedNumber if not provided.", "required": false, "type": "string" }, "savePaymentInformation": { "name": "savePaymentInformation", "in": "formData", "description": "Used by the AuthorizeNetAIMProcessor. Optional. If true and the global 'Authorize.net Enable Customer Profiles' setting is also true, the system will create a customer profile and payment profile for the payment information with Authorize.net which can be reused for future payments.", "required": false, "type": "boolean" }, "paymentProfileID": { "name": "paymentProfileID", "in": "formData", "description": "Required by the AuthorizeNetAIMProcessor if no credit card information or Accept.js information is submitted. Corresponds to the 'paymentProfileID' of an Authorize.net payment profile under the Customer's Authorize.net profile, which will be used to charge the payment against.", "required": false, "type": "string" }, "acceptJsDataValue": { "name": "acceptJsDataValue", "in": "formData", "description": "Required by the AuthorizeNetAIMProcessor if no credit card information or paymentProfileID is submitted and the global 'Authorize.net Enable Accept.js' setting is true. Retrieved from a call to Accept.js and used in place of credit card information by the system to submit the payment transaction to Authorize.net.", "required": false, "type": "string" }, "acceptJsDataDesc": { "name": "acceptJsDataDesc", "in": "formData", "description": "Required by the AuthorizeNetAIMProcessor if no credit card information or paymentProfileID is submitted and the global 'Authorize.net Enable Accept.js' setting is true. Retrieved from a call to Accept.js and used in place of credit card information by the system to submit the payment transaction to Authorize.net.", "required": false, "type": "string" } }, "paths": { "/CheckoutSettings": { "get": { "summary": "CheckoutSettings", "description": "Outputs various useful server settings that can inform the client application on requirements that the server has for processing checkout requests.", "tags": [ "Public Operations" ], "responses": { "200": { "description": "CheckoutSettings", "schema": { "$ref": "#/definitions/WrappedCheckoutSettings" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/CheckoutCoupon": { "post": { "summary": "CheckoutCoupon", "description": "Allows the user to submit a coupon code for a discount to be applied to his cart. The jsonResult.orderDiscounts array is populated with the current discounts in effect for the order.", "tags": [ "Public Operations" ], "parameters": [ { "$ref": "#/parameters/couponCode" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" } ], "responses": { "200": { "description": "Cart", "schema": { "$ref": "public-cart.json.html#/definitions/WrappedOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/CheckoutDeclineLogin": { "get": { "summary": "CheckoutDeclineLogin", "description": "If the Force Login on Orders setting is false and the Invite Login Before Checkout setting is true, this action indicates the user has declined to log in and wants to checkout as a guest. Note: If the Invite Login Before Checkout setting is set, the user MUST hit this action in order to proceed through checkout.", "tags": [ "Public Operations" ], "responses": { "200": { "description": "Cart", "schema": { "$ref": "public-cart.json.html#/definitions/WrappedOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/CheckoutAddresses": { "post": { "summary": "CheckoutAddresses", "description": "Processes the billing and delivery address submitted for the cart during checkout. Which parameters are required and which are not are defined in the Orders -> Address Fields screen of the administrator. If the deliveryUseBilling parameter is true, the delivery address fields are not required. If the Address Book feature is enabled, a customerBillingAddressID may be submitted in place of the individual billing address fields, and a customerAddressID may be submitted in place of the individual delivery address fields.", "tags": [ "Public Operations" ], "parameters": [ { "name": "checkoutAddresses", "in": "body", "description": "The addresses to be associated with the order.", "required": true, "schema": { "$ref": "#/definitions/CheckoutAddresses" } }, { "$ref": "../swagger-spec.json#/parameters/csrfTokenQueryString" } ], "responses": { "200": { "description": "Cart", "schema": { "$ref": "public-cart.json.html#/definitions/WrappedOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/CheckoutShippingForm": { "get": { "summary": "CheckoutShippingForm", "description": "Retrieves available shipping options and prices for the user during checkout based on the current user's cart.", "tags": [ "Public Operations" ], "responses": { "200": { "description": "Shipping Options", "schema": { "$ref": "#/definitions/WrappedShippingOptions" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/CheckoutShipping": { "post": { "summary": "CheckoutShipping", "description": "Applies the selected shippingOption to the order, including processing tax if applicable and adding tax and shipping to the order total.", "tags": [ "Public Operations" ], "parameters": [ { "$ref": "#/parameters/shippingOption" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" } ], "responses": { "200": { "description": "Cart", "schema": { "$ref": "public-cart.json.html#/definitions/WrappedOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/CheckoutPaymentForm": { "get": { "summary": "CheckoutPaymentForm", "description": "Retrieves available payment options and their corresponding paymentFormCount values, which can be used to submit payment information to /CheckoutPayment.", "tags": [ "Public Operations" ], "responses": { "200": { "description": "Payment Options", "schema": { "$ref": "#/definitions/WrappedPaymentOptions" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/CheckoutPayment": { "post": { "summary": "CheckoutPayment", "description": "Submits payment information. Use /CheckoutPaymentForm to retrieve the paymentFormCount and include it in this request, corresponding to the type of payment option used. BasicPaymentProcessor: Submits standard credit card information to the system to use for processing the payment of the current order. CheckPaymentProcessor: Allows the user to indicate that he wishes to pay by check. PurchaseOrderPaymentProcessor: Allows the user to submit a purchase order to be used by the system for payment of the current order. Note: The payment options must be enabled in the Payment Configuration -> Payment Settings screen of the Administrator.", "tags": [ "Public Operations" ], "parameters": [ { "$ref": "#/parameters/paymentFormCount" }, { "$ref": "#/parameters/creditCardName" }, { "$ref": "#/parameters/creditCardType" }, { "$ref": "#/parameters/decryptedNumber" }, { "$ref": "#/parameters/creditCardSecurityCode" }, { "$ref": "#/parameters/creditCardExpirationMonth" }, { "$ref": "#/parameters/creditCardExpirationYear" }, { "$ref": "#/parameters/purchaseOrderNumber" }, { "$ref": "#/parameters/purchaseOrderNotes" }, { "$ref": "#/parameters/savePaymentInformation" }, { "$ref": "#/parameters/paymentProfileID" }, { "$ref": "#/parameters/acceptJsDataValue" }, { "$ref": "#/parameters/acceptJsDataDesc" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" } ], "responses": { "200": { "description": "Cart", "schema": { "$ref": "public-cart.json.html#/definitions/WrappedOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/CheckoutConfirm": { "get": { "summary": "CheckoutConfirm", "description": "Allows the user to confirm that the order should be completed by the system. If the Display Confirm Screen Before End of Checkout setting is set on the Orders -> Checkout Flow screen, this action is required before the order can be marked as completed in the system.", "tags": [ "Public Operations" ], "responses": { "200": { "description": "Cart", "schema": { "$ref": "public-cart.json.html#/definitions/WrappedOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } } }, "definitions": { "CheckoutAddresses": { "type": "object", "allOf": [ { "properties": { "customerAddressID": { "type": "string" }, "customerBillingAddressID": { "type": "string" }, "deliveryUseBilling": { "type": "boolean", "default": false }, "updateCustomer": { "type": "boolean", "default": true }, "emailerOptInApproval": { "type": "string", "default": "Yes" }, "addToAddressBook": { "type": "string" }, "addToBillingAddressBook": { "type": "string", "default": "Yes" } } }, { "$ref": "../swagger-spec.json#/definitions/BaseBillingAddress" }, { "$ref": "../swagger-spec.json#/definitions/BaseDeliveryAddress" } ] }, "WrappedShippingOptions": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "array", "items": { "$ref": "#/definitions/ShippingOption" } } } }, "ShippingOption": { "type": "object", "properties": { "shippingOption": { "type": "string", "description": "A string identifying the shipping option to the system. It should be used to populate the shippingOption parameter. It is a concatenation of the code and the processorClass." }, "name": { "type": "string", "description": "The name of this shipping option." }, "code": { "type": "string", "description": "The system code for this option." }, "processorClass": { "type": "string", "description": "A string identifying the Java class that will process this shipping option in the system." }, "deliveryDate": { "type": "string", "description": "The expected delivery date for the order if this shipping option is chosen. If maxDeliveryDate is also present, deliveryDate represents the fastest expected delivery date." }, "maxDeliveryDate": { "type": "string", "description": "With deliveryDate, reprents a range for the expected delivery date of the order if this shipping option is chosen. maxDeliveryDate is the latest the order is expected to arrive." }, "priceDouble": { "type": "number", "description": "The price of this shipping option (after any discounts)." }, "originalPriceDouble": { "type": "number", "description": "The original price of this shipping option before any discounts are applied." }, "discounts": { "type": "array", "description": "The names of any discounts applicable for this shipping option.", "items": { "type": "string" } } } }, "WrappedPaymentOptions": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "array", "items": { "$ref": "#/definitions/PaymentOption" } } } }, "PaymentOption": { "type": "object", "properties": { "paymentFormCount": { "type": "integer", "description": "An integer identifying the payment option in the system. It should be used to populate the paymentFormCount parameter when submitting payment information to /CheckoutPayment." }, "processorClass": { "type": "string", "description": "A string identifying the Java class that will process this payment option in the system." }, "description": { "type": "string", "description": "A description of the payment option." } } }, "ErrorsAndMessages": { "type": "object", "required": [ "success" ], "properties": { "success": { "type": "boolean", "required": true }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object" } } }, "WrappedCheckoutSettings": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "properties": { "billingPrompt": { "type": "string", "description": "The list of billing fields the store is configured to prompt the user for." }, "deliveryPrompt": { "type": "string", "description": "The list of delivery fields the store is configured to prompt the user for." }, "billingRequired": { "type": "string", "description": "The list of billing fields the store is configured to require before processing checkout addresses." }, "deliveryRequired": { "type": "string", "description": "The list of delivery fields the store is configured to require before processing checkout addresses." }, "billingValidated": { "type": "string", "description": "The list of billing fields the store is configured to validate before processing checkout addresses." }, "deliveryValidated": { "type": "string", "description": "The list of delivery fields the store is configured to validate before processing checkout addresses." }, "shippingRequired": { "type": "boolean", "description": "Is a shipping selection required to complete an order?" }, "isPaymentRequired": { "type": "boolean", "description": "Is a valid payment required to complete an order?" }, "securityCodeRequired": { "type": "boolean", "description": "Is a security code required for credit card payments?" }, "forceLogin": { "type": "boolean", "description": "Must the customer be registered and logged in in order to complete an order?" }, "inviteLoginBeforeCheckout": { "type": "boolean", "description": "If forceLogin is false, must the user specifically decline to login (via /CheckoutDeclineLogin) in order to complete an order?" }, "displayCheckoutConfirm": { "type": "boolean", "description": "Must the customer confirm the order (via /CheckoutConfirm) before it is completed?" }, "endSessionOnOrderCompletion": { "type": "boolean", "description": "Is user session deleted by the server after an order is placed?" } } } } } } }