Configure the provider of one operation
Sets (or removes, with providerType: null) the provider of one operation type for the tenant of the credentials you authenticate with. The tenant chooses among the providers enabled for it: mounted on this installation and connected to the tenant. The write and its history line are recorded in one transaction, with the actor (the person or the machine credential that called), the instant, the previous and the new provider, the reason and the trace.
VALIDATION AGAINST STATE, in this order; any refusal writes nothing and answers 422 PBP-0702 with the extension member reason: UNKNOWN_OPERATION (operation_type is not BOLETO_ISSUANCE, BANKSLIP_PAYMENT, BARCODE_BILL_PAYMENT or DARF_PAYMENT), PROVIDER_NOT_INSTALLED (the provider is not mounted on this installation), PROVIDER_NOT_CONNECTED (the provider’s port answers that it is not connected to the tenant), CAPABILITY_MISSING (the provider does not declare the operation), NO_CHANGE (the provider is already the current one), PROVIDER_SWITCH_UNAVAILABLE (the write names, for BOLETO_ISSUANCE, a provider other than the one issuance is held to: the route’s current provider, after a removal the provider the route last had, and, for a tenant with no route and no route history that issued boletos before routes existed, BTG. The route and its history decide it, not the boletos issued: a tenant that configured BTG and never issued is held to BTG as well. Moving issuance between providers is refused; the first configuration of a tenant with no route, no route history and no boleto, removing the provider and setting the same provider back are accepted).
OPTIMISTIC CONCURRENCY. version must be the operation’s current version (0 when never configured), read with getProviderRoutes. A stale version is refused with 409 PBP-0705: read again and send the write with the current version and a NEW Idempotency-Key.
EFFECT. Only NEW operations go to the new provider. Records already created stay with their recorded provider until they finish: their consultation, cancellation and settlement keep going to it.
IDEMPOTENT under Idempotency-Key: a retry with the same key replays the stored 200. A missing or malformed key is refused with 400 PBP-0012.
WHO MAY CALL IT: provider-routes:configure; otherwise 403 PBP-0004. It is a permission of its own, apart from admin:create.
Headers
Path Parameters
Operation type whose provider is set: BOLETO_ISSUANCE, BANKSLIP_PAYMENT, BARCODE_BILL_PAYMENT or DARF_PAYMENT. Any other well-formed name is refused with 422 PBP-0702 reason UNKNOWN_OPERATION; a value outside the pattern with 400 PBP-0001.
1 - 50^[A-Z][A-Z0-9_]*$"BOLETO_ISSUANCE"
Body
The provider, the reason and the version read.

