Pular para o conteúdo principal

Event reference

To register the URL that receives the notifications, see Register and receive webhooks.

Authentication headers​

Amplia Reg sends the secret registered on the webhook in a header, according to the authentication type. The secret is sent exactly as registered.

Authentication typeHeader sent
BearerAuthorization: Bearer <secret>
ApiKeyX-Api-Key: <secret>
CustomAuthorizationHeaderAuthorization: <secret>
BasicAuthorization: Basic <secret>
No authentication(none)

Request format​

Each notification is a POST request with a JSON body (Content-Type: application/json) with three fields:

FieldContent
typeThe event type. See Events
orderStatusTransitionModelThe status change data, when type is OrderStatusChanged. null for other events
videoIdentificationCompletedModelThe video identification result, when type is OrderVideoIdentificationCompleted. null for other events

Events​

The type field says which event the notification is about:

typeWhen it is sentPayload field
OrderStatusChangedOn every status change of the order, including its creationorderStatusTransitionModel
OrderVideoIdentificationCompletedWhen the holder finishes the self-service video identification of a video identification ordervideoIdentificationCompletedModel

Status change fields​

FieldDescription
orderIdOrder ID
orderNumberOrder number
orderSaleNumberOrder number in your sales system, if one was given when the order was created
previousStatusStatus before the change; null when the order is created
statusNew status. See Order statuses
dateDate and time of the change
validationAgent, confirmationAgentAgents assigned to the order at the time of the change (id, name, identifier, birthDate), or null
isConfirmationAgentAnonymizedtrue when confirmationAgent was omitted because the subscription that made the call is not allowed to see it
descriptionFree text entered with the change: the cancellation reason, the agent's explanation when sending the order back, declining it or revoking the certificate, or a note entered when the order was submitted or approved. null if none
pendencyReasonWhen status is Pending: why the order was sent back. DataMismatch, TypingError, BadFiles, BryPSBioFraudSuspected, RedoSaf, RedoVideoconference or Other
declineReasonWhen status is Declined: why the order was declined. SubjectDataChanged, KeyGenFailed, ExpiredDocuments, OfficialDocumentsMismatch, ExtemporaneousQuery, BryPSBioFraud, BryPSBioDeleted, BryPSBioVideoconferenceEnroll, InternalAuditIrregularIssuance or Other
revocationReasonWhen status is Revoked: why the certificate was revoked. RequestedBySubject, ViolationOrImproperUse, JudicialOrder, DeathOrExtinction, ActivityCessation, DiscoveryOfFalsityOrInaccuracyOfData, BryPSBioFraud, BryPSBioDeleted, InternalAuditIrregularIssuance, RevokedBySubject or Other
reasonDescShort label for the reason, required when the reason is Other

New values may be added to these lists. Treat an unknown value as Other.

Video identification fields​

FieldDescription
numberOrder number
sessionIdID of the video identification session
successOverall result of the video identification
faceLivenessStatusLiveness check: provider, success and attemptCount
idCaptureStatusCapture of the ID document: success, matchedFace and matchedFaceLevel
idCaptureFieldsData read from the document: documentCountry, documentType, fullName, firstName, lastName, cpf, dateOfBirth, dateOfIssue and dateOfExpiration
recordingStatusVideo recording: sha256, durationMs, processed, framesAnalyzedCount, framesAverageMatchLevel and framesAverageNormalizedMatchLevel

The values come from the video identification service, and several fields can be null. The number and sessionId fields identify an OrderVideoIdentificationCompleted notification.

Payload examples​

note

The examples below are formatted for readability only; JSON is sent without formatting. Every field is always present, with null when it has no value.

Order created​

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": null,
"status": "WaitingValidation",
"date": "2025-03-18T15:26:11.704304+00:00",
"validationAgent": null,
"confirmationAgent": null,
"isConfirmationAgentAnonymized": false,
"description": null,
"pendencyReason": null,
"declineReason": null,
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Order created with video identification​

Orders with the video identification issue type start in WaitingVideoIdentification. When the holder finishes the recording, the order moves to WaitingValidation.

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": null,
"status": "WaitingVideoIdentification",
"date": "2025-03-18T15:28:02.114905+00:00",
"validationAgent": null,
"confirmationAgent": null,
"isConfirmationAgentAnonymized": false,
"description": null,
"pendencyReason": null,
"declineReason": null,
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Order under validation​

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": "WaitingValidation",
"status": "InValidation",
"date": "2025-03-18T15:27:28.358558+00:00",
"validationAgent": {
"id": "0bcc8325-7122-4e5d-80b4-720beec03ede",
"name": "John Doe",
"identifier": "16545693050",
"birthDate": "1988-04-01T00:00:00"
},
"confirmationAgent": null,
"isConfirmationAgentAnonymized": false,
"description": null,
"pendencyReason": null,
"declineReason": null,
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Order waiting resources​

