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.

Changes in ShoxlRestApiSwagger_v16

  • A new field "context" is introduced in the request body. When configured this object contains key value pairs (e.g. divisionCode).

Request body:

GetProductInformationsRequest{

ParameterTypeDescription

accountNumber

string

required

This is the (project) account number of the customer.

productNumbers

[string] required

List of product numbers for the requested product details, this can be a customer-specific product numbers

context

object

A generic object designed to hold key-value pairs for the purpose of providing customer-specific fields.

}

Example:

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

Response body:

GetProductInformationResult[{

ParameterTypeDescription

productNumber

string required

quantityDiscountPrices

[QuantityDiscountPrice]

nullable: true

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

number($double)

nullable: true

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)

endOfLife

boolean

Indication of whether or not the product is end of life

tempNotAvailable

boolean

Indication of whether or not the product is temporary not available

vatCode

integer($int32) nullable: true

This field is deprecated. Use the taxPercentage field instead.

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.

taxPercentage

number($double) nullable: true

The tax percentage of the product

baseUnit

string nullable: true

The base unit of the product, eg pce or meter.

priceUnit

number($double)

nullable: true

The quantity on which price is based

}]

QuantityDiscountPrice{

ParameterTypeDescription

discountAmountPerItemExclVat

number($double) nullable: true

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

number($double) nullable: true

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

number($double) nullable: true

The from quantity where the discount price is valid from

nettoPricePerItemExclVat

number($double) nullable: true

The calculated netto price per item. This is the price including discounts.

toQuantity

number($double) nullable: true

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,
    "endOfLife": false,
    "tempNotAvailable": false,
    "taxPercentage": 0,
    "baseUnit": "string",
    "priceUnit": 0
  },
  {
    "productNumber": "456",
    "quantityDiscountPrices": [
      {
        "discountAmountPerItemExclVat": 0,
        "discountPercentagePerItem": 0,
        "fromQuantity": 0,
        "nettoPricePerItemExclVat": 0,
        "toQuantity": 0
      }
    ],
    "stock": 0,
    "stockIndicationCode": 0,
    "endOfLife": false,
    "tempNotAvailable": false,
    "taxPercentage": 0,
    "baseUnit": "string",
    "priceUnit": 0
  }
]