> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idmetagroup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Australia AEC Electoral sandbox

> Predetermined API payloads to retrieve every Australia AEC Electoral status in sandbox mode.

Sandbox payloads for the [AUS AEC Electoral](https://docs.idmetagroup.com/api-reference/government-data/australia/au-aec-electoral/au-aec-electoral.md) endpoint.

```http theme={null}
POST /api/v3/verifications/australia/aec
```

When your account is in sandbox mode, these payloads return the outcomes shown below. No credit is reserved or charged.

Every field in the request body selects the scenario, so send each payload exactly as shown. Values are case-sensitive, and adding an optional field that a sample leaves out, or leaving out one that it includes, returns the [details not on record](#rejected) response. `dob` is the exception: send it as `DD-MM-YYYY` or `YYYY-MM-DD`. `createdAt` is generated per request, and `trustFlowId`, `trustValidationId` and `metadata` are echoed back from your request and trust validation.

See [Sandbox introduction](https://docs.idmetagroup.com/api-reference/sandbox.md) for the shared sandbox rules.

### Verified

In `data`, `isValid` is `true` when `VerificationResultCode` is `1`. `ActivityId` and `VerificationRequestNumber` are fixed sandbox values. In live they are unique to each request.

> [accordion] VERIFIED — Sample 1: Jane Taylor
>
> **Request**
>
> ```json theme={null}
> {
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "familyName": "TAYLOR",
>   "givenName": "JANE",
>   "dob": "29-12-1990",
>   "enrolmentNumber": "1234567"
> }
> ```
>
> **Response** — HTTP `200`
>
> ```json theme={null}
> {
>   "success": true,
>   "message": "Australia AEC Electoral processed successfully",
>   "data": {
>     "isValid": true,
>     "ActivityId": "SANDBOX-AEC-0001",
>     "OriginatingAgencyCode": "IDM001",
>     "VerificationRequestNumber": "SANDBOX-0001",
>     "VerificationResultCode": 1
>   },
>   "verificationStatus": "VERIFIED",
>   "verificationStatusCode": 3,
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "verificationType": "australia_aec",
>   "metadata": null,
>   "createdAt": "<UTC timestamp of the request>"
> }
> ```

> [accordion] VERIFIED — Sample 2: Linh Nguyen
>
> **Request**
>
> ```json theme={null}
> {
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "familyName": "NGUYEN",
>   "givenName": "LINH",
>   "dob": "29-12-1990",
>   "enrolmentNumber": "1234567"
> }
> ```
>
> **Response** — HTTP `200`
>
> ```json theme={null}
> {
>   "success": true,
>   "message": "Australia AEC Electoral processed successfully",
>   "data": {
>     "isValid": true,
>     "ActivityId": "SANDBOX-AEC-0003",
>     "OriginatingAgencyCode": "IDM001",
>     "VerificationRequestNumber": "SANDBOX-0003",
>     "VerificationResultCode": 1
>   },
>   "verificationStatus": "VERIFIED",
>   "verificationStatusCode": 3,
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "verificationType": "australia_aec",
>   "metadata": null,
>   "createdAt": "<UTC timestamp of the request>"
> }
> ```

### Rejected

A rejection is a completed verification, not an error. It returns HTTP `200` with `verificationStatus` set to `REJECTED`, and `Errors` says which field was rejected and by whom: `Issuer` for the document issuer, `DVS` for the DVS hub.

> [accordion] REJECTED — Family name does not match
>
> **Request**
>
> ```json theme={null}
> {
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "familyName": "WHITFIELD",
>   "givenName": "MARIA",
>   "dob": "29-12-1990",
>   "enrolmentNumber": "1234567"
> }
> ```
>
> **Response** — HTTP `200`
>
> ```json theme={null}
> {
>   "success": true,
>   "message": "Australia AEC Electoral processed successfully",
>   "data": {
>     "isValid": false,
>     "ActivityId": "SANDBOX-AEC-0002",
>     "Errors": [
>       {
>         "Field": "FamilyName",
>         "Message": "Family name does not match.",
>         "Source": "Issuer"
>       }
>     ],
>     "OriginatingAgencyCode": "IDM001",
>     "VerificationRequestNumber": "SANDBOX-0002",
>     "VerificationResultCode": 2
>   },
>   "verificationStatus": "REJECTED",
>   "verificationStatusCode": 1,
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "verificationType": "australia_aec",
>   "metadata": null,
>   "createdAt": "<UTC timestamp of the request>"
> }
> ```
>
> `Errors` names the field the issuer rejected.

> [accordion] REJECTED — Date of birth does not match
>
> **Request**
>
> ```json theme={null}
> {
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "familyName": "TAYLOR",
>   "givenName": "JANE",
>   "dob": "14-03-1985",
>   "enrolmentNumber": "1234567"
> }
> ```
>
> **Response** — HTTP `200`
>
> ```json theme={null}
> {
>   "success": true,
>   "message": "Australia AEC Electoral processed successfully",
>   "data": {
>     "isValid": false,
>     "ActivityId": "SANDBOX-AEC-0004",
>     "Errors": [
>       {
>         "Field": "BirthDate",
>         "Message": "Date of birth does not match.",
>         "Source": "Issuer"
>       }
>     ],
>     "OriginatingAgencyCode": "IDM001",
>     "VerificationRequestNumber": "SANDBOX-0004",
>     "VerificationResultCode": 2
>   },
>   "verificationStatus": "REJECTED",
>   "verificationStatusCode": 1,
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "verificationType": "australia_aec",
>   "metadata": null,
>   "createdAt": "<UTC timestamp of the request>"
> }
> ```
>
> `Errors` names the field the issuer rejected.

> [accordion] REJECTED — Details not on record
>
> **Request**
>
> ```json theme={null}
> {
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "familyName": "SMITH",
>   "givenName": "JANE",
>   "dob": "29-12-1990",
>   "enrolmentNumber": "1234567"
> }
> ```
>
> **Response** — HTTP `200`
>
> ```json theme={null}
> {
>   "success": true,
>   "message": "Australia AEC Electoral processed successfully",
>   "data": {
>     "isValid": false,
>     "ActivityId": "SANDBOX-NO-RECORD",
>     "Errors": [
>       {
>         "Field": null,
>         "Message": "The details provided could not be verified.",
>         "Source": "Issuer"
>       }
>     ],
>     "OriginatingAgencyCode": "IDM001",
>     "VerificationRequestNumber": "SANDBOX-NO-RECORD",
>     "VerificationResultCode": 2
>   },
>   "verificationStatus": "REJECTED",
>   "verificationStatusCode": 1,
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "verificationType": "australia_aec",
>   "metadata": null,
>   "createdAt": "<UTC timestamp of the request>"
> }
> ```
>
> Any details that are not listed on this page return this same response, so `SMITH` is only an example. This includes a listed sample with an optional field added or removed.

### Validation failures

Validation runs before any fixture matching, so these behave identically in sandbox and live. They return HTTP `400`, and `message` is the first validation error.

> [accordion] Validation failed — Required fields missing
>
> **Request**
>
> ```json theme={null}
> {
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>"
> }
> ```
>
> **Response** — HTTP `400`
>
> ```json theme={null}
> {
>   "success": false,
>   "message": "The family name field is required.",
>   "errors": {
>     "familyName": ["The family name field is required."],
>     "givenName": ["The given name field is required."],
>     "dob": ["The dob field is required."],
>     "enrolmentNumber": ["The enrolment number field is required."]
>   },
>   "createdAt": "<UTC timestamp of the request>"
> }
> ```

> [accordion] Not found — Trust validation does not exist
>
> **Request**
>
> ```json theme={null}
> {
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "does-not-exist",
>   "familyName": "TAYLOR",
>   "givenName": "JANE",
>   "dob": "29-12-1990",
>   "enrolmentNumber": "1234567"
> }
> ```
>
> **Response** — HTTP `404`
>
> ```json theme={null}
> {
>   "success": false,
>   "message": "Trust Validation Not Found",
>   "errors": {
>     "trustValidation": "Trust Validation Not Found"
>   },
>   "createdAt": "<UTC timestamp of the request>"
> }
> ```
>
> `trustValidationId` must belong to your company. Create a trust validation first, then use its ID.

### Source unavailable

> [accordion] Error — Data Source Unavailable
>
> **Request**
>
> ```json theme={null}
> {
>   "trustFlowId": "<your trust flow id>",
>   "trustValidationId": "<your trust validation id>",
>   "familyName": "OKONKWO",
>   "givenName": "DANIEL",
>   "dob": "29-12-1990",
>   "enrolmentNumber": "1234567"
> }
> ```
>
> **Response** — HTTP `500`
>
> ```json theme={null}
> {
>   "success": false,
>   "message": "An error occurred during the process. Please contact support for assistance.",
>   "createdAt": "<UTC timestamp of the request>"
> }
> ```
>
> There is no `data`, `verificationStatus` or `trustValidationId` in this response. Treat it as a temporary failure and retry later. No credit is charged in live mode.

### Account-level responses

Two further responses are not specific to this endpoint. A missing or invalid `Authorization` header returns HTTP `401`, and an account without the `australia_aec` plan returns HTTP `403` — both enforced in sandbox exactly as in live. See [Sandbox introduction](https://docs.idmetagroup.com/api-reference/sandbox.md#non-verification-responses) for their envelopes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.