The agent finished the validation, but the order waits for the result of external checks.

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": "InValidation",
"status": "WaitingResources",
"date": "2025-03-18T15:28:02.114905+00:00",
"validationAgent": {
"id": "0bcc8325-7122-4e5d-80b4-720beec03ede",
"name": "John Doe",
"identifier": "16545693050",
"birthDate": "1988-04-01T00:00:00"
},
"confirmationAgent": null,
"isConfirmationAgentAnonymized": false,
"description": null,
"pendencyReason": null,
"declineReason": null,
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Order waiting confirmation​

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": "InValidation",
"status": "WaitingConfirmation",
"date": "2025-03-18T15:28:54.772066+00:00",
"validationAgent": {
"id": "0bcc8325-7122-4e5d-80b4-720beec03ede",
"name": "John Doe",
"identifier": "16545693050",
"birthDate": "1988-04-01T00:00:00"
},
"confirmationAgent": null,
"isConfirmationAgentAnonymized": false,
"description": null,
"pendencyReason": null,
"declineReason": null,
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Order under confirmation​

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": "WaitingConfirmation",
"status": "InConfirmation",
"date": "2025-03-18T15:29:20.118344+00:00",
"validationAgent": {
"id": "0bcc8325-7122-4e5d-80b4-720beec03ede",
"name": "John Doe",
"identifier": "16545693050",
"birthDate": "1988-04-01T00:00:00"
},
"confirmationAgent": {
"id": "5d2f8a41-93c7-4b0e-a1d6-2f7c9e3b8a10",
"name": "Maria Silva",
"identifier": "52998224725",
"birthDate": "1990-07-12T00:00:00"
},
"isConfirmationAgentAnonymized": false,
"description": null,
"pendencyReason": null,
"declineReason": null,
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Order sent back for correction​

The confirmation agent sent the order back to the validation agent. pendencyReason says why, and description carries the agent's explanation.

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": "InConfirmation",
"status": "Pending",
"date": "2025-03-18T15:29:47.502913+00:00",
"validationAgent": {
"id": "0bcc8325-7122-4e5d-80b4-720beec03ede",
"name": "John Doe",
"identifier": "16545693050",
"birthDate": "1988-04-01T00:00:00"
},
"confirmationAgent": {
"id": "5d2f8a41-93c7-4b0e-a1d6-2f7c9e3b8a10",
"name": "Maria Silva",
"identifier": "52998224725",
"birthDate": "1990-07-12T00:00:00"
},
"isConfirmationAgentAnonymized": false,
"description": "The photo of the identity document is unreadable. Please upload it again.",
"pendencyReason": "BadFiles",
"declineReason": null,
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Order approved (waiting issue)​

If confirmation is not required, the order goes from InValidation (or WaitingResources) straight to WaitingIssue, and confirmationAgent is null.

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": "InConfirmation",
"status": "WaitingIssue",
"date": "2025-03-18T15:30:14.052941+00:00",
"validationAgent": {
"id": "0bcc8325-7122-4e5d-80b4-720beec03ede",
"name": "John Doe",
"identifier": "16545693050",
"birthDate": "1988-04-01T00:00:00"
},
"confirmationAgent": {
"id": "5d2f8a41-93c7-4b0e-a1d6-2f7c9e3b8a10",
"name": "Maria Silva",
"identifier": "52998224725",
"birthDate": "1990-07-12T00:00:00"
},
"isConfirmationAgentAnonymized": false,
"description": null,
"pendencyReason": null,
"declineReason": null,
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Certificate issued​

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": "WaitingIssue",
"status": "Issued",
"date": "2025-03-18T15:35:02.987120+00:00",
"validationAgent": {
"id": "0bcc8325-7122-4e5d-80b4-720beec03ede",
"name": "John Doe",
"identifier": "16545693050",
"birthDate": "1988-04-01T00:00:00"
},
"confirmationAgent": {
"id": "5d2f8a41-93c7-4b0e-a1d6-2f7c9e3b8a10",
"name": "Maria Silva",
"identifier": "52998224725",
"birthDate": "1990-07-12T00:00:00"
},
"isConfirmationAgentAnonymized": false,
"description": null,
"pendencyReason": null,
"declineReason": null,
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Certificate revoked​

