Skip to main content

Mocks (Sandbox)

API under development

The API is still in development phase, therefore, this manual is subject to changes.

The homologation (sandbox) environment has a mock system that simulates different SNG/B3 response scenarios during lien registration. The behavior is controlled by the borrower's name field when creating the debt (POST /debt).

Default Flow (Success)

Any name that is not in the scenario list below will follow the default success flow: the lien will be registered (reserved), followed by automatic contract creation (pending_registration_confirmation) and progression to disbursement. Two webhooks are sent in sequence: reservation.status_change (status reserved) and contract.status_change (status pending_registration_confirmation). For details on the webhook structure, see the Webhooks page.


Available Scenarios

Field Validation Error (HTTP 400)

When using the name bob, the lien creation is rejected with field validation errors in the payload.

NameStageResulting StatusWebhook
bobLien creationpending_requester_actionYes
Full webhook example
{
"event_key": "a23bc45d-67ef-8901-abcd-234567890abc",
"event_type": "laas.vehicle_collateral.reservation.status_change",
"origin": "vehicle_collateral",
"origin_key": "<reservation_key>",
"person_key": "<requester_key>",
"receiver_contact": null,
"data": {
"callback": {
"webhook_type": "laas.vehicle_collateral.reservation.status_change",
"status": "pending_requester_action",
"event_datetime": "2026-04-08T15:30:00.000Z",
"data": {
"contract_number": "CTR-2026-001",
"rejection_details": [
{
"campo": "logradouroDevedor",
"mensagem": "caracter inválido / acima do tamanho permitido / tipo inválido / Ausência do campo"
},
{
"campo": "numTelDevedor",
"mensagem": "caracter inválido / acima do tamanho permitido"
}
]
}
}
}
}

Business Errors During Lien Confirmation

The scenarios below are triggered during the status confirmation stage. All result in pending_requester_action and send a webhook with error_code.

NameErrorerror_code
carolVehicle already has a registered financial restrictionvehicle_has_financial_restriction_already_registered
daveChassis not found in BINchassis_not_found_in_bin
frankPlate in BIN, provide the vehicle plateplate_in_bin_inform_plate_of_vehicle
georgePlate divergent from BIN baseplate_informed_different_from_plate_informed_by_uf_of_registration_in_bin_base
ianProperty number does not match the postal codeproperty_number_does_not_correspond_to_informed_postal_code
jackRENAVAM divergentrenavam_informed_different_from_renavam_informed_by_uf_of_registration_in_bin_base
kateInvalid property stateproperty_uf_invalid
maryAddress with invalid fillfinancied_address_with_invalid_fill
oliveModel year divergent from BINmodel_year_informed_different_from_model_year_in_bin
quinnOpen protocol in licensing stateprotocol_open_in_uf_of_registration
saraInvalid borrower name and addressfinancied_name_and_address_with_invalid_fill
taylorInvalid borrower namefinancied_name_with_invalid_fill
vincentVehicle already reserved in state basevehicle_already_reserved_in_state_base
Full webhook example (carol scenario)
{
"event_key": "<uuid>",
"event_type": "laas.vehicle_collateral.reservation.status_change",
"origin": "vehicle_collateral",
"origin_key": "<reservation_key>",
"person_key": "<requester_key>",
"receiver_contact": null,
"data": {
"callback": {
"webhook_type": "laas.vehicle_collateral.reservation.status_change",
"key": "<reservation_key>",
"status": "pending_requester_action",
"event_datetime": "2026-04-08T15:30:00.000Z",
"data": {
"contract_number": "CTR-2026-001",
"error_code": "vehicle_has_financial_restriction_already_registered",
"error_reason_en": "Vehicle has financial restriction already registered",
"error_reason_pt": "Veículo com restrição financeira já cadastrada"
}
}
}
}

Definitive Refusal (no webhook)

In these cases, the reservation is definitively refused. No webhook is sent to the client.

NameErrorResulting Status
eveRestriction in manufacturing BINrefused
robertVehicle with restrictionrefused

Automatic Reprocessing (no webhook)

In these cases, the message is returned for automatic reprocessing. No webhook is sent to the client.

NameErrorBehavior
gabrielUnknown errorAutomatic reprocessing
henryOwner divergent in sale communicationAutomatic reprocessing
lindaRestriction in licensing stateAutomatic reprocessing
nancyAddress name exceeds 30 charactersAutomatic reprocessing
paulPhone number exceeds 9 charactersAutomatic reprocessing
williamUnknown errorAutomatic reprocessing

Summary Table

NameStageResulting StatusWebhookType
bobCreation (HTTP 400)pending_requester_actionYesreservation.status_change with rejection_details
carolConfirmationpending_requester_actionYesreservation.status_change with error_code
daveConfirmationpending_requester_actionYesreservation.status_change with error_code
eveConfirmationrefusedNo
frankConfirmationpending_requester_actionYesreservation.status_change with error_code
georgeConfirmationpending_requester_actionYesreservation.status_change with error_code
gabrielConfirmationReprocessingNo
henryConfirmationReprocessingNo
ianConfirmationpending_requester_actionYesreservation.status_change with error_code
jackConfirmationpending_requester_actionYesreservation.status_change with error_code
kateConfirmationpending_requester_actionYesreservation.status_change with error_code
lindaConfirmationReprocessingNo
maryConfirmationpending_requester_actionYesreservation.status_change with error_code
nancyConfirmationReprocessingNo
oliveConfirmationpending_requester_actionYesreservation.status_change with error_code
paulConfirmationReprocessingNo
quinnConfirmationpending_requester_actionYesreservation.status_change with error_code
robertConfirmationrefusedNo
saraConfirmationpending_requester_actionYesreservation.status_change with error_code
taylorConfirmationpending_requester_actionYesreservation.status_change with error_code
vincentConfirmationpending_requester_actionYesreservation.status_change with error_code
williamConfirmationReprocessingNo
(other)reserved + pending_registration_confirmationYes (2x)reservation.status_change + contract.status_change
Attention

The mocks above simulate only the lien registration (reservation) stage. The contract registration and image submission flow does not have dedicated mocks in the homologation environment.