Insert or update company discounts

Inserts or updates a list of CompanyDiscounts in Storm. Any non-existing discount will be inserted. Existing discounts will be updated. Note that it is only the discount field that can be updated. In order to update the value field, the entity must first be deleted and then re-inserted.

Request
query Parameters
companyId
required
integer <int32>

The internal company id for the discounts.

updatedBy
required
string

The account internal id of the user performing the upsert.

Request Body schema:

A list of discounts to update or insert. See CompanyDiscount entity for details.

Array
TypeId
integer <int32>

The TypeId defines the rule for how Value is interpreted. 1 = Category discount, 2 = DiscountCode on product. Cannot be changed.

Value
string

The value to check for on products. If TypeID = 1 then discounts are valid for all products belonging to Category with Category.Code = Value. If TypeId = 2 then the product's discount code is checked. Cannot be changed. MaxLength: 50.

Discount
number <decimal>

The actual discount percentage. Ex: 15.00 equals 15% discount.

PriceListTypeSeed
string

An optional comma-separated list of priceList type-ids for which the discount is valid. MaxLength: 50.

Responses
200

Success

500

Internal Server Error

post/CustomerService.svc/rest/UpsertCompanyDiscounts
Request samples
[
  • {
    }
]