Delete Documents

Delete an existing Base Document or Sub-Document

user_id :
required
string

The user ID of the user you wish to delete documents from

BODY PARAMETER

documents[id]:
required
string

ID of the document you wish to delete

documents[permission_scope]:
required
string

Action to delete document. To be able to delete the value, scope needs to be DELETE_DOCUMENT

EXAMPLE REQUEST

PATCH /v3.1/users/594e0fa2838454002ea317a0 HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267
X-SP-USER-IP: 127.0.0.1
X-SP-USER: oauth_1mtgLwhYHDVKop04XOEjyWJSsnQqZbGkfRF5ux9v|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json

{
  "documents":[{
    "id":"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
    "permission_scope":"DELETE_DOCUMENT"
  }]
}
PATCH /v3.1/users/594e0fa2838454002ea317a0 HTTP/1.1
Host: uat-api.synapsefi.com
X-SP-GATEWAY: client_id_2bb1e412edd311e6bd04e285d6015267|client_secret_2bb1e714edd311e6bd04e285d6015267
X-SP-USER-IP: 127.0.0.1
X-SP-USER: oauth_1mtgLwhYHDVKop04XOEjyWJSsnQqZbGkfRF5ux9v|e83cf6ddcf778e37bfe3d48fc78a6502062fc
Content-Type: application/json

{
  "documents":[{
    "id":"d02f580c1335a625ab2da2d7e53472d4e7fd664e633387654ebebe15ea696c91",
    "physical_docs":[{
    	"id":"c486c2cb8c1bce695fcfae3197e14aa5b8ddec184c2779d00d581abee5d9a04c",
    	"document_type":"DELETE_DOCUMENT",
    	"document_value":"data:image/gif;base64,SUQs=="
    }]
  }]
}
body = {
  "documents":[{
    "id":"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
    "permission_scope":"DELETE_DOCUMENT"
  }]
}

user.user_update(body)
const body = {
  "documents":[{
    "id":"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
    "permission_scope":"DELETE_DOCUMENT"
  }]
}

user.deleteExistingDocument(body);
body = {
  "documents":[{
    "id":"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
    "permission_scope":"DELETE_DOCUMENT"
  }]
}

user.user_update(payload: body)
$body = array (
  'documents' =>
  array (
    array (
      'id' => '2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8',
      "permission_scope" => "DELETE_DOCUMENT"
    )
  )
);

$client->update_info($body);
body := `{
  "documents":[{
    "id":"2a4a5957a3a62aaac1a0dd0edcae96ea2cdee688ec6337b20745eed8869e3ac8",
    "permission_scope":"DELETE_DOCUMENT"
  }]
}`

data, err := user.Update(body)

EXAMPLE RESPONSE

