{ "parameters": { "skuID": { "name": "skuID", "in": "query", "description": "Unique ID for the record. This or skuNumber is required.", "required": false, "type": "integer" }, "skuIDRequired": { "name": "skuID", "in": "query", "description": "Unique ID for the record.", "required": true, "type": "integer" }, "skuNumberForViewAndEdit": { "name": "skuNumber", "in": "query", "description": "Unique code for the record. This or the ID is required.", "required": false, "type": "string" }, "productID": { "name": "productID", "in": "query", "description": "The parent productID. The resulting list is retricted to SKUs assigned to this Product.", "required": false, "type": "integer" }, "discountID": { "name": "discountID", "in": "query", "description": "The parent discountID. The resulting list is retricted to SKUs assigned to this Discount.", "required": false, "type": "integer" }, "shippingRuleID": { "name": "shippingRuleID", "in": "query", "description": "The parent shippingRuleID. The resulting list is retricted to SKUs assigned to this ShippingRule.", "required": false, "type": "integer" } }, "paths": { "/sku": { "get": { "summary": "SKU View", "description": "View the details of a SKU record.", "tags": [ "Administrative Operations" ], "parameters": [ { "$ref": "#/parameters/skuID" }, { "$ref": "#/parameters/skuNumberForViewAndEdit" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "SKU object", "schema": { "$ref": "#/definitions/WrappedSKU" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "delete": { "summary": "SKU Delete", "description": "Delete a SKU record.", "tags": [ "Administrative Operations" ], "parameters": [ { "$ref": "#/parameters/skuIDRequired" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/WrappedSKU" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "patch": { "summary": "SKU Edit", "description": "Edits a SKU record.", "tags": [ "Administrative Operations" ], "parameters": [ { "name": "sku", "in": "body", "description": "The SKU to be edited. Either the skuID or skuNumber must be provided.", "required": true, "schema": { "$ref": "#/definitions/SKU" } }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "SKU object", "schema": { "$ref": "#/definitions/WrappedSKU" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "post": { "summary": "SKU Add", "description": "Adds a SKU record.", "tags": [ "Administrative Operations" ], "parameters": [ { "name": "sku", "in": "body", "description": "The sku to be added.", "required": true, "schema": { "$ref": "#/definitions/NewSKU" } }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "SKU object", "schema": { "$ref": "#/definitions/WrappedSKU" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/sku/list": { "get": { "summary": "SKU List", "description": "View a list of SKUs.", "tags": [ "Administrative 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": "../swagger-spec.json#/parameters/assignments" }, { "$ref": "#/parameters/productID" }, { "$ref": "#/parameters/discountID" }, { "$ref": "#/parameters/shippingRuleID" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "SKU List", "schema": { "$ref": "#/definitions/WrappedSKUList" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/sku/assign": { "patch": { "summary": "SKU Assign", "description": "Assign or unassign a SKU to a parent", "tags": [ "Administrative Operations" ], "parameters": [ { "$ref": "../swagger-spec.json#/parameters/assigned" }, { "$ref": "../swagger-spec.json#/parameters/parentIDFieldRequired" }, { "$ref": "#/parameters/discountID" }, { "$ref": "#/parameters/shippingRuleID" }, { "$ref": "#/parameters/skuIDRequired" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "SKU List", "schema": { "$ref": "#/definitions/WrappedSKUList" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } } }, "definitions": { "BaseSKU": { "type": "object", "properties": { "productID": { "description": "The productID of the product associated with this SKU.", "type": "integer", "default": 0 }, "attributeOption1": { "description": "For tracking inventory at the attribute/option level. The first attribute/option this SKU is associated with. Enter as attributeID|optionID.", "type": "integer", "default": 0 }, "attributeOption2": { "description": "For tracking inventory at the attribute/option level.The second attribute/option this SKU is associated with. Enter as attributeID|optionID.", "type": "integer", "default": 0 }, "attributeOption3": { "description": "For tracking inventory at the attribute/option level.The third attribute/option this SKU is associated with. Enter as attributeID|optionID.", "type": "integer", "default": 0 }, "attributeOption4": { "description": "For tracking inventory at the attribute/option level.The fourth attribute/option this SKU is associated with. Enter as attributeID|optionID.", "type": "integer", "default": 0 }, "attributeOption5": { "description": "For tracking inventory at the attribute/option level.The fifth attribute/option this SKU is associated with. Enter as attributeID|optionID.", "type": "integer", "default": 0 }, "skuMessage": { "description": "A message for this SKU, as displayed to customers next to this SKU on the product page.", "type": "string", "maxLength": 255 }, "trackInventory": { "description": "If false, this SKU will not be used to track inventory and its inventory level will not be used. This SKU may still be used to associate discounts with it.", "type": "boolean", "default": false }, "inventoryLevel": { "description": "This SKU's current inventory level.", "type": "integer", "default": 0 }, "extra1": { "description": "Any extra, or custom information associated with this SKU.", "type": "string", "maxLength": 255 }, "extra2": { "description": "Any extra, or custom information associated with this SKU.", "type": "string", "maxLength": 255 }, "extra3": { "description": "Any extra, or custom information associated with this SKU.", "type": "string", "maxLength": 255 }, "notes": { "description": "Notes attached to this SKU. (Not displayed to customers by default.)", "type": "string" } } }, "NewSKU": { "type": "object", "allOf": [ { "required": [ "skuName" ], "properties": { "skuName": { "description": "A name for this SKU, as displayed to customers next to this SKU on the product page.", "type": "string", "maxLength": 255 }, "skuNumber": { "description": "A unique code for this SKU, used by the system to identify it. (No spaces, commas, or other unsafe characters. Pipe characters or equals signs are ok.)", "type": "string", "maxLength": 128 } } }, { "$ref": "#/definitions/BaseSKU" } ] }, "SKU": { "type": "object", "allOf": [ { "properties": { "skuID": { "type": "integer", "description": "Unique identifier representing a specific SKU. This or the SKU Number is required." }, "skuName": { "description": "A name for this SKU, as displayed to customers next to this SKU on the product page.", "type": "string", "maxLength": 255 }, "skuNumber": { "description": "A unique code for this SKU, used by the system to identify it. (No spaces, commas, or other unsafe characters. Pipe characters or equals signs are ok.)", "type": "string", "maxLength": 128 } } }, { "$ref": "#/definitions/BaseSKU" } ] }, "WrappedSKU": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "$ref": "#/definitions/SKU" } } }, "WrappedSKUList": { "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/SKU" } }, "itemCount": { "description": "The total number of items matching the criteria. This value may used to compose paging parameters.", "type": "integer" } } } } } } }