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

# Validate superannuation fund

> Validates one or more superannuation fund USIs (Unique Superannuation Identifiers) to confirm they are active and able to receive electronic contributions through Superannuation clearing house.

> [!TIP]
>
> **Why it's useful:** Use it to check the USIs your workers have already entered, so you know each fund can receive contributions.

### Simplified Request Format

The fund validation endpoint has been simplified to automatically retrieve employer information from the database. You only need to provide the fund USIs you want to validate.

**Minimal Request (Recommended):**

```json theme={null}
{
  "fundUsis": ["40328908469310"]
}
```

The system automatically retrieves your employer information based on your authentication credentials, so you no longer need to include employer details in the request.

### Transaction ID - Server-Generated

The server automatically generates a unique transaction ID and timestamp for each request.

**Transaction ID Format:** `txn-{uuid}`

**Example generated IDs:**

* `txn-550e8400-e29b-41d4-a716-446655440000`
* `txn-6ba7b810-9dad-11d1-80b4-00c04fd430c8`

The transaction ID will be:

* Included in all response payloads
* Available in error messages for troubleshooting
* Returned in response headers for request tracking

### Transaction ID in Response

The validate fund endpoint returns the server-generated transaction ID in the response:

```json theme={null}
{
  "success": true,
  "statusCode": 200,
  "message": "Fund validation successful",
  "transactionId": "txn-550e8400-e29b-41d4-a716-446655440000"
}
```

Use this ID for logging, debugging, and tracking requests in your system.

### Validation Checks Performed

* **USI Format**: Verifies the USI follows the correct 14-character format
* **Fund Active Status**: Confirms the fund is currently accepting contributions
* **Electronic Capability**: Verifies the fund can receive SuperStream contributions
* **Employer Association**: Optional check if employer is already registered with the fund

### When to Use

* **Member Onboarding**: Validate the fund USI provided by a new employee
* **Choice of Fund**: Verify funds before presenting them to employees
* **Pre-submission Check**: Validate all funds in a batch before submission
* **Periodic Verification**: Funds occasionally change status (mergers, closures)

### Common USI Issues

* Fund has merged with another fund (will return new USI)
* Fund is temporarily not accepting electronic contributions
* USI is for a closed or legacy product

### Benefits of Simplified Format

* **Simpler Integration**: No need to manage employer details
* **Smaller Request Payloads**: Only send what's necessary
* **Always Up-to-Date**: Uses the most current employer information from the database
* **Consistent Data**: Same employer data used across all requests

### Best Practices

* Cache valid USIs for up to 24 hours
* Always re-validate before first contribution to a new fund
* Handle fund merge redirects gracefully
* Use the transaction ID from responses for request tracking

### Request Body

**fundUsis** `array` *required*

Array of superannuation fund USIs (Unique Superannuation Identifiers) to validate. Each USI will be checked against the active funds registry to ensure it can accept contributions.

### Responses

| Code | Description |
| - | - |
| `200` | Fund validation successful. All specified USIs are active and can receive contributions. |
| `400` | Fund validation failed - One or more USIs are invalid or inactive. |
| `401` | Unauthorized - Invalid API credentials. |
| `500` | Internal server error. |

### Response fields

**success** `boolean`

Indicates whether the operation completed successfully. True means the validation passed or submission was accepted.

**statusCode** `integer`

HTTP status code of the response. 200 indicates success.

**message** `string`

Human-readable message describing the operation result. For successful operations, provides confirmation of what was validated or submitted.

**transactionId** `string`

Server-generated transaction ID in the format `txn-{uuid}`. This ID is automatically generated by the server for tracking and correlation purposes. Use this ID for logging, debugging, and tracking requests in your system.

