{ "parameters": { "orderID": { "name": "orderID", "in": "query", "description": "Unique ID for the record. This or orderNumber is required.", "required": false, "type": "integer" }, "orderIDRequired": { "name": "orderID", "in": "query", "description": "Unique ID for the record.", "required": true, "type": "integer" }, "orderNumberForViewAndEdit": { "name": "orderNumber", "in": "query", "description": "Unique orderNumber for the order. This or the ID is required.", "required": false, "type": "integer" }, "customerID": { "name": "customerID", "in": "query", "description": "The parent customerID. The resulting list is retricted to Orders associated with this Customer. Note: the parentIDField parameter must also be set to 'customerID'.", "required": false, "type": "integer" }, "orderIDForm": { "name": "orderID", "in": "formData", "description": "Unique ID for the record.", "required": false, "type": "integer" }, "customerIDForAddItem": { "name": "customerID", "in": "formData", "description": "If an orderID or orderNumber is not provided, a new order will be created. In this case, if a customerID or userName is provided, the new order will be associated with the corresponding Customer.", "required": false, "type": "integer" }, "userNameForAddItem": { "name": "userName", "in": "formData", "description": "If an orderID or orderNumber is not provided, a new order will be created. In this case, if a customerID or userName is provided, the new order will be associated with the corresponding Customer.", "required": false, "type": "integer" } }, "paths": { "/orderOverview": { "get": { "summary": "Order Overview", "description": "View the details of an Order record and its dependencies, such as deliveries, items, discounts, etc.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "$ref": "#/parameters/orderID" }, { "$ref": "#/parameters/orderNumberForViewAndEdit" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Order object", "schema": { "$ref": "#/definitions/WrappedOrderOverview" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/addItem": { "post": { "summary": "Add Item to Order", "description": "Add an item to an order, using the same back end functions as /public/CartAdd. If no orderID or orderNumber is provided, a new Order is created.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "$ref": "#/parameters/orderIDForm" }, { "$ref": "#/parameters/customerIDForAddItem" }, { "$ref": "#/parameters/userNameForAddItem" }, { "$ref": "public-cart.json.html#/parameters/orderProductCodes" }, { "$ref": "public-cart.json.html#/parameters/orderProductQuantities" }, { "$ref": "public-cart.json.html#/parameters/productCode|attributeCode" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Order object", "schema": { "$ref": "#/definitions/WrappedOrderOverview" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/addCoupon": { "post": { "summary": "Add Coupon", "description": "Add a coupon to an order, using the same back end functions as /public/CheckoutCoupon.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "$ref": "#/parameters/orderIDForm" }, { "$ref": "public-checkout.json.html#/parameters/couponCode" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Order object", "schema": { "$ref": "#/definitions/WrappedOrderOverview" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/editOrderAddresses": { "post": { "summary": "Edit Order Addresses", "description": "Edits an order's billing and delivery addresses, using the same back end functions as /public/CheckoutAddresses.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "name": "checkoutAddresses", "in": "body", "description": "The addresses to be associated with the order.", "required": true, "schema": { "$ref": "#/definitions/EditOrderAddresses" } }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Order object", "schema": { "$ref": "#/definitions/WrappedOrderOverview" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/processPayment": { "post": { "summary": "Process Payment", "description": "Processes the payment for an order, using the same back end functions as /public/CheckoutPayment.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "$ref": "#/parameters/orderIDForm" }, { "$ref": "public-checkout.json.html#/parameters/paymentFormCount" }, { "$ref": "public-checkout.json.html#/parameters/creditCardName" }, { "$ref": "public-checkout.json.html#/parameters/creditCardType" }, { "$ref": "public-checkout.json.html#/parameters/decryptedNumber" }, { "$ref": "public-checkout.json.html#/parameters/creditCardSecurityCode" }, { "$ref": "public-checkout.json.html#/parameters/creditCardExpirationMonth" }, { "$ref": "public-checkout.json.html#/parameters/creditCardExpirationYear" }, { "$ref": "public-checkout.json.html#/parameters/purchaseOrderNumber" }, { "$ref": "public-checkout.json.html#/parameters/purchaseOrderNotes" }, { "$ref": "public-checkout.json.html#/parameters/savePaymentInformation" }, { "$ref": "public-checkout.json.html#/parameters/paymentProfileID" }, { "$ref": "public-checkout.json.html#/parameters/acceptJsDataValue" }, { "$ref": "public-checkout.json.html#/parameters/acceptJsDataDesc" }, { "$ref": "../swagger-spec.json#/parameters/Content-Type" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Order object", "schema": { "$ref": "#/definitions/WrappedOrderOverview" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/order": { "get": { "summary": "Order View", "description": "View the details of an Order record. This only returns the Order object and associated Customer object, not any deliveries, items, discounts, etc. To retrieve the order an all of its dependencies, use /orderOverview.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "$ref": "#/parameters/orderID" }, { "$ref": "#/parameters/orderNumberForViewAndEdit" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Order object", "schema": { "$ref": "#/definitions/WrappedFullOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "delete": { "summary": "Order Delete", "description": "Delete an Order record. Please use with caution: deleting an order also deletes all of its dependencies, such as deliveries, items, discounts, etc.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "$ref": "#/parameters/orderIDRequired" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/WrappedFullOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "patch": { "summary": "Order Edit", "description": "Edits an Order record. Note: This is a low-level interface to the order. Adjusting the values through this API call will not cause the system to automatically recalculate the order's tax, shipping, or other totals.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "name": "order", "in": "body", "description": "The order to be edited. Either the orderID or orderNumber must be provided.", "required": true, "schema": { "$ref": "#/definitions/FullOrder" } }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Order object", "schema": { "$ref": "#/definitions/WrappedFullOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "post": { "summary": "Order Add", "description": "Adds an Order record.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "name": "order", "in": "body", "description": "The order to be added.", "required": true, "schema": { "$ref": "#/definitions/FullBaseOrder" } }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Order object", "schema": { "$ref": "#/definitions/WrappedFullOrder" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/order/list": { "get": { "summary": "Order List", "description": "View a list of orders.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "$ref": "../swagger-spec.json#/parameters/itemsPerPage" }, { "$ref": "../swagger-spec.json#/parameters/firstRow" }, { "$ref": "../swagger-spec.json#/parameters/sortByString" }, { "$ref": "../swagger-spec.json#/parameters/sortAscOrDesc" }, { "$ref": "../swagger-spec.json#/parameters/searchString" }, { "$ref": "../swagger-spec.json#/parameters/parentIDField" }, { "$ref": "#/parameters/customerID" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Order List", "schema": { "$ref": "#/definitions/WrappedFullOrderList" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } } }, "definitions": { "EditOrderAddresses": { "type": "object", "allOf": [ { "properties": { "orderID": { "type": "integer", "description": "Unique ID for the record.", "required": true } } }, { "$ref": "public-checkout.json.html#/definitions/CheckoutAddresses" } ] }, "FullBaseOrder": { "type": "object", "allOf": [ { "properties": { "quantity": { "type": "integer" }, "subtotal": { "type": "number" }, "shippingMethod": { "type": "string" }, "shipping": { "type": "number" }, "taxableSubtotal": { "type": "number", "description": "The portion of the subtotal that is taxable, ie associated with order items whose isTaxed flag is true." }, "tax": { "type": "number" }, "total": { "type": "number" }, "created": { "type": "string", "description": "The date/time the order was first created." }, "lastModified": { "type": "string", "description": "The date/time the order was last modified." }, "completed": { "type": "string", "description": "Only populated if the order is complete. The date/time it was completed." }, "orderNumber": { "type": "integer", "description": "Only populated if the order is complete. The order number assiged by the server to the order." }, "trackingNumber": { "type": "string", "description": "Only populated if the order is complete. The tracking number for the shipment for the order, if available." }, "status": { "type": "string", "description": "Only populated if the order is complete. Received is the value for recently-placed orders." }, "statusDetails": { "type": "string", "description": "Only populated if the order is complete." }, "customerID": { "type": "integer", "description": "Unique identifier representing the customer associated with this order, if any." }, "userName": { "type": "string", "description": "The user name of the customer associated with this order, if any." }, "paymentProfileID": { "type": "string", "description": "Populated with the third-party identifier of of the profile used to pay for this order." }, "extra1": { "description": "Any extra, or custom information associated with this order.", "type": "string", "maxLength": 255 }, "extra2": { "description": "Any extra, or custom information associated with this order.", "type": "string", "maxLength": 255 }, "extra3": { "description": "Any extra, or custom information associated with this order.", "type": "string", "maxLength": 255 }, "extra4": { "description": "Any extra, or custom information associated with this order.", "type": "string", "maxLength": 255 }, "extra5": { "description": "Any extra, or custom information associated with this order.", "type": "string", "maxLength": 255 }, "notes": { "description": "Any notes corresponding to this order.", "type": "string" } } }, {"$ref": "../swagger-spec.json#/definitions/BaseAddress"} ] }, "FullOrder": { "type": "object", "allOf": [ { "properties": { "orderID": { "type": "integer", "description": "Unique identifier representing a specific order. This or the orderNumber is required." }, "formCustomerID": { "type": "integer", "description": "Use this field if the customer the order is associated with needs to change. Populate it with the customerID of the new customer. Note: the customerID property is ignored when editing an order. Use this instead." } } }, { "$ref": "#/definitions/FullBaseOrder" } ] }, "OrderOverview": { "type": "object", "allOf": [ { "properties": { "orderID": { "type": "integer", "description": "Unique identifier representing a specific order. This or the orderNumber is required." } } }, { "$ref": "public-cart.json.html#/definitions/Order" } ] }, "WrappedOrderOverview": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "$ref": "#/definitions/OrderOverview" } } }, "WrappedFullOrder": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "$ref": "#/definitions/FullOrder" } } }, "WrappedFullOrderList": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "properties": { "itemCollection": { "type": "array", "description": "The list of items being requested that match the criteria, limited to the number of itemsPerPage.", "items": { "$ref": "#/definitions/FullOrder" } }, "itemCount": { "description": "The total number of items matching the criteria. This value may used to compose paging parameters.", "type": "integer" } } } } } } }