createFileAssociation
Creates a new file association
By passing in the appropriate options, you can create a new folder
/Files/{FileId}/Associations
Usage and SDK Samples
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken( 'YOUR_ACCESS_TOKEN' );
$apiInstance = new XeroAPI\XeroPHP\Api\FilesApi(
new GuzzleHttp\Client(),
$config
);
$xeroTenantId = "YOUR_XERO_TENANT_ID";
$fileId = "4ff1e5cc-9835-40d5-bb18-09fdb118db9c";
$idempotencyKey = "KEY_VALUE";
try {
$result = $apiInstance->createFileAssociation($xeroTenantId, $fileId, $association, $idempotencyKey);
} catch (Exception $e) {
echo 'Exception when calling FilesApi->createFileAssociation: ', $e->getMessage(), PHP_EOL;
}
?>
Scopes
files | Grant read-write access to files and folders |
Parameters
Name | Description |
---|---|
FileId* |
UUID
(uuid)
File id for single object
Required
|
Name | Description |
---|---|
xero-tenant-id* |
String
Xero identifier for Tenant
Required
|
Idempotency-Key |
String
This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
|
Name | Description |
---|---|
association * |
Association
Required
|