Products API

Overview

This document outlines the purpose, technology, use cases, methods, objects and examples for using the Product API.

This particular document focuses on the SOAP interface to this API.

Purpose

This API provides programmatic access to the Product database, and allows for maintenance and control of the products and items within the database, as well as facilitating updates to instore and site availability.

The Products API exposes 2 primary native interfaces via .NET and SOAP.

Limitations

Customised data formats, business rules and/or extended product functions are not automatically covered by the Product API.

The Products API currently supports only the iSAMS 9.1 (Scheduled) catalogue structure.

Fields are required unless otherwise stated.

Note: It is not recommended to use this API if you have customisations around product or availability integrations without first understanding how the use of this API may impact these.

Product API Definition (.NET)

Full documentation for this interface is available in the API Reference.

Product API Definition (SOAP)

This section documents the SOAP interface to the API.

Endpoint

The SOAP API endpoint for any site is located at https://[siteurl]/global/api/products.asmx

This endpoint is enabled for access via SOAP as well as HTTP GET & POST. The Service Description is also available directly via this endpoint.

Note: For systems with satellite sites, the API will be available only under the primary site URL.

Security (SOAP Interface Only)

The Products API via SOAP uses the Permissions System to allow and deny access to certain users. Use of the API requires a user to be granted the various actions (under iSAMS / API / Products) to be able to authenticate, and perform the various actions available under this API.

Error Handling

Error handling is primarily left to the caller, however any methods that return an ApiResponse object will provide additional details that can be used to assist when debugging problems.

Where a "Call Identifier" is returned in the Message field of the ApiResponse, then a full exception trace will be available from [website url]/logs/api/{Call Identifier}.txt

Methods

The available methods are listed below, and link to the relevant details for which arguments are required, and the responses each method provides;

Objects

The available objects are listed below, and link to the relevant details for each;

Methods

Authenticate

See Authenticate.

List

Lists all Product style codes present in the database.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
Response

Returns an array of strings representing all style codes.

ListByCatalogue

Lists all style codes of products linked to the specified catalogue.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
catalogueStringFull catalogue path to return products for.
Response

Returns an array of strings containing the style codes of products listed in the provided catalogue path.

ListProductsCreated

Returns the style codes of products created in the specified date range.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
startDateDateTimeThe start of the date range (inclusive), in UTC.
endDateDateTimeThe end of the date range (inclusive), in UTC.
Response

Returns a StringArrayApiResponse containing the style codes of all products created in the specified date range.

ListProductsModified

Returns the style codes of products modified in the specified date range.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
startDateDateTimeThe start of the date range (inclusive), in UTC.
endDateDateTimeThe end of the date range (inclusive), in UTC.
Response

Returns a StringArrayApiResponse containing the style codes of all products modified in the specified date range.

Search

Lists all Product style codes with titles containing the search term.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
termStringTerm to search for in product titles.
Response

Returns an array of strings of style codes for the products whose titles contain the search term.

Retrieve

Retrieves a product using the style code provided.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
styleStringStyle code of product to retrieve.
Response

Returns a ProductApiResponse containing an array (of length 1) containing the Product object for the given style code across all websites.

Users can be configured to retrieve additional image information if required.

RetrieveByWebsite

Retrieves a product using the style code and website provided.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
styleStringStyle code of product to retrieve.
websiteIntegerWebsite identifier to retrieve availability for. If "0" (zero), then availability for all websites will be retrieved.
Response

Returns a ProductApiResponse containing an array (of length 1) containing the Product object for the given style code and website identifier.

Users can be configured to retrieve additional image information if required.

RetrieveSet

Retrieves a set of products using the style codes provided.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
stylesString[]Style code of product to retrieve.
Response

Returns an ProductApiResponse containing the array of Product objects matching the given style codes across all websites.

Users can be configured to retrieve additional image information if required.

RetrieveSetByWebsite

Retrieves a set of products using the style codes and website provided.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
stylesString[]Style code of product to retrieve.
websiteIntegerWebsite identifier to retrieve availability for. If "0" (zero), then availability for all websites will be retrieved.
Response

Returns an ProductApiResponse containing the array of Product objects matching the given style codes and website identifier.

Users can be configured to retrieve additional image information if required.

UpdateProduct

Adds or Updates a single product.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
productProductProduct to update details for.
Response

Returns an ApiResponse indicating the outcome of the call.

UpdateProducts

Adds or Updates a set of products.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
productProduct[]Array of Products to update details for.
Response

Returns an ApiResponse indicating the outcome of the call.

PatchProduct

Patches (applies a partial update) to the specified fields of the provided product.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
fieldsStringComma-delimited list of supported fields that are to be patched on the matching product in this call instance.E.g. fields="Title,Manufacturer,LongDescription". Where this parameter is empty or blank, no updates will be performed.
productProductProduct containing the details to patch.
Response

