Audience:
Developers
Request a collection review using the API
Ask Swan to review a supporting document collection once all required documents are uploaded, with the API.
Prerequisites
You should only call this mutation if the onboarding is finalized and the account holder exists.
The collection must have the status WaitingForDocument, and there must be at least one document in the collection with the status Uploaded.
Guide
- First, retrieve the collection ID (
supportingDocumentCollectionId). - Call the
requestSupportingDocumentCollectionReviewmutation. - Enter the collection ID retrieved in step 1.
- Add optional messages to the payload, either for validation or in case of rejection.
Mutation
Open in API Explorermutation RequestCollectionReview {
requestSupportingDocumentCollectionReview(
input: { supportingDocumentCollectionId: "$COLLECTION_ID" }
) {
... on RequestSupportingDocumentCollectionReviewSuccessPayload {
__typename
supportingDocumentCollection {
id
statusInfo {
status
}
}
}
... on ForbiddenRejection {
__typename
message
}
... on SupportingDocumentCollectionNotFoundRejection {
id
message
}
... on SupportingDocumentCollectionStatusNotAllowedRejection {
__typename
message
newStatus
oldStatus
}
}
}
Payload
Notice the status PendingReview.
You can also confirm this on your Dashboard. There should be an infobox in the supporting documents tab for this onboarding.
{
"data": {
"requestSupportingDocumentCollectionReview": {
"__typename": "RequestSupportingDocumentCollectionReviewSuccessPayload",
"supportingDocumentCollection": {
"id": "b52c51b4-8a23-45a2-b77a-e6d691f4578c",
"statusInfo": {
"status": "PendingReview"
}
}
}
}
}
Also available
Request a collection reviewFrom the Dashboard