{ "parameters": { "manufacturerID": { "name": "manufacturerID", "in": "query", "description": "Unique ID for the record. This or code is required.", "required": false, "type": "integer" }, "manufacturerIDRequired": { "name": "manufacturerID", "in": "query", "description": "Unique ID for the record.", "required": true, "type": "integer" }, "updateAdvancedSearchIndex": { "name": "updateAdvancedSearchIndex", "in": "query", "description": "If true, as this record is saved, the corresponding document stored in the advanced search index will be updated.", "required": false, "type": "boolean", "default": true } }, "paths": { "/manufacturer": { "get": { "summary": "Manufacturer View", "description": "View the details of a Manufacturer record.", "tags": [ "CRUD Operations", "View Operations" ], "parameters": [ { "$ref": "#/parameters/manufacturerID" }, { "$ref": "../swagger-spec.json#/parameters/codeForViewAndEdit" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Manufacturer object", "schema": { "$ref": "#/definitions/WrappedManufacturer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "delete": { "summary": "Manufacturer Delete", "description": "Delete a Manufacturer record.", "tags": [ "CRUD Operations", "Delete Operations" ], "parameters": [ { "$ref": "#/parameters/manufacturerIDRequired" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/WrappedManufacturer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "patch": { "summary": "Manufacturer Edit", "description": "Edits a Manufacturer record.", "tags": [ "CRUD Operations", "Edit Operations" ], "parameters": [ { "name": "manufacturer", "in": "body", "description": "The manufacturer to be edited. Either the manufacturerID or code must be provided.", "required": true, "schema": { "$ref": "#/definitions/Manufacturer" } }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" }, { "$ref": "#/parameters/updateAdvancedSearchIndex" } ], "responses": { "200": { "description": "Manufacturer object", "schema": { "$ref": "#/definitions/WrappedManufacturer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "post": { "summary": "Manufacturer Add", "description": "Adds a Manufacturer record.", "tags": [ "CRUD Operations", "Add Operations" ], "parameters": [ { "name": "manufacturer", "in": "body", "description": "The manufacturer to be added.", "required": true, "schema": { "$ref": "#/definitions/NewManufacturer" } }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" }, { "$ref": "#/parameters/updateAdvancedSearchIndex" } ], "responses": { "200": { "description": "Manufacturer object", "schema": { "$ref": "#/definitions/WrappedManufacturer" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/manufacturer/list": { "get": { "summary": "Manufacturer List", "description": "View a list of manufacturers.", "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": "Manufacturer List", "schema": { "$ref": "#/definitions/WrappedManufacturerList" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } } }, "definitions": { "BaseManufacturer": { "type": "object", "properties": { "description": { "description": "The full description for this manufacturer as displayed to customers (may include HTML tags).", "type": "string" }, "websiteURL": { "websiteURL": "The URL to this manufacturer's website.", "type": "string", "maxLength": 255 }, "manufacturerOrder": { "description": "The order in which this manufacturer will appear relative to other manufacturers, on list pages such as the manufacturer page, or search results.", "type": "integer", "default": 0 }, "header": { "description": "Any HTML that will appear above the manufacturer detail on this manufacturer's page.", "type": "string" }, "footer": { "description": "Any HTML that will appear below the manufacturer detail on this manufacturer's page.", "type": "string" }, "smallImage": { "description": "The URL path to the thumbnail image for this manufacturer.", "type": "string", "maxLength": 255 }, "largeImage": { "description": "The URL path to the large image for this manufacturer.", "type": "string", "maxLength": 255 }, "isDropShipper": { "description": "If true, this manufacturer is a drop shipper. Shipping processors will request rates separately for items going to this manufacturer.", "type": "boolean", "default": false }, "address1": { "description": "The first address line for this manufacturer.", "type": "string", "maxLength": 255 }, "address2": { "description": "The second address line for this manufacturer.", "type": "string", "maxLength": 255 }, "city": { "description": "The city for this manufacturer.", "type": "string", "maxLength": 100 }, "state": { "description": "The state for this manufacturer.", "type": "string", "maxLength": 100 }, "country": { "description": "The country for this manufacturer.", "type": "string", "maxLength": 100 }, "postalCode": { "description": "The postal code for this manufacturer.", "type": "string", "maxLength": 100 }, "phone": { "description": "The phone number for this manufacturer.", "type": "string", "maxLength": 100 }, "email": { "description": "The email address for this manufacturer.", "type": "string", "maxLength": 100 }, "extra1": { "description": "Any extra, or custom information associated with this manufacturer.", "type": "string", "maxLength": 255 }, "extra2": { "description": "Any extra, or custom information associated with this manufacturer.", "type": "string", "maxLength": 255 }, "extra3": { "description": "Any extra, or custom information associated with this manufacturer.", "type": "string", "maxLength": 255 }, "isActive": { "description": "If false, this manufacturer will not appear to customers.", "type": "boolean", "default": true } } }, "NewManufacturer": { "type": "object", "allOf": [ { "required": [ "name" ], "properties": { "code": { "type": "string", "description": "Unique code for the manufacturer. If blank, the code is generated from the name. (No spaces, commas, or pipe characters.)" }, "name": { "type": "string", "description": "Name of the manufacturer." }, } }, { "$ref": "#/definitions/BaseManufacturer" } ] }, "Manufacturer": { "type": "object", "allOf": [ { "properties": { "manufacturerID": { "type": "integer", "description": "Unique identifier representing a specific manufacturer. This or the code is required." }, "code": { "type": "string", "description": "Unique code for the manufacturer. This or the manufacturerID is required." }, "name": { "type": "string", "description": "Name of the manufacturer." } } }, { "$ref": "#/definitions/BaseManufacturer" } ] }, "WrappedManufacturer": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "$ref": "#/definitions/Manufacturer" } } }, "WrappedManufacturerList": { "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/Manufacturer" } }, "itemCount": { "description": "The total number of items matching the criteria. This value may used to compose paging parameters.", "type": "integer" } } } } } } }