API – ProductData
General Online Reference
http://3773519.shop51.dandomain.dk/admin/webapi/endpoints/v1_0/ProductDataService/help
GetProduct [GET]
The GetDataProduct 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
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
Output
When successful the operation returns a product with related data.
Request and response format
GetDataProductsInCategory [GET]
The GetDataProductsInCategory 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 category number (id) for the category
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
Output
When successful the operation returns a list of products with related data.
Request and response format
GetDataProductsByBarcode [GET]
The GetDataProductsByBarcode operation retrieves a list of products from the shop based on a barcode.
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- a barcode
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the barcode cannot be null
Output
A list of products with the given barcode
Request and response format
GetDataProductsByModificationDate [GET]
The GetDataProductsByModificationDate operation retrieves a list of products from the shop modified on a given date.
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- a date with the format yyyy-MM-dd
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the modified date cannot be null and must be in the correct format (yyyy-MM-dd)
Output
When successful the operation returns a list of products modified on the given date.
Request and response format
GetDataProductsInModifiedInterval [GET]
The GetDataProductsInModifiedInterval operation retrieves a list of products from the shop modified between two dates or datetimes
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- a startdate with the format yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss
- a enddate with the format yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the startdate and enddate parameters cannot be null and must be in the correct format (yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss)
Output
When successful the operation returns a list of products modified between startdate and enddate
Request and response format
CreateProduct [POST]
The operation creates a new product in the shop.
SetStockCount[PUT]
The SetStockCount operation sets the current stock count for the specified product.
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- a product number (Productnumber) for the product
- an stock count integer
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 stock count must be a integer.
Output
When successful the operation returns true
Request and response format
GetDataCatagories [GET]
The GetDataCategories operation retrieves a list of root product categories.
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
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 product with related data.
Request and response format
GetDataCatagories [GET]
The GetDataSubCategories operation retrieves a list of product categories that are children to the specified parent category.
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- parent category number (categorynumber)
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 categories
Request and response format
GetDataProductCount [GET]
The GetDataProductCount operation counts the number of products
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
Output
An integer containing the total number of products in the shop
Request and response format
GetDataProductPage [GET]
The GetDataProductPage operation retrieves a paged list of products.
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- pageindex
- pagesize
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
Output
A list of dataproducts
Request and response format
DeleteProduct [DELETE]
The DeleteProduct operation deletes a product
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- productnumber (Id)
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
Output
True if the product has been deleted
Request and response format
CreateCategory [POST]
The CreateCategory operation creates a new category in the shop.
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- a category data object
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the category object must be specified correctly
Output
Data for the created category
Request and response format
UpdateCategory [PUT]
The UpdateCategory operation creates a new category in the shop.
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- a category data object
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the category object must be specified correctly
Output
Data for the updated category
Request and response format
DeleteCategory [DELETE]
The DeleteCategory operation deletes a category (including all child categories) 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
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
Output
When successful the operation returns true, otherwise false.
Request and response format
GetDataCategory [GET]
The GetDataCategory 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
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
Output
When successful the operation returns a category with related data.
Request and response format
UpdateProduct [PUT]
The UpdateProduct operation updates an existing product.
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- productnumber(id)
- data product object
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the id must match the productnumber of an existing product
- the product object must be specified correctly
Output
Data for the created product
Request and response format
PatchProduct [PATCH]
The PatchProduct operation updates one or more properties of an existing product
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- productnumber(productnumber)
- product patch object
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the id must match the productnumber of an existing product
- the product patch object must be specified correctly
Output
Data for the updated product
Request and response format
CreatePrice[POST]
The CreatePrice operation creates a new price for an existing product
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- productnumber(productnumber)
- product price object
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the productnumber must match the productnumber of an existing product
- the product price object must be specified correctly
- a price with the same (amount,currency,b2bgroup) does not exist
Output
Data for the created price
Request and response format
DeletePrice[DELETE]
The DeletePrice operation deletes a price on an existing product
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- productnumber(productnumber)
- product price object
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the productnumber must match the productnumber of an existing product
- the product price object must be specified correctly
Output
Data for the deleted price
Request and response format
GetPricesForProduct[POST]
The GetPricesForProduct operation returns all prices for the specified product
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- productnumber(productnumber)
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the productnumber must match the productnumber of an existing product
Output
List of prices
Request and response format
PatchProductSettings [PATCH]
The PatchProductSettings operation updates one or more site specific properties of an existing product
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- productnumber(productnumber)
- productsettings patch object
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- the id must match the productnumber of an existing product
- the productsettings patch object must be specified correctly
Output
Data for the updated product settings
Request and response format
GetProductPageCount [GET]
The GetProductPageCount operation counts the number of pages a specific pagesize will generate
Input
The operation takes the following input:
- an authentication key (see Authentication for details)
- pagesize
Validation
The following validation will determine whether the operation succeeds:
- the authentication key must be valid (see Authentication for details)
- pagesize must be a valid integer
Output
An integer containing number of pages
Request and response format