> [accordion] Error response fields
>
> **success** `boolean`
>
> Always false for error responses, indicating the operation did not succeed.
>
> **statusCode** `integer`
>
> HTTP status code indicating the type of error. Common values: 400 (Bad Request), 401 (Unauthorized), 404 (Not Found), 500 (Server Error)
>
> **message** `string`
>
> Human-readable error message explaining what went wrong. May include specific details about which field or value caused the error.
>
> **errorCode** `integer`
>
> Superannuation clearing house-specific error code for programmatic error handling. Refer to the error code reference documentation for a complete list of codes. Common codes: 4030 (Employer not found), 4031 (Invalid ABN), 4040 (Fund not found).

```bash cURL theme={null}
curl 'https://qa-super.mygigsters.com.au/v1/contributions/fund/validate' -X POST \
    -u "apiUsername:apiPassword"  \
    -H "Content-Type: application/json" --data '{"fundUsis":["40328908469310"]}'
```

```javascript Node.js theme={null}
const response = await fetch("https://qa-super.mygigsters.com.au/v1/contributions/fund/validate", {
  method: "POST",
  headers: {
    Authorization: "Basic " + Buffer.from("apiUsername:apiPassword").toString("base64"),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "fundUsis": [
      "40328908469310"
    ]
  }),
});

const data = await response.json();
console.log(data);
```

```python Python theme={null}
import requests

response = requests.post(
    "https://qa-super.mygigsters.com.au/v1/contributions/fund/validate",
    auth=("apiUsername", "apiPassword"),
    json={
        "fundUsis": [
            "40328908469310",
        ],
    },
)

print(response.json())
```

```ruby Ruby theme={null}
require "net/http"
require "json"
require "uri"

uri = URI("https://qa-super.mygigsters.com.au/v1/contributions/fund/validate")
request = Net::HTTP::Post.new(uri)
request.basic_auth("apiUsername", "apiPassword")
request["Content-Type"] = "application/json"
request.body = <<~JSON
  {
    "fundUsis": [
      "40328908469310"
    ]
  }
JSON

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

puts JSON.parse(response.body)
```

```php PHP theme={null}
<?php

$ch = curl_init("https://qa-super.mygigsters.com.au/v1/contributions/fund/validate");

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_USERPWD => "apiUsername:apiPassword",
    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => <<<'JSON'
{
  "fundUsis": [
    "40328908469310"
  ]
}
JSON,
]);

$response = curl_exec($ch);
curl_close($ch);

print_r(json_decode($response, true));
```

```java Java theme={null}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.Base64;

public class Example {
    public static void main(String[] args) throws Exception {
        String credentials = Base64.getEncoder()
            .encodeToString("apiUsername:apiPassword".getBytes());

        String body = String.join("\n",
            "{",
            "  \"fundUsis\": [",
            "    \"40328908469310\"",
            "  ]",
            "}"
        );

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://qa-super.mygigsters.com.au/v1/contributions/fund/validate"))
            .header("Authorization", "Basic " + credentials)
            .header("Content-Type", "application/json")
            .method("POST", HttpRequest.BodyPublishers.ofString(body))
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
```

```go Go theme={null}
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{
  "fundUsis": [
    "40328908469310"
  ]
}`)

	req, err := http.NewRequest("POST", "https://qa-super.mygigsters.com.au/v1/contributions/fund/validate", body)
	if err != nil {
		panic(err)
	}
	req.SetBasicAuth("apiUsername", "apiPassword")
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, _ := io.ReadAll(res.Body)
	fmt.Println(string(data))
}
```

```csharp .NET theme={null}
using System.Net.Http.Headers;
using System.Text;

using var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Post, "https://qa-super.mygigsters.com.au/v1/contributions/fund/validate");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Basic", Convert.ToBase64String(Encoding.UTF8.GetBytes("apiUsername:apiPassword")));
request.Content = new StringContent(@"{
  ""fundUsis"": [
    ""40328908469310""
  ]
}", Encoding.UTF8, "application/json");

var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

```json 200 theme={null}
{
  "success": true,
  "statusCode": 200,
  "message": "Fund validation successful",
  "transactionId": "txn-550e8400-e29b-41d4-a716-446655440000"
}
```


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