Returns an StringArrayApiResponse indicating the outcome of the call. Any records that cannot be updated, will be returned (as the Style identifier) in the Data field.

Supported Fields

The following fields of the Product object are currently supported by this method;

Title
ShortDescription
LongDescription
Supplier
ForeignIdentity
Manufacturer
ProductType
RiskCategory
Aspects
The PatchProduct[s] methods apply a full replacement of all records provided for this field.
Metadata
The PatchProduct[s] methods update only the subset of detail records provided for this field.
ProductInformation
The PatchProduct[s] methods update only the subset of detail records provided for this field.
AdditionalDetails
This field is ignored (even if listed in the fields argument) unless custom processing of this field is in place. This field is expected to contain structured data (XML, JSON etc.).
Catalogues
The PatchProduct[s] methods apply a full replacement of all records provided for this field.

PatchProducts

Patches (applies a partial update) to the specified fields of the set of provided products.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
fieldsStringComma-delimited list of supported fields that are to be patched on the matching product in this call instance. E.g. fields="Title,Manufacturer,LongDescription". Where this parameter is empty or blank, no updates will be performed.
productsProduct[]Array of Products containing the details to patch.
Response

Returns an StringArrayApiResponse indicating the outcome of the call. Any records that cannot be updated, will be returned (as the Style identifier) in the Data field.

Delete

Deletes a product from the database.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
styleStringStyle code of product to delete.
Response

Returns an ApiResponse indicating the outcome of the call.

UpdateAvailability

Updates the availability of the provided items.

Note: This is a delta update, and updates only the products corresponding to the provided entries.If the 'Decrement In Progress From Store Availability' policy is enabled, then the current in progress orders against the imported store will be deducted from the imported quantity.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
entriesAvailabilityEntry[]Array of AvailabilityEntries to update.
Response

Returns an ApiResponse indicating the outcome of the call.

ResetAvailability

Resets all availability entries with those provided.

Note: This is a full update and assumes all entries are provided. Any entries that are missing, will be treated as unavailable.If the 'Decrement In Progress From Store Availability' policy is enabled, then the current in progress orders against the imported store will be deducted from the imported quantity.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
entriesAvailabilityEntry[]Array of AvailabilityEntries to refresh availability from.
Response

Returns an ApiResponse indicating the outcome of the call.

UpdatePricing

Updates the pricing of the provided items.

Note: This is a delta update, and updates only the products corresponding to the provided entries.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
entriesPricingEntry[]Array of PricingEntries to update.
Response

Returns an ApiResponse indicating the outcome of the call.

UpdateStock

updates all stock availability entries with those provided.

Note: This is a delta update, and updates only the products corresponding to the provided entries.If the 'Decrement In Progress From Store Availability' policy is enabled, then the current in progress orders against the imported store will be deducted from the imported quantity.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
entriesStockEntry[]Array of StockEntries to refresh availability from.
Response

Returns an ApiResponse indicating the outcome of the call.

ResetStock

Resets all stock availability entries with those provided.

Note: This is a full update and assumes all entries are provided. Any entries that are missing will be treated as unavailable.If the 'Decrement In Progress From Store Availability' policy is enabled, then the current in progress orders against the imported store will be deducted from the imported quantity.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
entriesStockEntry[]Array of StockEntries to refresh availability from.
Response

Returns an ApiResponse indicating the outcome of the call.

ExportCsv

Trigger the bulk export of product data to a set of CSV files that can be retrieved via HTTP.

Note: Files generated will be retrievable via https://[siteurl]/data/products/[filename]
(Where [filename] is provided in the API call response.)

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
websiteIntegerWebsite identifier to export products for. If "0" (zero), then all products will be exported.
Response

Returns an StringArrayApiResponse indicating both the outcome of the call, as well as the list of the files generated.

Users can be configured to retrieve additional image information if required.

Sample

A sample of a CSV-formatted product export is available here.

A sample of a CSV-formatted product export with additional image information is available here.

ExportJson

Trigger the bulk export of product data to a set of JSON-formatted files that can be retrieved via HTTP.

Note: Files generated will be retrievable via https://[siteurl]/data/products/[filename]
(Where [filename] is provided in the API call response.)

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
websiteIntegerWebsite identifier to export products for. If "0" (zero), then all products will be exported.
Response

Returns an StringArrayApiResponse indicating both the outcome of the call, as well as the list of the files generated.

Users can be configured to retrieve additional image information if required.

Sample

A sample of a JSON-formatted product export is available here.

A sample of a JSON-formatted product export with additional image information is available here.

ExportXml

Triggers the bulk export of product data to a set of XML files that can be retrieved via HTTP.

