ProductService
To use this service, you need to log in using the new Authenticate Service under the api.24sevenoffice.com domain.
This service is used to retrieve and save information about products. A product always belongs to a category so in order to save a new product you need to know which category it should belong to. You can get a complete list of categories by invoking the GetCategories method.
SaveProducts
The minimum required properties for saving a new product is CategoryId and Name, but you will typically want to include more properties. You can find a nice introduction to products on our help pages.
Below is a simple XML example for a request to SaveProducts:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SaveProducts xmlns="http://24sevenOffice.com/webservices">
<products>
<Product>
<Name>TestProduct</Name>
<CategoryId>1</CategoryId>
</Product>
</products>
</SaveProducts>
</soap:Body>
</soap:Envelope>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Methods
| Method | Input type | Input name | Return type | Description |
|---|---|---|---|---|
| GetProducts | ProductSearchParameters, String[] | searchParams, returnProperties | Product[] | Returns a list of products based on the given search parameters. Will only return the properties specified in the returnProperties parameter. |
| SaveProducts | Product[] | products | Product[] | Saves a list of products |
| DeleteProducts | Product[] | products | Product[] | Deletes a list of products |
| GetCategories | String[] | returnProperties | Category[] | Returns a list of categories with the return properties specified. |
| SaveCategories | Category[] | categories | Category[] | Saves a list of categories |
| SetStockQuantity | Int32, Decimal | productId, stockQuantity | Boolean | Sets the stock quantity and returns true if no error occured. |
| GetDiscountMatrixPriceGroup | Discount[] | |||
| GetDiscountMatrixCategory | Discount[] | |||
| GetPriceList | Int32 | priceListId | KeyValuePair[] | Returns a KeyValuePair array of ProductIDs and Prices that match the specified PriceListId. Key = ProductId, Value = Price |
| GetAllPriceLists | ProductPriceList[] | Returns a list of product price list data |