Set a price variance tolerance
Creates or updates a tolerance for a role, party or party-and-item pairing. Omit partyId to set the tenant default for that role. Set muted to stop a pairing from appearing on the variance worklist without discarding the recorded observations.
How to use it
- Pick the role (SUPPLIER or CUSTOMER) and, for an override, the vendor ID from List vendors or customer number from List customers.
- Send absThreshold and/or pctThreshold; omit partyId to set the merchant-wide default, add itemId to narrow it to one item.
- Set muted to true to stop that pairing appearing on the worklist; earlier variances stay on record.
- The same role, party and item combination is updated in place; new purchase documents are checked against the most specific match.
BearerAuthAuthorizationBearer <JWT>X-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
application/json- body
partyRole*stringSUPPLIER (purchase prices) or CUSTOMER (sale prices). Defaults to SUPPLIER.
"SUPPLIER""CUSTOMER"partyId?|Vendor ID (SUPPLIER) or customer number (CUSTOMER). Omit to set the merchant-wide default for the role.
itemId?|Item code to narrow the override to one item from this party. Requires partyId.
absThreshold?|Per-unit amount in the merchant's currency the rate must move by before it is flagged. 0 or more; omit to use the built-in default.
pctThreshold?|Percentage the rate must move by before it is flagged, e.g. 5 = 5%. 0 or more; omit to use the built-in default.
muted*booleantrue stops this scope adding new rows to the worklist; past variances are kept. Defaults to false, and every save overwrites it, so send true again when updating a muted scope.
notes?|Optional reason for the override, kept for audit.
updatedBy?|Name or username of the person making the change, stored for audit.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request was processed; otherwise an error status.
message*stringShort human-readable message describing the outcome, e.g. which record was saved or why the call failed.
data?The tolerance as saved.
curl -X PUT 'https://beta.iotoms.com/api/v1/pricing/variances/tolerance' \ -H 'X-TenantID: your-tenant-code' \ -H 'Content-Type: application/json' \ -d '{ "partyRole": "SUPPLIER", "muted": true}'{ "status": "string", "message": "string", "data": { "id": 0, "partyRole": "SUPPLIER", "partyId": "string", "partyName": "string", "itemId": "string", "itemName": "string", "absThreshold": 0, "pctThreshold": 0, "muted": true, "notes": "string", "updatedBy": "string", "updatedAt": "2019-08-24T14:15:22Z" }}