Note: Files generated will be retrievable via https://[siteurl]/data/products/[filename]
(Where [filename] is provided in the API call response.)

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
websiteIntegerWebsite identifier to export products for. If "0" (zero), then all products will be exported.
Response

Returns an StringArrayApiResponse indicating both the outcome of the call, as well as the list of the files generated.

Users can be configured to retrieve additional image information if required.

Sample

A sample of an XML-formatted product export is available here.

A sample of an XML-formatted product export with additional image information is available here.

SetMainImage

Sets the main image for the identified product and item (if provided).

Note: When setting images via this method, it is recommended for performance reasons that JPEG encoded data is sent, and only at the highest resolution displayed onsite.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
styleStringStyle code of the product to set the image against.
barcodeString (optional - may be blank)Barcode of the related item variant to set the image against.
isDefaultBooleanIf true, marks the provided image as the default image for the product.
captionString (optional - may be blank)Sets the caption for this image.
imageDataByte[]Byte array containing the raw image data.
Response

Returns an ApiResponse indicating the outcome of the call.

AddAlternateImage

Adds an alternate image for the identified product and item (if provided).

Alternate images are restricted to a certain number of available "slots", images added at higher sort orders can push other images out of the stack.

Images can be updated by setting the "order" parameter to a matching existing image.

Note: When setting images via this method, it is recommended for performance reasons that JPEG encoded data is sent, and only at the highest resolution displayed onsite.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
styleStringStyle code of the product to set the image against.
barcodeString (optional - may be blank)Barcode of the related item variant to set the image against.
orderIntegerThe sort order of this image. This is adjusted internally to make room for the main image.
captionString (optional - may be blank)Sets the caption for this image.
imageDataByte[]Byte array containing the raw image data.
Response

Returns an ApiResponse indicating the outcome of the call.

SetSwatchImage

Sets the swatch image for the identified product and item.

Note: When setting images via this method, it is recommended for performance reasons that JPEG encoded data is sent, and only at the highest resolution displayed onsite.

Parameters
Name Type Description
authenticationTokenStringAuthentication token to use for this session.
styleStringStyle code of the product to set the image against.
barcodeStringBarcode of the related item variant to set the image against.
captionString (optional - may be blank)Sets the caption for this image.
imageDataByte[]Byte array containing the raw image data.
Response

Returns an ApiResponse indicating the outcome of the call.

Objects

ProductApiResponse

Contains basic information about the result of a method call, along with an array of Product objects.

Fields/Properties
Field NameTypeDescriptionNotes
SuccessBooleanIndicates the success or failure of an API method call.A failure (false) response should contain a failure Code and Message in the respective fields.
CodeIntegerA response code for the method call.
MessageStringMessage or output from the method call.
DataProduct[]Array of Product objects returned for this method call.

Product

Represents a Product.

Fields/Properties
Field NameTypeDescriptionNotes
IDIntegerThe unique internal ID of this product.
StyleStringThe style code of the product.
TitleStringThe title of the product.
ShortDescriptionStringThe short description of the product (Text, HTML).
LongDescriptionStringThe long description of the product (HTML).
SupplierStringThe name of the supplier of this product.
StatusIntegerProduct availability status.
AvailableFromDateTimeDate this item is available from.
PriceDecimalPurchase price of the product.
CostDecimalCost price of the product.
ContentLockedBooleanFlags whether the content is locked (for custom integration updates).
ForeignIdentityStringUnique Foreign Identity of this product.Update sets with duplicates will have all but the last entry removed.
WeightDecimalWeight (or Freight Metric) of this product.
DateCreatedDateTimeDate the product was created in the system.
ManufacturerStringName of the manufacturer of this product.
AdditionalDetailsStringString containing arbitrary additional details.This field is ignored unless custom processing of this field is required. Expected to contain structured data (XML, JSON etc.)
ItemsProductItem[]Array of items (Barcode-level) that constitute the Size/Colour variations of this product.
ProductCompositeTypeProductCompositeTypeDefines the make up of this product.
CompositeChildrenChildProduct[]Array of child products for this product if it is a composite product.If this field is null or empty then this is product is treated as a non-composite product.
AspectsNameValuePair[]Array of name-value pairs that constitute the additional search aspects/filters.
ProductInformationNameValuePair[]Array of name-value pairs that constitute the product information items.
MetadataNameValuePair[]Array of name-value pairs that constitute the metadata tags/values.
ImagesNameValuePair[]Array of name-value pairs that contains only the main image loaded against the product and its URL. Users can be configured to retrieve additional image information if required.
CataloguesString[]Array of catalogues to assign this product to.
ProductTypeStringProduct Type of this product.
RiskCategoryStringThe risk category code for this product.

ProductItem

Represents a Product Item (barcode).