revocationReason says why the certificate was revoked, and description carries the explanation entered with the revocation.

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": "Issued",
"status": "Revoked",
"date": "2025-03-18T15:52:40.230571+00:00",
"validationAgent": {
"id": "0bcc8325-7122-4e5d-80b4-720beec03ede",
"name": "John Doe",
"identifier": "16545693050",
"birthDate": "1988-04-01T00:00:00"
},
"confirmationAgent": {
"id": "5d2f8a41-93c7-4b0e-a1d6-2f7c9e3b8a10",
"name": "Maria Silva",
"identifier": "52998224725",
"birthDate": "1990-07-12T00:00:00"
},
"isConfirmationAgentAnonymized": false,
"description": "Revocation requested by the holder.",
"pendencyReason": null,
"declineReason": null,
"revocationReason": "RequestedBySubject",
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Order declined​

declineReason says why the order was declined, and description carries the confirmation agent's explanation.

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": "InConfirmation",
"status": "Declined",
"date": "2025-03-18T15:30:31.774102+00:00",
"validationAgent": {
"id": "0bcc8325-7122-4e5d-80b4-720beec03ede",
"name": "John Doe",
"identifier": "16545693050",
"birthDate": "1988-04-01T00:00:00"
},
"confirmationAgent": {
"id": "5d2f8a41-93c7-4b0e-a1d6-2f7c9e3b8a10",
"name": "Maria Silva",
"identifier": "52998224725",
"birthDate": "1990-07-12T00:00:00"
},
"isConfirmationAgentAnonymized": false,
"description": "The holder's identity document expired before the validation.",
"pendencyReason": null,
"declineReason": "ExpiredDocuments",
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Order canceled​

description carries the reason sent in the cancellation request.

{
"type": "OrderStatusChanged",
"orderStatusTransitionModel": {
"orderId": "0195a9dc-c0f0-4f5c-83d3-bf562ae98ed9",
"orderNumber": "800-005-520",
"orderSaleNumber": null,
"previousStatus": "WaitingIssue",
"status": "Canceled",
"date": "2025-03-18T15:31:04.346843+00:00",
"validationAgent": {
"id": "0bcc8325-7122-4e5d-80b4-720beec03ede",
"name": "John Doe",
"identifier": "16545693050",
"birthDate": "1988-04-01T00:00:00"
},
"confirmationAgent": {
"id": "5d2f8a41-93c7-4b0e-a1d6-2f7c9e3b8a10",
"name": "Maria Silva",
"identifier": "52998224725",
"birthDate": "1990-07-12T00:00:00"
},
"isConfirmationAgentAnonymized": false,
"description": "Cancellation requested by customer",
"pendencyReason": null,
"declineReason": null,
"revocationReason": null,
"reasonDesc": null
},
"videoIdentificationCompletedModel": null
}

Video identification completed​

Sent for video identification orders, when the holder finishes recording, together with the OrderStatusChanged notification of the order's move to WaitingValidation. The values come from the video identification service: the ones below are only illustrative.

{
"type": "OrderVideoIdentificationCompleted",
"orderStatusTransitionModel": null,
"videoIdentificationCompletedModel": {
"number": "800-005-520",
"sessionId": "7c1e4b9a-2f3d-4e8a-9b6c-1d2e3f4a5b6c",
"success": true,
"faceLivenessStatus": {
"provider": "<provider>",
"success": true,
"attemptCount": 1
},
"idCaptureStatus": {
"success": true,
"matchedFace": true,
"matchedFaceLevel": 92
},
"recordingStatus": {
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"durationMs": 48210.0,
"processed": true,
"framesAnalyzedCount": 120,
"framesAverageMatchLevel": 0.91,
"framesAverageNormalizedMatchLevel": 0.88
},
"idCaptureFields": {
"documentCountry": "BRA",
"documentType": "<document type>",
"fullName": "HOLDER NAME",
"firstName": "HOLDER",
"lastName": "NAME",
"cpf": "07917307000",
"dateOfBirth": "1995-10-15T00:00:00+00:00",
"dateOfIssue": "2021-03-02T00:00:00+00:00",
"dateOfExpiration": "2031-03-01T00:00:00+00:00"
}
}
}

See also​

View as Markdown