# Validate Data for Third Party API Example

> Example demonstrating how to validate data when interacting with third-party APIs.

Source: https://docs.apimaker.dev/v1/examples/sys/system/isValidDataForThirdPartyAPI.html

<!-- --8<-- [start:body] -->

`g.sys.system.isValidDataForThirdPartyAPI` calls the [is valid data for third party API system API](/v1/docs/apis-all/system-apis/system-generated-is-valid-data-for-third-party-api.html) from your code, whatever the settings of that API say about HTTP callers.

### Validate third party request body

Test the data is valid for Third party API, using global object 'g'.

```ts linenums="1"
await g.sys.system.isValidDataForThirdPartyAPI({
    apiBundleName: "bundle_name",
    apiVersionName: "api_version",
    name: "api_name",
    type: "BODY", // BODY | QUERY_PARAMS
    data: {
        name: 'hello'
    },
    isArray: false
});
```

<!-- --8<-- [end:body] -->

## Related

- [Is valid data for third party api system API](/v1/docs/apis-all/system-apis/system-generated-is-valid-data-for-third-party-api.html) · [All system APIs from code](/v1/examples/sys/system/system.html) · [The global object g](/v1/docs/pre-defined-terms/global-object-g.html)
