Reprocess a stuck command
Hands a stuck command to the PCR back to the resend. Send the operator’s reason.
Providers: Lerian (PCR).
How it works
- A command can be reprocessed when it got no answer beyond the limit, or was refused for a reason of the institution (
0011,0012). - It can also be reprocessed when it was refused for a configuration defect (
0031,channelHintagainst the installation’s policy). Reprocess it only after the configuration is fixed. - These commands sit in the queue
STUCK_PCR_COMMAND. - The resend uses the same idempotency key of the command. After the 24 hours the PCR keeps the key, collections first queries by
externalIdand adopts the existing boleto. It never creates two registrations. - A command refused for good, for an error of the request, cannot be reprocessed.
- After a
0014(key in use) with a nosso número generated by collections, reprocessing is refused. A resend with the same number gives0014again, and the pending boleto keeps that number with no way to change it. - In that case, close the command with
POST /v1/collections/pcr-commands/{command_id}/close. The title moves toFAILEDwith classCOLLECTIONS_DEFECT, and the client receivesBOLETO_FAILEDand issues again. The new number comes with the new issuance. The number that collided stays held. - A retry under the same
Idempotency-Keyreturns the stored answer.
POST
Reprocess a stuck command
Headers
Idempotency key of the client, a UUID. Missing or invalid: 400 PBP-0012; an earlier request with the same key still running: 409 PBP-0007; the same key with another body: 422 PBP-0013. Afterwards, the same key returns the stored answer.
Example:
"5f2b8a8e-3c1d-4f7a-9b2e-6d4c1a0e9f11"
Body
application/json
Response
OK. The action is recorded in the audit trail. outcome says whether the effect is already applied or follows in the background, under a stable key.
What the action did.
Available options:
RELEASE_WRITE_OFF, CANCEL_SCHEDULED_RELEASE, UNHOLD_WRITE_OFF, REVERSE_WRITE_OFF, REPROCESS_CREDIT_ENTRY, REPROCESS_PCR_COMMAND, CLOSE_PCR_COMMAND, SETTLE_SUBMISSION_FAILURE, ASSOCIATE_PCR_NOTICE, DISCARD_PCR_NOTICE, APPLY_PCR_NOTICE, WRITE_OFF_LATE_REGISTRATION, ENABLE_ACCOUNT, CREATE_ENABLEMENT_BATCH, APPROVE_ENABLEMENT, REJECT_ENABLEMENT, DISABLE_BENEFICIARY, CORRECT_AGREEMENT_DIVERGENCE, ADOPT_AGREEMENT_DIVERGENCE, BULK_ADOPT_AGREEMENT_DIVERGENCES, CREATE_AGREEMENT, UPDATE_AGREEMENT, CLOSE_AGREEMENT, REPROCESS_AGREEMENT_CLOSURE, FORCE_CLOSE_AGREEMENT, LINK_POOLED_ACCOUNT, REMOVE_POOLED_ACCOUNT_LINK, PUT_PCR_CONNECTION, PUT_COLLECTIONS_SETTINGS, SYNC_PCR_SUBSCRIPTION, ROTATE_PCR_NOTICE_SECRET, REDELIVER_PCR_NOTICE Example:
"REDELIVER_PCR_NOTICE"
Kind of resource the action acted on.
Available options:
TITLE, WRITE_OFF, CREDIT_ENTRY, PCR_COMMAND, PCR_NOTICE, BENEFICIARY, ENABLEMENT_BATCH, AGREEMENT, AGREEMENT_DIVERGENCE, POOLED_ACCOUNT_LINK, PCR_CONNECTION, PCR_SUBSCRIPTION, PCR_WEBHOOK_DELIVERY, COLLECTIONS_SETTINGS, ACCOUNT Example:
"PCR_WEBHOOK_DELIVERY"