{
    "_id": "594e0fa2838454002ea317a0",
    "_links": {
        "self": {
            "href": "https://uat-api.synapsefi.com/v3.1/users/594e0fa2838454002ea317a0"
        }
    },
    "client": {
        "id": "589acd9ecb3cd400fa75ac06",
        "name": "SynapseFI"
    },
    "doc_status": {
        "physical_doc": "SUBMITTED|VALID",
        "virtual_doc": "SUBMITTED|VALID"
    },
    "documents": [
        {
            "id": "d02f580c1335a625ab2da2d7e53472d4e7fd664e633387654ebebe15ea696c91",
            "name": "Test User",
            "permission_scope": "SEND|RECEIVE|1000|DAILY",
            "physical_docs": [
                {
                    "document_type": "GOVT_ID",
                    "id": "c486c2cb8c1bce695fcfae3197e14aa5b8ddec184c2779d00d581abee5d9a04c",
                    "last_updated": 1498288964176,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "GOVT_ID",
                    "id": "70e3f32d8feba746347b5c0d820e8d7a218b955afbb612291a0a9922c93e8277",
                    "last_updated": 1498288964176,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "social_docs": [
                {
                    "document_type": "FACEBOOK",
                    "id": "8f314a6a53f36ee569455761e49a2a7fe790d251c5611c65255befdb303602b7",
                    "last_updated": 1498288964179,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "PHONE_NUMBER",
                    "id": "fda60784d6375bc44edafaaeae149626c4c13dcb92e85a2a7a00eec2cdfd2b6f",
                    "last_updated": 1498288964179,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "EMAIL",
                    "id": "2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741",
                    "last_updated": 1498288964179,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "IP",
                    "id": "28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a",
                    "last_updated": 1498288964179,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "virtual_docs": [
                {
                    "document_type": "SSN",
                    "id": "ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f",
                    "last_updated": 1498288964174,
                    "status": "SUBMITTED|VALID"
                }
            ]
        }
    ],
    "emails": [],
    "extra": {
        "cip_tag": 1,
        "date_joined": 1498288029784,
        "extra_security": false,
        "is_business": false,
        "last_updated": 1498289026881,
        "public_note": null,
        "supp_id": "122eddfgbeafrfvbbb"
    },
    "is_hidden": false,
    "legal_names": [
        "Test User"
    ],
    "logins": [
        {
            "email": "[email protected]",
            "scope": "READ_AND_WRITE"
        }
    ],
    "permission": "SEND-AND-RECEIVE",
    "phone_numbers": [
        "901.111.1111",
        "[email protected]"
    ],
    "photos": [],
    "refresh_token": "refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq"
}
{
    "_id": "594e0fa2838454002ea317a0",
    "_links": {
        "self": {
            "href": "https://uat-api.synapsefi.com/v3.1/users/594e0fa2838454002ea317a0"
        }
    },
    "client": {
        "id": "589acd9ecb3cd400fa75ac06",
        "name": "SynapseFI"
    },
    "doc_status": {
        "physical_doc": "SUBMITTED|VALID",
        "virtual_doc": "SUBMITTED|VALID"
    },
    "documents": [
        {
            "id": "d02f580c1335a625ab2da2d7e53472d4e7fd664e633387654ebebe15ea696c91",
            "name": "Test User",
            "permission_scope": "SEND|RECEIVE|1000|DAILY",
            "physical_docs": [
                {
                    "document_type": "GOVT_ID",
                    "id": "70e3f32d8feba746347b5c0d820e8d7a218b955afbb612291a0a9922c93e8277",
                    "last_updated": 1498289027916,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "social_docs": [
                {
                    "document_type": "EMAIL",
                    "id": "2c45158f6431ca874bbe82f63d5905567854dde4d8b81539944e5779e5eee741",
                    "last_updated": 1498289027918,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "FACEBOOK",
                    "id": "8f314a6a53f36ee569455761e49a2a7fe790d251c5611c65255befdb303602b7",
                    "last_updated": 1498289027918,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "PHONE_NUMBER",
                    "id": "fda60784d6375bc44edafaaeae149626c4c13dcb92e85a2a7a00eec2cdfd2b6f",
                    "last_updated": 1498289027918,
                    "status": "SUBMITTED|VALID"
                },
                {
                    "document_type": "IP",
                    "id": "28d9177b22c127d9a51d8903893864accf6e553ac326704a4c0d585eaad2516a",
                    "last_updated": 1498289027918,
                    "status": "SUBMITTED|VALID"
                }
            ],
            "virtual_docs": [
                {
                    "document_type": "SSN",
                    "id": "ee596c2896dddc19b76c07a184fe7d3cf5a04b8e94b9108190cac7890739017f",
                    "last_updated": 1498289027913,
                    "status": "SUBMITTED|VALID"
                }
            ]
        }
    ],
    "emails": [],
    "extra": {
        "cip_tag": 1,
        "date_joined": 1498288029784,
        "extra_security": false,
        "is_business": false,
        "last_updated": 1498289172373,
        "public_note": null,
        "supp_id": "122eddfgbeafrfvbbb"
    },
    "is_hidden": false,
    "legal_names": [
        "Test User"
    ],
    "logins": [
        {
            "email": "[email protected]",
            "scope": "READ_AND_WRITE"
        }
    ],
    "permission": "SEND-AND-RECEIVE",
    "phone_numbers": [
        "901.111.1111",
        "[email protected]"
    ],
    "photos": [],
    "refresh_token": "refresh_ehG7YBS8ZiD0sLa6PQHMUxryovVkJzElC5gWROXq"
}

Removing User

If there is only one base document, the "delete document" request will be unsuccessful.

If you wish to remove the user, Lock & Remove the user.