MBTrust Document selection

Calling the mbtrust.execute endpoint and providing the documents parameter will trigger the document selection flow as described below.

Documents Parameter Behaviors

The documents parameter controls which documents are included in the DOCUMENT_SYNC operation:

ScenarioBehavior
Parameter omittedAll eligible documents associated with the business application are synced
Valid document IDsOnly the specified documents are fetched and synced
Mix of valid and invalid IDsValid documents are synced; invalid IDs generate errors in the response (partial success)
All invalid IDsDOCUMENT_SYNC operation fails with ENTITY_NOT_FOUND errors

Document Validation Process

When documents.uploaded_documents is provided:

Each document ID is validated, If some documents are found and others are not, valid documents proceed to sync. Invalid document IDs are reported in the mbtrust.get response under execution_results[].errors

Example: Partial Document Sync Success

Request with one valid and one invalid document:

{
  "mbtrust_id": "ape_4kz3kXp8dL2Xnj97xzFMuG",
  "documents": {
    "uploaded_documents": [
      "d_validDocument123",
      "d_nonExistentDoc456"
    ]
  }
}

After execution completes, mbtrust.get will show:

{
    "meta": {
        "status": "SUCCESS",
        "version": "2025-03-24",
        "trace_id": "trc_5sUyxQTincxEYaMAjq3uTR"
    },
    "data": {
        "mbtrust": {
            "provisioning_type": "MBTRUST",
            "provisioning_sponsor": "MERRICK",
            "status": "ACTIVE",
            "workflow_id": "w_68CgAnGvBd6ESknIlM8nkI",
            "subject_record_id": "sr_41NNRpxrCdvBB9c9asHZPL",
            "created_at": "2026-03-09T21:11:34.884Z",
            "updated_at": "2026-03-09T21:11:46.665Z",
            "mbtrust_id": "ape_31mPs6dbvGw3swfLA9ctI",
            "execution_results": [
                {
                    "operation_id": "apo_2Us8Fkyys864mf9R0YWtEa",
                    "operation_type": "document_sync",
                    "status": "SUCCESS",
                    "started_at": "2026-03-09T21:12:35.243Z",
                    "finished_at": "2026-03-09T21:12:35.967Z",
                    "errors": [
                        {
                            "code": "ENTITY_NOT_FOUND",
                            "message": "The given entity(s) does not exist.",
                            "details": [
                                {
                                    "document_id": "d_nonExistentDoc456"
                                }
                            ]
                        }
                    ],
                    "documents": {
                        "uploaded_documents": [
                            "d_validDocument123"
                        ]
                    },
                    "provider_response": {
                        "code": "SUCCESS",
                        "message": "Merchant supporting documents uploaded successfully",
                        "details": {
                            "success": true,
                            "message": "Merchant supporting documents uploaded successfully",
                            "data": {
                                "status": "",
                                "mid": "",
                                "isoId": ""
                            },
                            "errors": []
                        }
                    }
                },
                {
                    "operation_id": "apo_3Z69ZHYcyL59Bo9tL9Is9W",
                    "operation_type": "onboarding",
                    "status": "SUCCESS",
                    "started_at": "2026-03-09T21:11:46.472Z",
                    "finished_at": "2026-03-09T21:11:47.454Z",
                    "errors": [],
                    "provider_response": {
                        "code": "SUCCESS",
                        "message": "Merchant onboarded successfully",
                        "external_reference_id": 6564646089208125202,
                        "details": {
                            "success": true,
                            "message": "Merchant onboarded successfully",
                            "data": {
                                "status": "NotSubmitted",
                                "mid": 6564646089208125202,
                                "isoId": 58
                            },
                            "errors": []
                        }
                    }
                }
            ]
        }
    }
}