business.salesInfo.update
Update Sales Information entity to for a Business.
POST http://api.kompliant.com/business.salesInfo.update (OpenAPI specification)
Usage Info
Updates a Sales Information entity for a business including accepted card brands, sales channel percentages, and revenue statistics. This information is used for pricing calculations in workflows.
Request
Authentication: KSig1-HMAC-SHA256
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| sales_info_id | string | Yes | The identifier of a Sales Information entity to modify details for. |
| sales_info | object | No | The sales info parameter is defined in the table below. |
Sales Info Parameters
| Parameter | Type | Required | Nullable | Description |
|---|---|---|---|---|
| card_brands | array | No | yes | List of additional card brands to accept beyond Visa and Mastercard. Must be one or more of the CARD_BRANDS. Currently only AMEX is supported. |
| sales_method | object | No | yes | Distribution of sales across different channels. All percentages must total 100. The sales method parameter is defined in the table below. |
| sales_amount | array of objects | No | Yes | Sales revenue statistics for the business. Each entry requires a type, value, and currency. The sales amount parameters are defined in the table below. |
Sales Method Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| retail | integer | No | Percentage of retail sales (in-person transactions). For example, 25 means 25%. |
| telephone | integer | No | Percentage of telephone sales (phone-based transactions). For example, 25 means 25%. |
| online | integer | No | Percentage of online sales (web-based transactions). For example, 25 means 25%. |
| keyed | integer | No | Percentage of keyed sales (manually entered transactions). For example, 25 means 25%. |
Note: The sum of sales method parameters must equal 100.
Sales Amount Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | Yes | Statistic type. Must be one of SALES_AMOUNT_TYPES. |
| value | number | Yes | Monetary value for the sales statistic (e.g., 50000 for $50,000). |
| currency | string | Yes | Currency code for the sales amount information. Must be one of the CURRENCIES. Currently only USD is supported. |
Example
{
"sales_info_id": "bsi_46KdrGWLMZUvR3vlOX3DaW",
"sales_info": {
"card_brands": [
"AMEX"
],
"sales_method": {
"retail": 25,
"telephone": 25,
"online": 25,
"keyed": 25
},
"sales_amount": [
{
"type": "AVERAGE_MONTHLY_CREDIT_SALES",
"value": 999,
"currency": "USD"
},
{
"type": "AVERAGE_INDIVIDUAL_SALE",
"value": 99,
"currency": "USD"
},
{
"type": "HIGHEST_TICKET_SALE",
"value": 199,
"currency": "USD"
}
]
}
}
Response
Data
An empty data object is returned when the completion is successful.
Example
{
"meta": {
"status": "SUCCESS",
"trace_id": "trc_6zNzQZHSf26V83BO3uW6dS",
"version": "2025-03-24"
},
"data": {}
}
Errors
| Error Code | HTTP Code | Possible Cause |
|---|---|---|
| BAD_REQUEST | 400 | Required parameters not provided. Enum value provided does not correspond to an available type. |
| ENTITY_NOT_FOUND | 400 | The sales_info_id provided does not exist. |
| SYSTEM_RULE_VIOLATION | 400 | System rule violations are described below. |
System Rule Violations
When a SYSTEM_RULE_VIOLATION error occurs, the response will include additional entity_type and sub_code fields to provide more specific information:
| Entity Type | Sub-code | Description |
|---|---|---|
| Business | SALES_AMOUNT_AVG_SALE | The AVERAGE_INDIVIDUAL_SALE value cannot be greater than or equal to HIGHEST_TICKET_SALE or AVERAGE_MONTHLY_CREDIT_SALES. |
| Business | SALES_METHOD_SUM | All sales method percentages must total exactly 100. |
Updated 6 months ago