search-icon

The ProductSuppliers resource allows Product Suppliers to be listed, created, updated and deleted. Here are some example URIs:

 

· /ProductSuppliers/E6E8163F-6911-40e9-B740-90E5A0A3A996 - returns Suppliers of a particular Product;

· /ProductSuppliers?page=2 - returns the second page of 100 Products with suppliers;

· /ProductSuppliers - returns the first 100 Products with suppliers because page number 1 is the default;

· /ProductSuppliers?page=2&limit=500 - returns the second page of 500 Products with suppliers; i.e. the 501st to 1000th;

· /ProductSuppliers?sku=ABC - returns Suppliers of the product with specified sku;

 

The full range of URIs and HTTP Verbs supported are:

Operation

HTTP Action

List of paginated products with suppliers

GET /ProductSuppliers?page={pageNumber}

View any Product with all suppliers

GET /ProductSuppliers/{id}

Update a set of Product Suppliers. Product attributes are updated and existing suppliers of the product are synced with provided list.

PUT /ProductSuppliers

 

For PUT action, you always need to supply the full list of suppliers for each product, otherwise if some supplier is not provided then association between missing supplier and product will be deleted. This action automatically deletes, creates or updates product-supplier relations to sync data in the system with provided list of suppliers for each product.

These filters can be used with the GET ProductSuppliers endpoint:

Filter
Description
limit
Specifies the page size for pagination. Default page size is 100 Products.
name
Only return Products that start with the specific Product name
sku
Return one Product that has provided sku
onlyProductsWithSuppliers
Only return Products with at least one supplier defined
includeDeprecated
Returns all Products, including deprecated, if set to true. If set to false or if it is not specified then returns only active (i.e. non-deprecated) Products

Filters are used by adding the filter and value to the URI: /ProductSuppliers?name=ABC&includeDeprecated=true

 

Using PUT action:

With PUT action you can delete/create/update a set of Suppliers for multiple products at once:

{
 Products: [{...}, {...},...]
}

 

Up to 100 Products can be created/updated in one batch.

 

As a result of the call to PUT action you will get the following response: 

 

{
 "Products": [
 {
 ...,
 "OperationStatus":"failed",
 "Errors": [
 {"ErrorText":"Supplier with specified name does not exist"}
 ],
 Suppliers: [{…}, {…},…]
 },
          {    
 ...,
 "OperationStatus":"succeeded",
 "Errors": [],
 Suppliers: [{…}, {…},…]
 },
 …
 ]
}

 

Where “errors” property for every Product in a batch indicates problems executing sync of supplier list. If “errors” array property has no items then operation completed successfully. You can also check “operationStatus” property to find out if specific action in a batch succeeded or failed.

 

Available Fields for Product:

Property
Type
Length
Required
Notes
Suppliers
Supplier  collection, see below
Errors
Errors collection, see below
ID
Guid

Yes
Unique  Product ID
OperationStatus
String


Read-only field. Empty in  Get action result and one of two possible values as a result of PUT action:  “failed” or “succeeded”
SKU
String


Product SKU. Read-only  field, only returned in GET action. Ignored by PUT action
Name
String


Product Name. Read-only  field, only returned in GET action. Ignored by PUT action
DropShipMode
String


One of 3  possible drop ship modes of a product. 
Possible  values are: “Always Drop Ship”, “Optional Drop Ship” and “No Drop Ship”. If  value not provided then “No Drop Ship” option is used by default. If “Always  Drop Ship” or “Optional Drop Ship” options selected for a product then there  should be exactly one supplier listed for the product with DropShip option  set to true.
Status
String


Product  status. “Active” or “Deprecated”. Read-only field, only returned in GET  action. Ignored by PUT action

 

Supplier:

Property
Type
Length
Required
Notes
ID
Guid
 
 
Unique supplier ID. If  supplied, Name is ignored. Either ID or Name must be provided
Name
String
256

Supplier  name. Can identify a supplier if ID is not provided. Ignored if ID is  provided. Either ID or Name must be provided
Cost
Money

Yes
Latest of  Fixed cost of the product supplied by this supplier.
SKU
String
256

Supplier SKU  of the product. Different suppliers can have different SKUs for the same  product.
Description
String
256

Supplier description  of the product. Different suppliers can have different names for the same  product.
URL
String
256

Uri of the  product on supplier’s web site for reference purposes
DropShip
Boolean

Yes
“true” if this  supplier to be used for drop ship purchases. Only one supplier for single  product can be used for drop shipping. DropShipMode for the product must be  set to “Always drop ship” or “Optional drop ship”.

 

Errors:

Property
Type
Length
Required
Notes
ErrorText
String


Read-only  field indicating problem when executing action on associated entity

 

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.