Mule Account Database

Report an account

POST/v1/report_mule_account

Reports a suspected mule account with the identity information you hold on it; the response carries the mule account face id and a result message.

Request

MethodPOST
Path/v1/report_mule_account
Content-Typeapplication/json
Auth requiredYes — HMAC signing
NameTypeRequiredDescription
imageimageOptionalImage of the identity card's front side.
account_identifieraccount_identifierRequiredContains info about the account holder's identity.
  • At least one of the following must be provided: image OR national_id in account_identifier.
  • In the account_identifier object, at least one field (excluding the flag field) must be provided.
JSON
{
    "image": {
        "id": string,
        "base64": string,
        "label": string,
        "metadata": json,
        "embedding": []float
    },
    "account_identifier": {
        "national_id": string,
        "identifier_type": string,
        "flag": string,
        "country": string,
        "dob": string,
        "first_name": string,
        "last_name": string,
        "middle_name": string,
        "metadata": JSON
    }
}

The flag parameter

flag is the one field on account_identifier that this endpoint documents and Search for an account does not.

NameTypeRequiredDescription
flagstringOptionalFlag to indicate the type of report: (reported, suspected, confirmed, blacklisted, convicted)

Sample request

curl -X POST \
https://tv-staging.trustingsocial.com/api/v1/report_mule_account \
-H 'Authorization: TV <YOUR ACCESS KEY>:<CREATED SIGNATURE>' \
-H 'X-TV-Timestamp: 2019-04-21T18:00:15+07:00' \
-H 'Content-Type: application/json' \
-d \
'
{

    "account_identifier": {
        "national_id": "098765432109",
        "identifier_type": "national_id",
        "flag": 1,
        "country": "VN",
        "dob": "1995-08-15",
        "first_name": "B",
        "middle_name": "VĂN",
        "last_name": "NGUYỄN"
    },
    "image": {
        "id": "a4facba3-334b-41fb-97e3-4766cb70ae29",
    }
}
'

Response

data.status is either "success" or "failure" depending on whether the request has been successfully processed. When processing has finished the HTTP status code is 200, so a 200 on its own only means the request was handled. data.id is the mule account face id, and data.message is one of "success", "update_success" or "only_one_face_image_or_embedding". The errors array alongside data is the same on both endpoints — see Errors.

JSON
{
    "data": {
        "status": string, "success" or "failure"
        "id": string, // mule account face ID
        "message": string, "success" or "update_success" or "only_one_face_image_or_embedding"
        "metadata": JSON
    },
    "errors": [
            {
                "code": string,
                "message": string,
                "detail": {
                    "field": string, // optional, which parameter is invalid.
                    ... // any other information that can be useful for client
                },
            },
            ... // other errors
        ]
}

A report that was processed successfully:

JSON
{
    "data": {
        "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
        "message": "success",
        "metadata": {},
        "status": "success"
    }
}

Failure codes

If the data.status is "failure", the "errors" field will tell you why it failed.

Error codeDescription
image_too_blurthe input image is too blur
image_too_darkthe input image is too dark
image_too_brightthe input image is too bright (glare)

In case of any other errors, the data field will be empty, and the server sends an HTTP status code with an error code instead.

Transport, auth and rate-limit errors are the same on both calls — see Common objects & errors.