bling.create-receivable ​
Create a new accounts-receivable row at Bling (POST /contas/receber). Persists into commerce_entity (entity_type='receivable').
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-bling |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
connection_uuid | uuid | Yes | — | — |
counterparty_external_ref | string | Yes | — | Bling customer (contato) id |
amount | string | Yes | — | — |
due_date | string | Yes | — | — |
issue_date | string | No | — | — |
document_number | string | No | — | — |
description | string | No | — | — |
payment_method_external_ref | string | No | — | — |
financial_category_external_ref | string | No | — | — |
idempotency_key | string | No | — | — |
actor | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
connection_uuid | uuid | Yes | — | — |
counterparty_external_ref | string | Yes | — | Bling customer (contato) id |
amount | string | Yes | — | — |
due_date | string | Yes | — | — |
issue_date | string | No | — | — |
document_number | string | No | — | — |
description | string | No | — | — |
payment_method_external_ref | string | No | — | — |
financial_category_external_ref | string | No | — | — |
idempotency_key | string | No | — | — |
actor | string | No | — | — |
provider_resource_ref | string | No | — | — |
commerce_entity_uuid | uuid | No | — | — |
created_at_iso | string | No | — | — |
failure_reason | string | No | — | — |
failed_at | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | json | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
initiated | Yes | No | — | create | Create requested |
completed | No | Yes | Yes | — | Receivable created + persisted |
failed | No | Yes | No | — | Create failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
initiated | create | completed | — |
initiated | fail | failed | — |
Business Errors ​
| Code | Message Template |
|---|---|
BLING_CONNECTION_NOT_FOUND | Bling connection {connection_uuid} not found in organization |
BLING_CONNECTION_WRONG_PROVIDER | Connection {connection_uuid} is not a Bling connection |
BLING_RECEIVABLE_MISSING_FIELD | {field} is required to create a Bling receivable |
BLING_RECEIVABLE_CREATE_FAILED | Bling refused receivable create: |
BLING_RECEIVABLE_PERSIST_FAILED | commerce_entity persist failed: |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "bling.create-receivable",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"counterparty_external_ref": "value",
"amount": "value"
}
}