{ "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" }, "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": { "/Register": { "post": { "summary": "Register", "description": "Allows the user to register a new customer account. If successful, the customer will also be logged in.", "tags": [ "Public Operations", "Customer 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": [ "Public Operations", "Customer 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": [ "Public Operations", "Customer 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": [ "Public Operations", "Customer 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" } } } } }, "/AccountAddresses": { "get": { "summary": "Customer Account Addresses", "description": "Retrieves profile and address information for the current logged-in customer.", "tags": [ "Public Operations", "Customer 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": [ "Public Operations", "Customer 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": [ "Public Operations", "Customer 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": [ "Public Operations", "Customer 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": [ "Public Operations", "Customer 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": [ "Public Operations", "Customer 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": [ "Public Operations", "Customer 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" } } } } } }, "definitions": { "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" } } }, "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" } } } } }