business.salesInfo.create

Create a Sales Information entity to capture financial account details about a Business.

POST http://api.kompliant.com/business.salesInfo.create (OpenAPI specification)

Usage Info

Create a Sales Info entity to capture business sales details 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
business_idstringYesThe Business to add Sales Information to.
sales_infoobjectNoThe sales info parameter is defined in the table below.

Sales Info Parameters

ParameterTypeRequiredDescription
card_brandsarrayNoList 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_methodobjectNoDistribution of sales across different channels. All percentages must total 100. The sales method parameter is defined in the table below.
sales_amountarray of objectsNoSales 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%.

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

{
  "business_id": "b_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

ParameterTypeDescription
sales_infoobjectThe sales info parameter is defined in the table below.

Sales Info Parameters

ParameterTypeDescription
sales_info_idstringThe identifier for the entity just created.

Example

{
  "meta": {
    "status": "SUCCESS",
    "trace_id": "trc_3XsPP17u8mU3k29x944ygx",
    "version": "2025-03-24"
  },
  "data": {
    "sales_info": {
      "sales_info_id": "bsi_697YYEtrLpod105bhCoSjd"
    }
  }
}

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 business_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
BusinessMAX_SALES_INFO_LIMITA Business can only have one Sales Info entity. Remove the existing one before creating a new one.
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.