{ "parameters": { "userName": { "name": "userName", "in": "formData", "description": "The user name/email address for the account.", "required": true, "type": "string" }, "decryptedPassword": { "name": "decryptedPassword", "in": "formData", "description": "The password for the account.", "required": true, "type": "string" }, "confirmPassword": { "name": "confirmPassword", "in": "formData", "description": "The password for the account, for confirmation purposes.", "required": true, "type": "string" }, "passwordToken": { "name": "passwordToken", "in": "formData", "description": "The reset token sent out when a customer want to reset his password.", "required": true, "type": "string" }, "g-recaptcha-response": { "name": "g-recaptcha-response", "in": "formData", "description": "The g-recaptcha-response value provided by Google reCAPTCHA integration. Required if reCAPTCHA verification is set up.", "required": false, "type": "string" }, "emailerOptInApproval": { "name": "emailerOptInApproval", "in": "formData", "description": "If this parameter is not present or it is present and equal to 'Yes', it indicates that that user has opted in to be sent promotional emails.", "required": false, "type": "string", "default": "Yes" }, "rememberMe": { "name": "rememberMe", "in": "formData", "description": "If this parameter is present and anything other than 'false', a persistant cookie is stored with the customer's browser and he will be automatically logged in in future sessions.", "required": false, "type": "string" }, "customerWishListID": { "name": "customerWishListID", "in": "formData", "description": "The customerWishListID of the customer's wish list for the request. If adding a product and the value is 0, the product will be added to the customer's first wish list, or, if there are no wish lists, a new wish list will be created and the product added to it.", "required": true, "type": "integer", "default": "0" }, "customerWishListName": { "name": "customerWishListName", "in": "formData", "description": "The name of the customer's wish list for the request. If adding a product and the value of the customerWishListID parameter is 0, the user can identify the wish list by name using this parameter.", "required": false, "type": "string", "default": "" }, "customerWishListProductID": { "name": "customerWishListProductID", "in": "formData", "description": "The customerWishListProductID of the product in the customer's wish list.", "required": true, "type": "integer" }, "productCode": { "name": "productCode", "in": "formData", "description": "The code of the product to be added to the wish list.", "required": true, "type": "string" } }, "paths": { "/CustomerAccountSettings": { "get": { "summary": "CustomerAccountSettings", "description": "Outputs various useful server settings that can inform the client application on requirements that the server has for processing customer accounts.", "tags": [ "All Public Operations", "Customer Account Operations" ], "responses": { "200": { "description": "CustomerAccountSettings", "schema": { "$ref": "#/definitions/WrappedCustomerAccountSettings" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/Register": { "post": { "summary": "Register", "description": "Allows the user to register a new customer account. If successful, the customer will also be logged in.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "$ref": "#/parameters/userName" }, { "$ref": "#/parameters/decryptedPassword" }, { "$ref": "#/parameters/confirmPassword" }, { "$ref": "../swagger-spec.json#/parameters/csrfToken" }, { "$ref": "#/parameters/emailerOptInApproval" }, { "$ref": "#/parameters/g-recaptcha-response" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" } ], "responses": { "200": { "description": "Customer", "schema": { "$ref": "#/definitions/WrappedCustomer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/Login": { "post": { "summary": "Login", "description": "Logs the customer into his account.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "$ref": "#/parameters/userName" }, { "$ref": "#/parameters/decryptedPassword" }, { "$ref": "../swagger-spec.json#/parameters/csrfToken" }, { "$ref": "#/parameters/rememberMe" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" } ], "responses": { "200": { "description": "Customer", "schema": { "$ref": "#/definitions/WrappedCustomer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/Logout": { "get": { "summary": "Logout", "description": "Logs out the current logged-in customer.", "tags": [ "All Public Operations", "Customer Account Operations" ], "responses": { "200": { "description": "Customer", "schema": { "$ref": "#/definitions/WrappedCustomer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/LostPassword": { "post": { "summary": "Lost Password", "description": "Requests that instructions be sent to reset a lost password.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "$ref": "#/parameters/userName" }, { "$ref": "../swagger-spec.json#/parameters/csrfToken" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" } ], "responses": { "200": { "description": "Customer", "schema": { "$ref": "#/definitions/WrappedCustomer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/CompleteResetPassword": { "post": { "summary": "Reset Password", "description": "Resets a customer's password using a reset token that was emailed following the /LostPassword API call.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "$ref": "#/parameters/passwordToken" }, { "$ref": "#/parameters/decryptedPassword" }, { "$ref": "#/parameters/confirmPassword" }, { "$ref": "../swagger-spec.json#/parameters/csrfToken" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" } ], "responses": { "200": { "description": "Customer", "schema": { "$ref": "#/definitions/WrappedCustomer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/AccountAddresses": { "get": { "summary": "Customer Account Addresses", "description": "Retrieves profile and address information for the current logged-in customer.", "tags": [ "All Public Operations", "Customer Account Operations" ], "responses": { "200": { "description": "Customer", "schema": { "$ref": "#/definitions/WrappedCustomer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/UpdatePassword": { "post": { "summary": "Update Password", "description": "Allows the user to update his password and/or user name.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "$ref": "#/parameters/userName" }, { "$ref": "#/parameters/decryptedPassword" }, { "$ref": "#/parameters/confirmPassword" }, { "$ref": "../swagger-spec.json#/parameters/csrfToken" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" } ], "responses": { "200": { "description": "Customer", "schema": { "$ref": "#/definitions/WrappedCustomer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/AccountWishLists": { "get": { "summary": "Customer Account Wish Lists", "description": "Retrieves wish list information for the current logged-in customer.", "tags": [ "All Public Operations", "Customer Account Operations" ], "responses": { "200": { "description": "WishLists", "schema": { "$ref": "#/definitions/WrappedWishLists" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/WishListAddProduct": { "post": { "summary": "Customer Wish List Add Product", "description": "Adds a product to a current logged-in customer's wish list. Optionally creates a new wish list.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "$ref": "#/parameters/customerWishListID" }, { "$ref": "#/parameters/customerWishListName" }, { "$ref": "#/parameters/productCode" } ], "responses": { "200": { "description": "WishList", "schema": { "$ref": "#/definitions/WrappedWishList" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/WishListDeleteProduct": { "post": { "summary": "Customer Wish List Delete Product", "description": "Deletes a product from a current logged-in customer's wish list.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "$ref": "#/parameters/customerWishListID" }, { "$ref": "#/parameters/customerWishListName" }, { "$ref": "#/parameters/customerWishListProductID" } ], "responses": { "200": { "description": "ErrorsAndMessages", "schema": { "$ref": "#/definitions/ErrorsAndMessages" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/AddAddressBookAddressAjax": { "post": { "summary": "Add Billing Address", "description": "Adds a billing address for the current logged-in customer's account.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "name": "billingAddress", "in": "body", "description": "The address to be added. The customerAddressID is not required and will be ignored by the server.", "required": true, "schema": { "$ref": "#/definitions/CustomerBillingAddress" } }, { "$ref": "../swagger-spec.json#/parameters/csrfTokenQueryString" } ], "responses": { "200": { "description": "Customer", "schema": { "$ref": "#/definitions/WrappedCustomer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/EditAddressBookAddressAjax": { "patch": { "summary": "Edit Billing Address", "description": "Updates the billing address for the current logged-in customer's account.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "name": "billingAddress", "in": "body", "description": "The address to be edited. The customerAddressID must be provided.", "required": true, "schema": { "$ref": "#/definitions/CustomerBillingAddress" } }, { "$ref": "../swagger-spec.json#/parameters/csrfTokenQueryString" } ], "responses": { "200": { "description": "Customer", "schema": { "$ref": "#/definitions/WrappedCustomer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/AccountHistory": { "get": { "summary": "Customer Account Order History", "description": "Retrieves a list of previous orders for the current logged-in customer.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "name": "startingItem", "in": "query", "description": "The ordinal number of the first order to output. If the orderHistoryPageSize is set to 10, for example, set startingItem to 10 to display the second page of orders.", "type": "integer" } ], "responses": { "200": { "description": "OrderHistory", "schema": { "$ref": "#/definitions/WrappedOrderList" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/OrderDetails": { "get": { "summary": "Customer Account Order Details", "description": "Retrieves the details for a single order the current logged in customer has previously placed.", "tags": [ "All Public Operations", "Customer Account Operations" ], "parameters": [ { "name": "orderNumber", "in": "query", "description": "The orderNumber of the order to be retrieved.", "required": true, "type": "integer" } ], "responses": { "200": { "description": "Order", "schema": { "$ref": "public-cart.json.html#/definitions/WrappedOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } } }, "definitions": { "WrappedCustomerAccountSettings": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "properties": { "allowAddressBook": { "type": "boolean", "description": "If true, customers will be able to create multiple delivery addresses in their account and choose any one of them when placing an order." }, "allowCustomerWishLists": { "type": "boolean", "description": "If true, customers will be able to create wish lists. May be overridden by the custom setting allowCustomerWishLists = false on individual products." }, "allowReorders": { "type": "boolean", "description": "If true, logged in customers will see the option to reorder a previously placed order from their order history (payment info must always be reentered)." }, "allowSavedCarts": { "type": "boolean", "description": "If true, logged in customers will see the option to save a cart in their account." }, "displayAccountDownloadsLink": { "type": "boolean", "description": "If set to yes, the Downloads tab in the customer account area should be shown, where the customer can access virtual (downloadable) products he has purchased." }, "enableProductReviews": { "type": "boolean", "description": "If set to yes, customers will be able to view reviews made by other customers and submit their own reviews." }, "keepUserNameAndEmailInSync": { "type": "boolean", "description": "If true, the system will use the billing email address as the user name for all customers." }, "orderHistoryPageSize": { "type": "integer", "description": "The number of orders the UI should display per page on the account order history screen." }, "minimumPasswordLength": { "type": "integer", "description": "The minimum length in characters that the system allows for new or changing customer account passwords. (PCI 3.2: 7)." }, "passwordRequiresLetterAndNumberCustomer": { "type": "boolean", "description": "If yes, new customer passwords must contain at least one letter and one number. (PCI 3.2: yes)." }, "useAdvancedLostPassword": { "type": "boolean", "description": "If yes, the system will send the user a link with a temporary token via email. They must click the link and then can change their password on the form." } } } } }, "WrappedCustomer": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "$ref": "#/definitions/Customer" } } }, "Customer": { "type": "object", "allOf": [ { "required": [ "userName" ], "properties": { "userName": { "type": "string" }, "customerAddresses": { "type": "array", "description": "An object representing the delivery addresses in the customer's account.", "items": { "$ref": "#/definitions/CustomerAddress" } } } }, { "$ref": "../swagger-spec.json#/definitions/BaseAddress" } ] }, "CustomerAddress": { "type": "object", "allOf": [ { "properties": { "customerAddressID": { "type": "integer" }, "isDefault": { "type": "boolean" }, "isBilling": { "type": "boolean" } } }, { "$ref": "../swagger-spec.json#/definitions/BaseAddress" } ] }, "CustomerBillingAddress": { "type": "object", "allOf": [ { "properties": { "customerAddressID": { "type": "integer" }, "isDefault": { "type": "boolean" }, "isBilling": { "type": "boolean", "default": true, "required": true } } }, { "$ref": "../swagger-spec.json#/definitions/BaseBillingAddress" } ] }, "WrappedWishLists": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "array", "items": { "$ref": "#/definitions/WishList" } } } }, "WrappedWishList": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "$ref": "#/definitions/WishList" } } }, "WishList": { "type": "object", "properties": { "customerWishListID": { "description": "This wish list's id.", "type": "integer" }, "name": { "type": "string", "description": "The name of the wish list." }, "description": { "type": "string", "description": "The description of the wish list." }, "customerWishListProducts": { "type": "array", "items": { "$ref": "#/definitions/WishListProduct" } } } }, "WishListProduct": { "type": "object", "properties": { "customerWishListProductID": { "description": "This wish list product's id.", "type": "integer" }, "product": { "type": "object", "$ref": "product.json.html#/definitions/Product" } } }, "WrappedOrderList": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "array", "items": { "$ref": "public-cart.json.html#/definitions/Order" } } } }, "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" } } } } }