# GetProductInformations (REST)

**Description**

With this method, we want to receive real time product information from the ERP system. It contains customer-specific product information like pricing and discount information. Also stock information is returned. We will use this method to show real time product information on the product detail page in the web shop.

The method requests the productinformations for a list of productnumbers.

***Note:***

*Since ShoxlRestApiSwagger\_v6 this interface replaces the deprecated GetProductInformation endpoint which supported only the processing of one productnumber*

## REST API:

**URL:** /Shoxl​/v1​/GetProductInformations\
**Method:** POST

### Changes in ShoxlRestApiSwagger\_v8

* A new field taxPercentage is introduced
* The field vatCode is changed to nullable and marked as deprecated. The field is preserved for backwards compatiblity in current implementations but must not be used in new implementations.

**Request body:**

### **GetProductInformationsRequest**{

| Parameter      | Type                         | Description                                                                                                |
| -------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------- |
| accountNumber  | <p>string</p><p>required</p> | This is the (project) account number of the customer.                                                      |
| productNumbers | <p>\[string]<br>required</p> | List of product numbers for the requested product details, this can be a customer-specific product numbers |

}

#### **Example:**

```
{
  "accountNumber": "string",
  "productNumbers": ["123","456"]
}
```

**Response body:**

### **GetProductInformationResult\[**{

| Parameter              | Type                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| productNumber          | <p>string<br>required</p>                            |                                                                                                                                                                                                                                                                                                                                                                                                                      |
| quantityDiscountPrices | <p>\[QuantityDiscountPrice]</p><p>nullable: true</p> | A list of QuantityDiscountPrices. For the complete description check the QuantityDiscountPrice section in the documentation. The QuantityDiscountPrices is used to return quantity price breaks, example; from quantity x use the unit price = y                                                                                                                                                                     |
| stock                  | <p>number($double)</p><p>nullable: true</p>          | The amount of stock still available for the product                                                                                                                                                                                                                                                                                                                                                                  |
| stockIndicationCode    | integer($int32)                                      | A stock indication, 1 = in stock (green), 2 = not in stock, short delivery time (orange), 3 = not in stock, longer delivery time (red)                                                                                                                                                                                                                                                                               |
| vatCode                | <p>integer($int32)<br>nullable: true</p>             | <p>This field is deprecated. Use the taxPercentage field instead.</p><p><br>The VAT Code of the product, 1 = percentage from the customer settings, 2 = LOW (6%), 3 = ZERO (0%). This VAT code must be set by the ERP taking into account that this VAT code can be overrulled by the customer settings, for example foreign customers use ZERO as a VAT code, in this case the ERP will return 3 to Shoxl Shop.</p> |
| taxPercentage          | <p>number($double)<br>nullable: true</p>             | The tax percentage of the product                                                                                                                                                                                                                                                                                                                                                                                    |
| baseUnit               | <p>string<br>nullable: true</p>                      | The base unit of the product, eg pce or meter.                                                                                                                                                                                                                                                                                                                                                                       |
| priceUnit              | <p>number($double)</p><p>nullable: true</p>          | The quantity on which price is based                                                                                                                                                                                                                                                                                                                                                                                 |

}]

#### **QuantityDiscountPrice**{

| Parameter                    | Type                                     | Description                                                                                                                                                                                                                  |
| ---------------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| discountAmountPerItemExclVat | <p>number($double)<br>nullable: true</p> | Discount amount on the default net price. This field can be used to give the calculated Discount Amount using a discount percentage. Or just give a discount amount when no discount percentage is used for the calculation. |
| discountPercentagePerItem    | <p>number($double)<br>nullable: true</p> | A percentage of the given discount on the default net price per item excluding VAT. When this field is set, the field DiscountAmountPerItemExclVat is required.                                                              |
| fromQuantity                 | <p>number($double)<br>nullable: true</p> | The from quantity where the discount price is valid from                                                                                                                                                                     |
| nettoPricePerItemExclVat     | <p>number($double)<br>nullable: true</p> | The calculated netto price per item. This is the price including discounts.                                                                                                                                                  |
| toQuantity                   | <p>number($double)<br>nullable: true</p> | The to quantity where the discount price is valid to. Can be set to null if no upper bound is available.                                                                                                                     |

}\\

#### **Example:**

```
[
  {
    "productNumber": "123",
    "quantityDiscountPrices": [
      {
        "discountAmountPerItemExclVat": 0,
        "discountPercentagePerItem": 0,
        "fromQuantity": 0,
        "nettoPricePerItemExclVat": 0,
        "toQuantity": 0
      }
    ],
    "stock": 0,
    "stockIndicationCode": 0,
    "taxPercentage": 0,
    "baseUnit": "string",
    "priceUnit": 0
  },
  {
    "productNumber": "456",
    "quantityDiscountPrices": [
      {
        "discountAmountPerItemExclVat": 0,
        "discountPercentagePerItem": 0,
        "fromQuantity": 0,
        "nettoPricePerItemExclVat": 0,
        "toQuantity": 0
      }
    ],
    "stock": 0,
    "stockIndicationCode": 0,
    "taxPercentage": 0,
    "baseUnit": "string",
    "priceUnit": 0
  }
]
```

\\
