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

ParameterTypeRequiredDescription
sales_info_idstringYesThe identifier of a Sales Information entity to modify details for.
sales_infoobjectNoThe sales info parameter is defined in the table below.

Sales Info Parameters

ParameterTypeRequiredNullableDescription
card_brandsarrayNoyesList 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_methodobjectNoyesDistribution of sales across different channels. All percentages must total 100. The sales method parameter is defined in the table below.
sales_amountarray of objectsNoYesSales 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

ParameterTypeRequiredDescription
retailintegerNoPercentage of retail sales (in-person transactions). For example, 25 means 25%.
telephoneintegerNoPercentage of telephone sales (phone-based transactions). For example, 25 means 25%.
onlineintegerNoPercentage of online sales (web-based transactions). For example, 25 means 25%.
keyedintegerNoPercentage of keyed sales (manually entered transactions). For example, 25 means 25%.

Note: The sum of sales method parameters must equal 100.

Sales Amount Parameters

ParameterTypeRequiredDescription
typestringYesStatistic type. Must be one of SALES_AMOUNT_TYPES.
valuenumberYesMonetary value for the sales statistic (e.g., 50000 for $50,000).
currencystringYesCurrency 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 CodeHTTP CodePossible Cause
BAD_REQUEST 400Required parameters not provided.
Enum value provided does not correspond to an available type.
ENTITY_NOT_FOUND 400The sales_info_id provided does not exist.
SYSTEM_RULE_VIOLATION 400System 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 TypeSub-codeDescription
BusinessSALES_AMOUNT_AVG_SALEThe AVERAGE_INDIVIDUAL_SALE value cannot be greater than or equal to HIGHEST_TICKET_SALE or AVERAGE_MONTHLY_CREDIT_SALES.
BusinessSALES_METHOD_SUMAll sales method percentages must total exactly 100.