Fields/Properties
Field NameTypeDescriptionNotes
IDIntegerThe unique internal ID of this item.
StyleStringThe style code of the product related to this item.
BarcodeStringBarcode or APN of the item.
SizeStringSize name of the item.
SizeCodeStringSize code of the item.
ColourStringName of this items' colour.
ColourCodeStringCode of this items' colour.
PriceDecimalPrice to charge for this item.
CostDecimalCost price for this item.
QuantityIntegerQuantity available.
WeightDecimalWeight (or Freight Metric) for this item.
ForeignIdentityStringUnique Foreign Identity of the product item.Update sets with duplicates will have all but the last entry removed.
AvailableFromDateTimeDate this item is available from.
InStockBooleanFlags whether or not the item is in stock.
RetailDecimalRetail (RRP) Price for this item.
AdditionalDetailsStringString containing arbitrary additional details.This field is ignored unless custom processing of this field is required. Expected to contain structured data (XML, JSON etc.)
AvailabilityAvailabilityEntry[]Array of availability entries.
ImagesNameValuePair[]Array of name-value pairs that contains the image(s) loaded against the product item and its URL. Only populated if the user has been configured to retrieve additional image information.

AvailabilityEntry

Represents an availability record.

Fields/Properties
Field NameTypeDescriptionNotes
BarcodeStringBarcode or APN of the item to set availability for.
PriceDecimalCurrent retail price of this item.
CostDecimalCurrent cost price of this item.
SalePriceDecimalCurrent discounted price of this item.
QuantityIntegerQuantity of this item available in stock.
TaxRateDecimalSpecific sales tax rate to apply for this item.
WebsiteInteger Website ID.Required for separate availability per Satellite site. If there is only one website in the group, then this can be left blank or passed as "1" (default site).
BranchStringBranch code of store holding stock.This is used only for store-level availability and does not apply to the website availability directly.

ChildProduct

Represents a composite child product.

Fields/Properties
Field NameTypeDescriptionNotes
StyleStringThe style code of the child product.
ParentStyleStringThe style code of the parent product.
TypeComponentTypeThe ComponentType of this component of the composite product.
QuantityIntegerQuantity of this item that makes up the composite.If the quantity is not included for optional components the quantity purchased with the composite can be specified by the buyer. If the Type is Included or Required a quantity must be specified.
PriceDecimalThe price of this component when purchased as part of the composite product.If not specified the component's individual sale price will be added to the total price of the composite. If the Type is Included the Price property is ignored.
OrderIntegerThe order that the child products should be displayed in.

ComponentType

Specifies the behaviour of a component in a composite product.

Members
NameValueDescriptionNotes
Required 3 This component is required to make up the composite product.
Optional 2 This component can be optionally purchased with the composite product.
Included 1 This component is included in the price of the composite product. Obsolete: This behaviour can be obtained by setting ChildProduct.ComponentType to Required and ChildProduct.Price to 0.

ProductCompositeType

Defines the make up of a Product.

Members
NameValueDescription
Product 1 The Product is a standard product, it may have additional optional components that can be purchased with the Product for an additional price.
Group 2 The Product defines a group of optional components that are displayed together but purchased separately.
Set 4 The Product defines set of included components that can be purchased together for a price of the Set.
The Set may have additional optional components that can be purchased with the Set for an additional price.

PricingEntry

Represents a pricing record.

Fields/Properties
Field NameTypeDescriptionNotes
BarcodeStringBarcode or APN of the item to set pricing for.
PriceDecimalCurrent retail price of this item.
CostDecimalCurrent cost price of this item.
SalePriceDecimalCurrent discounted price of this item.
TaxRateDecimalSpecific sales tax rate to apply for this item.
WebsiteInteger Website ID.Required for separate pricing per Satellite site. If there is only one website in the group, then this can be left blank or passed as "1" (default site).

StockEntry

Represents a stock availability record.

Fields/Properties
Field NameTypeDescriptionNotes
BarcodeStringBarcode or APN of the item to set stock availability for.
QuantityIntegerQuantity of this item available in stock.
WebsiteInteger Website ID.Required for separate pricing per Satellite site. If there is only one website in the group, then this can be left blank or passed as "1" (default site).
BranchStringBranch code of store holding stock.This is used only for store-level availability and does not apply to the website availability directly.
SystemFlagintPlatform stock indicator.Reserved for future use
CustomFlagintCustom stock indicator to support custom stock rules.Reserved for future use
CommentStringFree text field.Reserved for future use

Appendices

Response Codes

The Products API returns standard API response codes.

Product Availability Status

StatusDescriptionNotes
0Available on Site and for Sale
1Not Available on Site and Not for Sale
2Available on Site and Not for Sale
3Not Available on Site and for Sale
4Available on Site and MOTO Sale Only