Expected Outcomes

A list with some of the outcomes that an API interaction can produce, for both successful and unsuccessful requests.

Successful Requests

Whenever you make a GET request and the errors key is empty, and the response key is present and not empty, and the response code is 200, the respective request should be considered successful.

{
    "requestId": 12239,
    "status": "finished",
    "response": {
        ...
    },
    "warnings": null,
    "errors": null
}

Whenever you make a POST request and the errors key is empty, and the response.requestId key is present and not empty, and the response code is 201, the respective request should be considered successful.

{
    "requestId": 12239,
    "status": "new",
    "warnings": null,
    "errors": null
}

Company Registration Status Requests

A successfully GET request sent to /api/v1/company-registrations/{requestId}/status, will return code 200 with one of the following responses.

{
    "requestId": 12239,
    "status": "transmission ok",
    "warnings": null,
    "errors": null
}
{
    "requestId": 12239,
    "status": "validation ok",
    "warnings": null,
    "errors": null
}
{
    "requestId": 12239,
    "status": "validation failed",
    "response": "null",
    "warnings": null,
    "errors": [
        {
            "details": "V418 Country name not verified. Please check [ZSH/8r]",
            "target": "NEWZEALAND"
        }
    ]
}
{
    "requestId": 12239,
    "status": "manual review",
    "documentNumber": "2EXN69008",
    "response": null,
    "warnings": [
        {
            "details": "Reference Number: 2EXN69008\n\nRe: Application for Company Registration:\nASIC BANK PTY LTD\nReference is made to your application for company...",
            "target": null
        }
    ],
    "errors": null
}
{
    "requestId": 12239,
    "status": "rejected",
    "documentNumber": "2EXN69008",
    "response": null,
    "warnings": null,
    "errors": [
        {
            "details": "Reference Number: 2EXN69008\n\nRe: Application for Company Registration:\nASIC BANK PTY LTD\nReference is made to your application for company...",
            "target": null
        }
    ]
}
{
    "requestId": 12239,
    "status": "finished",
    "documentNumber": "2EXN69008",
    "response": {
        "companyName": "MY DEMO COMPANY PTY LTD",
        "acn": "612302303",
        "companyType": "APTY",
        "companyClass": "LMSH",
        "companySubClass": "PROP",
        "jurisdiction": "NSW",
        "dateOfRegistration": "2021-06-30"
    },
    "warnings": null,
    "errors": null
}

General API Error Messages

Trying to access an endpoint without proper credentials, will return error code 401 with the following response.

{
    "errors": [
        "Unauthorised."
    ]
}

Trying to access an endpoint without proper scopes or access resources that do not belong to you, will return error code 403 with the following response.

{
    "errors": [
        "Forbidden. No access to this resource."
    ]
}

Trying to access an endpoint using the wrong method, will return error code 403 with the following response.

{
    "errors": [
        "Forbidden. Method not allowed."
    ]
}

Trying to access an invalid endpoint, will return error code 404 with the following response.

{
    "errors": [
        "Endpoint not found."
    ]
}