CompuDime API docs

Reference / Schemas

OrderStoreDiscount

The percent discount the store's register gives the customer the order lands on (found by the order's phone), taken off the lines the store priced and posted on the invoice as savings lines without a product code, one per tax class of the discounted lines (usually one). The store's Customer Orders screen never applies a customer's discount by itself, so it is taken once. The register takes it only when the order's total is above the customer's minimum for the discount, and never off an item marked for no discount or, unless the store gives the discount on sale items too, off a line that got its own sale or deal.

Type: object.

NameTypeDescription
amount requiredstringWhat the store took off, negative: the percent of base rounded half up to the cent. Pattern: ^-[0-9]{1,6}\.[0-9]{2}$
base requiredstringThe total of the store-priced lines that took the discount. Pattern: ^[0-9]{1,6}\.[0-9]{2}$
percent requiredstringThe discount in percent, two decimals ("10.00"). Pattern: ^[0-9]{1,3}\.[0-9]{2}$
priceRule requiredstringThe price rule the order was priced under. One of: register.
source requiredstringcustomer: the customer's own discount. One of: customer.
partsarray of objectPresent when the discount was posted as more than one savings line (lines of different tax classes took it); the parts add up to amount.
parts[].kind requiredstring One of: discount.
parts[].quantity requiredstring One of: 1.
parts[].unitPrice requiredstringThe savings line's price, negative. Pattern: ^-[0-9]{1,6}\.[0-9]{2}$

No other fields appear.