{ "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" } }, "paths": { "/orderOverview": { "get": { "summary": "Order Overview", "description": "View the details of an Order record and its dependencies, such as deliveries, items, discounts, etc.", "tags": [ "CRUD Operations", "View 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" } } } } }, "/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": [ "CRUD Operations", "View 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": [ "CRUD Operations", "Delete 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 a 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": [ "CRUD Operations", "Edit 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": [ "CRUD Operations", "Add 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": [ "CRUD Operations", "List 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/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": { "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" } } } } } } }