API – Product

General Online Reference

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help

 

GetProduct [GET]

The GetProduct operation retrieves a product from the shop based on a unique product number.

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a product number (id) for the product
  • a site id

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the product number cannot be null
  • the site id cannot be null

Output

When successful the operation returns a product with basic attributes. For information on how to retrieve related data for product, see GetProductByMetadata operation.

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/GetProduct

Code examples

C# (Console)


PHP


GetProductsInCategory [GET]

The GetProductsInCategory operation retrieves a list of products in a product category from the shop.

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a product category id
  • a site id

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the product category id cannot be null
  • the site id cannot be null

Output

When successful the operation returns a list of products in the product category. The response contains basic data for the products.  For information on how to retrieve related data for products, see GetProductByMetadata and GetProductsInCategoryByMetadata operations.

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/GetProductsInCategory

Code examples

C# (Console)

PHP


GetCategories [GET]

The GetCategories operation retrieves a list of main product categories from the shop.

Input

The operation takes the following input:

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the site id cannot be null

Output

When successful the operation returns a list of product categories. Only categories directly below the root category are returned.

Remarks

This operation is actually just a special case of the GetCategoriesInCategory operation, ie. a request for all subcategories in the root category (category id 0).

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/GetCategories

Code examples

C# (Console)

PHP


GetSubCategories [GET]

The GetSubCategories operation retrieves a list of product subcategories in a product category from the shop.

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a product category id
  • a site id

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the product category id cannot be null
  • the site id cannot be null

Output

When successful the operation returns a list of product categories.

Remarks

The root product category always has an id of 0, so all main categories can be retrieved with a request for subcategories in category 0.

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/GetSubCategories

Code examples

C# (Console)

PHP


GetProductByMetadata [POST]

The GetProductByMetadata operation retrieves a product from the shop based on a unique product number and a context object. The metadata object indicates which related data to the product the operation will return.

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a product number (id) for the product
  • a context object

The Context object got the following attributes:

 

  • if siteId is not supplied, the shops default site will be used
  • if currencyCode is not suppled, the currency of the supplied or derived site will be used
  • if customerId is not supplied, no customer settings will be uses in the pricecalculation.

All attributes in the metadata object can be omitted or have the value true or false.

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the product number cannot be null
  • all attributes in the context object is optional

Output

When successful the operation returns a product. The output is based on the attributevalues in prooductMetadata attribute in the context object.

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/GetProductByMetadata

Code examples

C# (Console)


GetProductsInCategoryByMetadata [POST]

The GetProductsInCategoryByMetadata operation retrieves a list of products in a product category from the shop.

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a product category id
  • a context object

For further information about the context object, see the GetProductByMetadata page.

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the product category id cannot be null
  • all attributes in the context object is optional
  • if supplied, all attributes in the metadata object is optional

Output

When successful the operation returns a list of products in the product category.

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/GetProductsInCategoryByMetadata

 


GetCategory [GET]

The GetCategory operation retrieves a category from the shop based on a unique category number.

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a category number (id) for the category
  • a site id

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the category number cannot be null
  • the site id cannot be null

Output

When successful the operation returns a category.

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/GetCategory

 


FindProductNumbersByKeyword [GET]

The FindProductNumbersByKeyword operation retrieves a list of product numbers matching a specified keyword.

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a site id
  • a keyword

Optional parameters

The result can be paged by adding the following query parameters:

page_size=numberOfResultsPerPage
page=theActualPageNumberToGet

/FindProductNumbersByKeyword/myKeyword/siteId?page_size=10&page=1

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)

Output

When successful the operation returns a list of product id’s matching the specified keyword.

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/FindProductNumbersByKeyword

 


GetProductsByBarcode[GET]

The GetProductsByBarcode operation gets all products that matches the specified barcode

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a barcode number
  • a site Id

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the site id cannot be null

The product READ permission is required to perform this operation.

Output

The operation returns a liste of products

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/GetProductsByBarcode

 


GetProductsByModificationDate [GET]

The GetProductsByModificationDate operation gets all products that has been modifed since the specified date.

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a modification date
  • a site Id

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the modification date must be valid
  • the site id cannot be null

The product READ permission is required to perform this operation.

Output

The operation returns a liste of products

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/GetProductsByModificationDate

 


FindProductsByProductNumbers[POST]

The FindProductsByProductNumbers operation gets products matching list of productnumbers

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a site Id
  • a request object composed of a list of product indentifies and paging info

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the site id cannot be null

The product READ permission is required to perform this operation.

Output

The operation returns a liste of products

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/FindProductsByProductNumbers

 


GetProductsInModifiedInterval[GET]

The GetProductsInModifiedInterval operation gets products that has been modified between the specied start and end date.

Input

The operation takes the following input:

  • an authentication key (see Authentication for details)
  • a site Id
  • a start date
  • an end date

Validation

The following validation will determine whether the operation succeeds:

  • the authentication key must be valid (see Authentication for details)
  • the site id cannot be null
  • the start date must be valid
  • the end date must be valid

The product READ permission is required to perform this operation.

Output

The operation returns a liste of products

Request and response format

http://4221117.shop53.dandomain.dk/admin/webapi/endpoints/v1_0/ProductService/help/operations/GetProductsInModifiedInterval