Xero Bank Feeds API

BankFeeds

createFeedConnections

Create one or more new feed connection

By passing in the FeedConnections array object in the body, you can create one or more new feed connections


/FeedConnections

Usage and SDK Samples

await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const idempotencyKey = 'KEY_VALUE';

try {
  const response = await xero.accountingApi.createFeedConnections(xeroTenantId, feedConnections, idempotencyKey);
  console.log(response.body || response.response.statusCode)
} catch (err) {
  const error = JSON.stringify(err.response.body, null, 2)
  console.log(`Status Code: ${err.response.statusCode} => ${error}`);
}

Scopes

bankfeeds Grant read-write access to bankfeeds

Parameters

Header parameters
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.
Body parameters
Name Description
feedConnections *
FeedConnections
Feed Connection(s) array object in the body
Required

createStatements

Creates one or more new statements


/Statements

Usage and SDK Samples

await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const idempotencyKey = 'KEY_VALUE';

try {
  const response = await xero.accountingApi.createStatements(xeroTenantId, statements, idempotencyKey);
  console.log(response.body || response.response.statusCode)
} catch (err) {
  const error = JSON.stringify(err.response.body, null, 2)
  console.log(`Status Code: ${err.response.statusCode} => ${error}`);
}

Scopes

bankfeeds Grant read-write access to bankfeeds

Parameters

Header parameters
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.
Body parameters
Name Description
statements *
Statements
Statements array of objects in the body
Required

deleteFeedConnections

Delete an existing feed connection

By passing in FeedConnections array object in the body, you can delete a feed connection.


/FeedConnections/DeleteRequests

Usage and SDK Samples

await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const idempotencyKey = 'KEY_VALUE';

try {
  const response = await xero.accountingApi.deleteFeedConnections(xeroTenantId, feedConnections, idempotencyKey);
  console.log(response.body || response.response.statusCode)
} catch (err) {
  const error = JSON.stringify(err.response.body, null, 2)
  console.log(`Status Code: ${err.response.statusCode} => ${error}`);
}

Scopes

bankfeeds Grant read-write access to bankfeeds

Parameters

Header parameters
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.
Body parameters
Name Description
feedConnections *
FeedConnections
Feed Connections array object in the body
Required

getFeedConnection

Retrieve single feed connection based on a unique id provided

By passing in a FeedConnection Id options, you can search for matching feed connections


/FeedConnections/{id}

Usage and SDK Samples

await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const id = '38400000-8cf0-11bd-b23e-10b96e4ef00d';

try {
  const response = await xero.accountingApi.getFeedConnection(xeroTenantId, id);
  console.log(response.body || response.response.statusCode)
} catch (err) {
  const error = JSON.stringify(err.response.body, null, 2)
  console.log(`Status Code: ${err.response.statusCode} => ${error}`);
}

Scopes

bankfeeds Grant read-write access to bankfeeds

Parameters

Path parameters
Name Description
id*
UUID (uuid)
Unique identifier for retrieving single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required

getFeedConnections

Searches for feed connections

By passing in the appropriate options, you can search for available feed connections in the system.


/FeedConnections

Usage and SDK Samples

await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const page = 1;
const pageSize = 100;

try {
  const response = await xero.accountingApi.getFeedConnections(xeroTenantId,  page, pageSize);
  console.log(response.body || response.response.statusCode)
} catch (err) {
  const error = JSON.stringify(err.response.body, null, 2)
  console.log(`Status Code: ${err.response.statusCode} => ${error}`);
}

Scopes

bankfeeds Grant read-write access to bankfeeds

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Query parameters
Name Description
page
Integer
Page number which specifies the set of records to retrieve. By default the number of the records per set is 10. Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?page=1 to get the second set of the records. When page value is not a number or a negative number, by default, the first set of records is returned.
pageSize
Integer
Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/FeedConnections?pageSize=100 to specify page size of 100.

getStatement

Retrieve single statement based on unique id provided

By passing in a statement id, you can search for matching statements


/Statements/{statementId}

Usage and SDK Samples

await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const statementId = '38400000-8cf0-11bd-b23e-10b96e4ef00d';

try {
  const response = await xero.accountingApi.getStatement(xeroTenantId, statementId);
  console.log(response.body || response.response.statusCode)
} catch (err) {
  const error = JSON.stringify(err.response.body, null, 2)
  console.log(`Status Code: ${err.response.statusCode} => ${error}`);
}

Scopes

bankfeeds Grant read-write access to bankfeeds

Parameters

Path parameters
Name Description
statementId*
UUID (uuid)
statement id for single object
Required
Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required

getStatements

Retrieve all statements

By passing in parameters, you can search for matching statements


/Statements

Usage and SDK Samples

await xero.setTokenSet(tokenSet);

const xeroTenantId = 'xeroTenantId_example';
const page = 56;
const pageSize = 56;
const xeroApplicationId = 'xeroApplicationId_example';
const xeroUserId = 'xeroUserId_example';

try {
  const response = await xero.accountingApi.getStatements(xeroTenantId,  page, pageSize,xeroApplicationId,xeroUserId);
  console.log(response.body || response.response.statusCode)
} catch (err) {
  const error = JSON.stringify(err.response.body, null, 2)
  console.log(`Status Code: ${err.response.statusCode} => ${error}`);
}

Scopes

bankfeeds Grant read-write access to bankfeeds

Parameters

Header parameters
Name Description
Xero-Tenant-Id*
String
Xero identifier for Tenant
Required
Xero-Application-Id
String
Xero-User-Id
String
Query parameters
Name Description
page
Integer (int32)
unique id for single object
pageSize
Integer (int32)
Page size which specifies how many records per page will be returned (default 10). Example - https://api.xero.com/bankfeeds.xro/1.0/Statements?pageSize=100 to specify page size of 100.