Skip to content
Proud to collaborate with Microsoft for Startups

bling.fetch-regime ​

Read the connected Bling tenant's tax regime (regimeTributario) by calling bling.fetch-company under the hood. Persists into commerce_entity with entity_type='tax_regime'.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-bling
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
connection_uuiduuidYes——
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
connection_uuiduuidYes——
actorstringNo——
tax_regimestringNo——
state_registrationstringNo——
company_external_refstringNo——
commerce_entity_uuiduuidNo——
fetched_atstringNo——
failure_reasonstringNo——
failed_atstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepjsonNo——
failed_layerjsonNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—fetchFetch regime request received
completedNoYesYes—Regime fetched + persisted
failedNoYesNo—Fetch failed

State Diagram ​

Transitions ​

FromActionToDescription
initiatedfetchcompleted—
initiatedfailfailed—

Business Errors ​

CodeMessage Template
BLING_FETCH_REGIME_COMPANY_FAILEDunderlying bling.fetch-company failed:
BLING_FETCH_REGIME_MISSINGcompany info had no tax_regime field (raw={raw_keys})
BLING_FETCH_REGIME_PERSIST_FAILEDcommerce_entity persist failed:

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "bling.fetch-regime",
  "initial_data": {
    "organization_uuid": "value",
    "connection_uuid": "value"
  }
}