@jskit-ai/connectors-catalog 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +192 -0
- package/docs/ai-upstream-notices.md +51 -0
- package/docs/ai.md +191 -0
- package/docs/airtable.md +130 -0
- package/docs/algolia.md +190 -0
- package/docs/amazon-redshift.md +229 -0
- package/docs/amplitude.md +210 -0
- package/docs/apify.md +162 -0
- package/docs/apollo-io.md +200 -0
- package/docs/asana.md +126 -0
- package/docs/ashby.md +188 -0
- package/docs/atlassian.md +224 -0
- package/docs/attention.md +162 -0
- package/docs/aws-athena.md +150 -0
- package/docs/aws-credentials.md +75 -0
- package/docs/aws-s3.md +193 -0
- package/docs/bigquery.md +146 -0
- package/docs/brevo.md +122 -0
- package/docs/calendly.md +158 -0
- package/docs/canva.md +191 -0
- package/docs/chargebee.md +192 -0
- package/docs/clay.md +194 -0
- package/docs/clickhouse.md +242 -0
- package/docs/confidence-exp.md +74 -0
- package/docs/confidence-flags.md +75 -0
- package/docs/confidence-oauth.md +137 -0
- package/docs/contentful.md +123 -0
- package/docs/databricks.md +180 -0
- package/docs/dbt-semantic-layer.md +175 -0
- package/docs/elevenlabs.md +102 -0
- package/docs/figma.md +132 -0
- package/docs/firebase-cloud-messaging.md +262 -0
- package/docs/firecrawl.md +137 -0
- package/docs/fireflies.md +95 -0
- package/docs/fireworks-ai.md +53 -0
- package/docs/gatewayapi.md +113 -0
- package/docs/gemini-enterprise.md +224 -0
- package/docs/github-api.md +133 -0
- package/docs/gitlab-api.md +138 -0
- package/docs/gmail.md +133 -0
- package/docs/gong.md +205 -0
- package/docs/google-ads.md +156 -0
- package/docs/google-analytics.md +202 -0
- package/docs/google-docs.md +105 -0
- package/docs/google-drive.md +108 -0
- package/docs/google-maps-platform.md +208 -0
- package/docs/google-oauth.md +123 -0
- package/docs/google-search-console.md +124 -0
- package/docs/google-sheets.md +94 -0
- package/docs/google-slides.md +95 -0
- package/docs/granola.md +178 -0
- package/docs/hex.md +161 -0
- package/docs/heygen.md +124 -0
- package/docs/hubspot.md +142 -0
- package/docs/incident-io.md +118 -0
- package/docs/inngest.md +178 -0
- package/docs/klipy.md +149 -0
- package/docs/lexware.md +144 -0
- package/docs/lightspeed.md +193 -0
- package/docs/linear.md +137 -0
- package/docs/linkedin.md +196 -0
- package/docs/logo-dev.md +152 -0
- package/docs/mailgun.md +153 -0
- package/docs/mapbox.md +174 -0
- package/docs/microsoft-excel.md +97 -0
- package/docs/microsoft-fabric.md +249 -0
- package/docs/microsoft-oauth.md +143 -0
- package/docs/microsoft-onedrive.md +76 -0
- package/docs/microsoft-onenote.md +75 -0
- package/docs/microsoft-outlook.md +90 -0
- package/docs/microsoft-powerpoint.md +119 -0
- package/docs/microsoft-sharepoint.md +75 -0
- package/docs/microsoft-teams.md +72 -0
- package/docs/microsoft-word.md +119 -0
- package/docs/miro.md +117 -0
- package/docs/n8n.md +169 -0
- package/docs/notion.md +137 -0
- package/docs/oura.md +161 -0
- package/docs/paddle.md +168 -0
- package/docs/perplexity.md +85 -0
- package/docs/pipedrive.md +120 -0
- package/docs/polar.md +63 -0
- package/docs/posthog.md +227 -0
- package/docs/prestashop.md +151 -0
- package/docs/replicate.md +60 -0
- package/docs/resend.md +153 -0
- package/docs/salesforce.md +234 -0
- package/docs/sanity.md +122 -0
- package/docs/semrush.md +276 -0
- package/docs/sentry.md +112 -0
- package/docs/sevdesk.md +107 -0
- package/docs/shopify.md +206 -0
- package/docs/slack.md +257 -0
- package/docs/snowflake.md +271 -0
- package/docs/storyblok.md +130 -0
- package/docs/stripe.md +77 -0
- package/docs/supabase.md +51 -0
- package/docs/tally.md +105 -0
- package/docs/telegram.md +165 -0
- package/docs/tiktok.md +201 -0
- package/docs/twilio.md +284 -0
- package/docs/twitch.md +428 -0
- package/docs/wave.md +440 -0
- package/docs/wix.md +1249 -0
- package/docs/wiz.md +177 -0
- package/docs/woocommerce.md +400 -0
- package/docs/wordpress-com.md +358 -0
- package/docs/wordpress-self-hosted.md +252 -0
- package/docs/workday.md +292 -0
- package/docs/x-twitter.md +188 -0
- package/docs/xero.md +429 -0
- package/docs/zoho-books.md +214 -0
- package/docs/zoho-crm.md +192 -0
- package/package.json +153 -0
- package/patterns/ai-connections/PATTERN.md +84 -0
- package/patterns/ai-connections/example/ai-model.js +11 -0
- package/patterns/ai-connections/example/perplexity-answer.js +29 -0
- package/patterns/api-key-connection/PATTERN.md +368 -0
- package/patterns/api-key-connection/example/connections.js +18 -0
- package/patterns/api-key-connection/example/integrations.json +19 -0
- package/patterns/assistant-mcp/PATTERN.md +110 -0
- package/patterns/assistant-mcp/example/integrations.json +13 -0
- package/patterns/assistant-mcp-oauth/PATTERN.md +235 -0
- package/patterns/assistant-mcp-oauth/example/integrations.json +102 -0
- package/patterns/aws-storage-queries/PATTERN.md +169 -0
- package/patterns/aws-storage-queries/example/formats/data-formats.js +35 -0
- package/patterns/aws-storage-queries/example/formats/package-lock.json +49 -0
- package/patterns/aws-storage-queries/example/formats/package.json +12 -0
- package/patterns/aws-storage-queries/example/formats/verify-formats.mjs +37 -0
- package/patterns/aws-storage-queries/example/integrations.json +38 -0
- package/patterns/aws-storage-queries/example/s3-transfer.js +34 -0
- package/patterns/event-delivery/PATTERN.md +151 -0
- package/patterns/event-delivery/example/integrations.json +17 -0
- package/patterns/firebase-messaging/PATTERN.md +156 -0
- package/patterns/firebase-messaging/example/server/notifications.js +23 -0
- package/patterns/google-ads-search/PATTERN.md +92 -0
- package/patterns/google-ads-search/example/ads-setup.js +25 -0
- package/patterns/oauth-connection/PATTERN.md +724 -0
- package/patterns/oauth-connection/example/integrations.json +20 -0
- package/patterns/paddle-catalogue/PATTERN.md +78 -0
- package/patterns/paddle-catalogue/example/create-products.js +38 -0
- package/patterns/public-image/PATTERN.md +84 -0
- package/patterns/public-image/example/integrations.json +13 -0
- package/patterns/public-image/example/logo-url.js +16 -0
- package/patterns/redshift-queries/PATTERN.md +150 -0
- package/patterns/redshift-queries/example/integrations.json +33 -0
- package/patterns/source-scanning/PATTERN.md +83 -0
- package/patterns/source-scanning/example/source-scanner.js +13 -0
- package/src/client/firebase-cloud-messaging.js +10 -0
- package/src/client/google-analytics.js +72 -0
- package/src/client/google-maps-platform.js +39 -0
- package/src/client/logo-dev.js +36 -0
- package/src/server/ai.js +46 -0
- package/src/server/airtable.js +67 -0
- package/src/server/algolia.js +63 -0
- package/src/server/amazon-redshift.js +96 -0
- package/src/server/amplitude.js +31 -0
- package/src/server/apify.js +68 -0
- package/src/server/apollo-io.js +85 -0
- package/src/server/asana.js +64 -0
- package/src/server/ashby.js +61 -0
- package/src/server/atlassian.js +32 -0
- package/src/server/attention.js +93 -0
- package/src/server/aws-athena.js +82 -0
- package/src/server/aws-s3.js +49 -0
- package/src/server/awsTransport.js +75 -0
- package/src/server/bigquery.js +97 -0
- package/src/server/brevo.js +97 -0
- package/src/server/calendly.js +77 -0
- package/src/server/canva.js +13 -0
- package/src/server/chargebee.js +88 -0
- package/src/server/clay.js +78 -0
- package/src/server/clickhouse.js +66 -0
- package/src/server/confidence.js +29 -0
- package/src/server/contentful.js +40 -0
- package/src/server/databricks.js +55 -0
- package/src/server/dbt-semantic-layer.js +95 -0
- package/src/server/elevenlabs.js +81 -0
- package/src/server/figma.js +24 -0
- package/src/server/firebase-cloud-messaging.js +111 -0
- package/src/server/firecrawl.js +70 -0
- package/src/server/fireflies.js +31 -0
- package/src/server/fireworks-ai.js +16 -0
- package/src/server/gatewayapi.js +48 -0
- package/src/server/gemini-enterprise.js +47 -0
- package/src/server/github-api.js +90 -0
- package/src/server/gitlab-api.js +67 -0
- package/src/server/gmail.js +60 -0
- package/src/server/gong.js +52 -0
- package/src/server/google-ads-search.js +134 -0
- package/src/server/google-ads.js +80 -0
- package/src/server/google-docs.js +36 -0
- package/src/server/google-drive.js +71 -0
- package/src/server/google-maps-platform.js +90 -0
- package/src/server/google-search-console.js +31 -0
- package/src/server/google-sheets.js +60 -0
- package/src/server/google-slides.js +36 -0
- package/src/server/google.js +61 -0
- package/src/server/granola.js +115 -0
- package/src/server/graphqlOperation.js +15 -0
- package/src/server/hex.js +29 -0
- package/src/server/heygen.js +54 -0
- package/src/server/hubspot.js +85 -0
- package/src/server/incident-io.js +68 -0
- package/src/server/inngest.js +86 -0
- package/src/server/jsonOperation.js +34 -0
- package/src/server/klipy.js +34 -0
- package/src/server/lexware.js +59 -0
- package/src/server/lightspeed.js +82 -0
- package/src/server/linear.js +52 -0
- package/src/server/linkedin.js +74 -0
- package/src/server/mailgun.js +76 -0
- package/src/server/mapbox.js +46 -0
- package/src/server/mcpRegistration.js +41 -0
- package/src/server/mcpTransport.js +60 -0
- package/src/server/microsoft-excel.js +67 -0
- package/src/server/microsoft-fabric.js +81 -0
- package/src/server/microsoft-onedrive.js +58 -0
- package/src/server/microsoft-onenote.js +52 -0
- package/src/server/microsoft-outlook.js +58 -0
- package/src/server/microsoft-powerpoint.js +5 -0
- package/src/server/microsoft-sharepoint.js +46 -0
- package/src/server/microsoft-teams.js +29 -0
- package/src/server/microsoft-word.js +5 -0
- package/src/server/microsoft.js +88 -0
- package/src/server/miro.js +29 -0
- package/src/server/n8n.js +78 -0
- package/src/server/notion.js +76 -0
- package/src/server/oura.js +48 -0
- package/src/server/paddle.js +83 -0
- package/src/server/perplexity.js +15 -0
- package/src/server/pipedrive.js +95 -0
- package/src/server/polar.js +20 -0
- package/src/server/posthog.js +44 -0
- package/src/server/prestashop.js +42 -0
- package/src/server/replicate.js +42 -0
- package/src/server/resend.js +93 -0
- package/src/server/salesforce.js +84 -0
- package/src/server/sanity.js +31 -0
- package/src/server/semrush.js +359 -0
- package/src/server/sentry.js +30 -0
- package/src/server/sevdesk.js +20 -0
- package/src/server/shopify.js +99 -0
- package/src/server/slack.js +143 -0
- package/src/server/snowflake.js +139 -0
- package/src/server/storyblok.js +49 -0
- package/src/server/stripe.js +13 -0
- package/src/server/supabase.js +13 -0
- package/src/server/tally.js +78 -0
- package/src/server/telegram.js +55 -0
- package/src/server/tiktok.js +86 -0
- package/src/server/twilio.js +90 -0
- package/src/server/twitch.js +409 -0
- package/src/server/wave.js +520 -0
- package/src/server/wix.js +1048 -0
- package/src/server/wiz.js +117 -0
- package/src/server/woocommerce.js +412 -0
- package/src/server/wordpress-com.js +236 -0
- package/src/server/wordpress-self-hosted.js +134 -0
- package/src/server/workday.js +136 -0
- package/src/server/x-twitter.js +110 -0
- package/src/server/xero.js +397 -0
- package/src/server/zoho-books.js +90 -0
- package/src/server/zoho-crm.js +89 -0
- package/src/server/zohoOAuth.js +21 -0
- package/src/shared/ai-models.json +8049 -0
- package/src/shared/ai.js +63 -0
- package/src/shared/algolia.js +29 -0
- package/src/shared/amazon-redshift.js +51 -0
- package/src/shared/amplitude.js +28 -0
- package/src/shared/atlassian.js +43 -0
- package/src/shared/aws.js +72 -0
- package/src/shared/canva.js +66 -0
- package/src/shared/chargebee.js +26 -0
- package/src/shared/clickhouse.js +38 -0
- package/src/shared/confidence.js +28 -0
- package/src/shared/databricks.js +33 -0
- package/src/shared/dbt-semantic-layer.js +32 -0
- package/src/shared/definitions.js +140 -0
- package/src/shared/figma.js +21 -0
- package/src/shared/firebase-cloud-messaging.js +45 -0
- package/src/shared/gemini-enterprise.js +33 -0
- package/src/shared/gong.js +33 -0
- package/src/shared/google-ads-search.js +31 -0
- package/src/shared/google-ads.js +28 -0
- package/src/shared/google-maps-platform.js +28 -0
- package/src/shared/google.js +133 -0
- package/src/shared/granola.js +25 -0
- package/src/shared/hex.js +28 -0
- package/src/shared/inngest.js +35 -0
- package/src/shared/lightspeed.js +75 -0
- package/src/shared/linkedin.js +27 -0
- package/src/shared/logo-dev.js +21 -0
- package/src/shared/mapbox.js +38 -0
- package/src/shared/mcp.js +92 -0
- package/src/shared/microsoft-fabric.js +47 -0
- package/src/shared/microsoft.js +231 -0
- package/src/shared/miro.js +27 -0
- package/src/shared/oura.js +23 -0
- package/src/shared/posthog.js +33 -0
- package/src/shared/prestashop.js +23 -0
- package/src/shared/salesforce.js +36 -0
- package/src/shared/semrush.js +24 -0
- package/src/shared/shopify.js +51 -0
- package/src/shared/siteUrl.js +12 -0
- package/src/shared/slack.js +88 -0
- package/src/shared/snowflake.js +55 -0
- package/src/shared/tiktok.js +22 -0
- package/src/shared/tokens.js +747 -0
- package/src/shared/twilio.js +41 -0
- package/src/shared/twitch.js +49 -0
- package/src/shared/wave.js +52 -0
- package/src/shared/wix.js +40 -0
- package/src/shared/wiz.js +41 -0
- package/src/shared/wordpress-com.js +30 -0
- package/src/shared/wordpress.js +69 -0
- package/src/shared/workday.js +50 -0
- package/src/shared/x-twitter.js +19 -0
- package/src/shared/xero.js +46 -0
- package/src/shared/zoho-books.js +39 -0
- package/src/shared/zoho-crm.js +43 -0
- package/src/shared/zoho-regions.js +12 -0
- package/test/ai.test.js +136 -0
- package/test/airtable.test.js +125 -0
- package/test/algolia.test.js +207 -0
- package/test/amazon-redshift.test.js +272 -0
- package/test/amplitude.test.js +239 -0
- package/test/apify.test.js +93 -0
- package/test/apollo-io.test.js +125 -0
- package/test/asana.test.js +99 -0
- package/test/ashby.test.js +97 -0
- package/test/atlassian.test.js +249 -0
- package/test/attention.test.js +79 -0
- package/test/aws.test.js +405 -0
- package/test/brevo.test.js +71 -0
- package/test/calendly.test.js +136 -0
- package/test/canva.test.js +258 -0
- package/test/chargebee.test.js +195 -0
- package/test/clickhouse.test.js +278 -0
- package/test/confidence.test.js +205 -0
- package/test/databricks.test.js +253 -0
- package/test/dbt-semantic-layer.test.js +221 -0
- package/test/designMcp.test.js +336 -0
- package/test/elevenlabs.test.js +52 -0
- package/test/firebase-cloud-messaging.test.js +242 -0
- package/test/firecrawl.test.js +66 -0
- package/test/gemini-enterprise.test.js +218 -0
- package/test/github-api.test.js +167 -0
- package/test/gitlab-api.test.js +160 -0
- package/test/gong.test.js +192 -0
- package/test/google-ads.test.js +350 -0
- package/test/google-maps-platform.test.js +191 -0
- package/test/google.test.js +710 -0
- package/test/granola.test.js +240 -0
- package/test/hex.test.js +253 -0
- package/test/heygen.test.js +121 -0
- package/test/hubspot.test.js +103 -0
- package/test/inngest.test.js +219 -0
- package/test/lightspeed.test.js +250 -0
- package/test/linear.test.js +146 -0
- package/test/linkedin.test.js +243 -0
- package/test/logo-dev.test.js +79 -0
- package/test/mailgun.test.js +107 -0
- package/test/mapbox.test.js +181 -0
- package/test/mcp.test.js +227 -0
- package/test/microsoft-fabric.test.js +258 -0
- package/test/microsoft.test.js +554 -0
- package/test/n8nOAuth.test.js +188 -0
- package/test/notionOAuth.test.js +183 -0
- package/test/oura.test.js +211 -0
- package/test/paddleCatalogue.test.js +51 -0
- package/test/paddlePermissions.test.js +101 -0
- package/test/perplexityComposition.test.js +39 -0
- package/test/pipedriveOAuth.test.js +140 -0
- package/test/posthog.test.js +200 -0
- package/test/prestashop.test.js +207 -0
- package/test/resend.test.js +163 -0
- package/test/salesforce.test.js +276 -0
- package/test/semrush.test.js +479 -0
- package/test/sentry.test.js +35 -0
- package/test/shopify.test.js +247 -0
- package/test/slack.test.js +320 -0
- package/test/snowflake.test.js +391 -0
- package/test/tally.test.js +75 -0
- package/test/telegram.test.js +58 -0
- package/test/tiktok.test.js +243 -0
- package/test/tokens.test.js +1079 -0
- package/test/twilio.test.js +221 -0
- package/test/twitch.test.js +573 -0
- package/test/wave.test.js +678 -0
- package/test/wix.test.js +1099 -0
- package/test/wiz.test.js +185 -0
- package/test/wordpress-com.test.js +469 -0
- package/test/wordpress.test.js +660 -0
- package/test/workday.test.js +314 -0
- package/test/x-twitter.test.js +256 -0
- package/test/xero.test.js +700 -0
- package/test/zoho-books.test.js +253 -0
- package/test/zoho-crm.test.js +223 -0
package/docs/xero.md
ADDED
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
# Xero
|
|
2
|
+
|
|
3
|
+
The `xeroProvider` export from `@jskit-ai/connectors-catalog/server/xero`
|
|
4
|
+
connects an own web registration through the shared OAuth runtime. It discovers
|
|
5
|
+
authorised tenants and provides organisation settings, contacts, invoices,
|
|
6
|
+
payments, reports, budgets, manual journals, bank transactions and attachments. Configuration, consent, refresh and encrypted file storage work from
|
|
7
|
+
an ordinary backend or CLI; no database or Vibe64 service is required.
|
|
8
|
+
|
|
9
|
+
## Create the provider registration
|
|
10
|
+
|
|
11
|
+
1. Sign in to the [Xero developer portal](https://developer.xero.com/myapps/).
|
|
12
|
+
Open **My Apps**, choose **New app**, and enter your application's name.
|
|
13
|
+
2. Choose the **Auth Code** grant type for a backend that can keep a secret.
|
|
14
|
+
Supply the application's website and its exact callback URL, then complete
|
|
15
|
+
the portal's required agreement and create the app.
|
|
16
|
+
3. Open the app's configuration, copy **Client ID**, and use **Generate a
|
|
17
|
+
secret**. Save that secret in the backend's environment or secret store.
|
|
18
|
+
4. Register an HTTPS callback. Local CLI testing may use
|
|
19
|
+
`http://localhost:8080/connections/xero/callback`; Xero explicitly excludes
|
|
20
|
+
`http://127.0.0.1`. Configure a listener on that same hostname, path and port.
|
|
21
|
+
5. Put the Client ID in the configuration below. Bind `XERO_CLIENT_SECRET`
|
|
22
|
+
and `XERO_CALLBACK_URL` outside source. Preserve the provider-specific
|
|
23
|
+
`tokenEndpointAuthMethod: "client_secret_basic"` value.
|
|
24
|
+
|
|
25
|
+
The [code-flow guide](https://developer.xero.com/documentation/guides/oauth2/auth-flow/)
|
|
26
|
+
defines these endpoints, callback rules and client authentication. This
|
|
27
|
+
fragment implements a confidential web registration. Native secret-free
|
|
28
|
+
registrations and client-credentials Custom Connections are different flows
|
|
29
|
+
and are not implemented here. A CLI can operate the backend flow; do not ship
|
|
30
|
+
a confidential client secret inside a downloadable frontend.
|
|
31
|
+
|
|
32
|
+
## Portable configuration
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"schemaVersion": 1,
|
|
37
|
+
"integrations": {
|
|
38
|
+
"xero": {
|
|
39
|
+
"provider": "xero",
|
|
40
|
+
"displayName": "Accounting organisations",
|
|
41
|
+
"accountMode": "per-user",
|
|
42
|
+
"scopes": [
|
|
43
|
+
"offline_access",
|
|
44
|
+
"accounting.settings.read",
|
|
45
|
+
"accounting.contacts.read",
|
|
46
|
+
"accounting.invoices.read"
|
|
47
|
+
],
|
|
48
|
+
"authentication": { "method": "oauth2", "registrationRef": "xero" }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"registrations": {
|
|
52
|
+
"xero": {
|
|
53
|
+
"source": "own",
|
|
54
|
+
"clientId": "replace-with-provider-client-id",
|
|
55
|
+
"tokenEndpointAuthMethod": "client_secret_basic",
|
|
56
|
+
"clientSecretRef": "env:XERO_CLIENT_SECRET",
|
|
57
|
+
"callbackUrlRef": "env:XERO_CALLBACK_URL"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The editor fills the same Basic registration field automatically and displays
|
|
64
|
+
the shared Client ID, secret-reference and callback-reference inputs. All 16
|
|
65
|
+
captured permissions are represented, together with seven read-only accounting
|
|
66
|
+
variants and the tax-report permission. The four defaults above suit the
|
|
67
|
+
implemented reads. Current [Xero scopes](https://developer.xero.com/documentation/guides/oauth2/scopes/)
|
|
68
|
+
replace the old broad transaction/report permissions with granular ones.
|
|
69
|
+
Select the permission required by the operation below and reconnect when
|
|
70
|
+
adding permissions. A scope alone does not add operations beyond this adapter’s
|
|
71
|
+
documented set; in particular GST/BAS tax reports are not implemented. Requested scopes can still be declined or
|
|
72
|
+
restricted by the provider's app tier and user permissions.
|
|
73
|
+
|
|
74
|
+
Use `shared` only when the application deliberately authorises members to use
|
|
75
|
+
one connection; map them to a stable shared subject in its policy. `per-user`
|
|
76
|
+
keeps individual grants separate; `assistant` still needs explicit assistant
|
|
77
|
+
and workspace policy. Connecting an organisation never makes its data public.
|
|
78
|
+
This adapter requests no identity scopes and implements no application login.
|
|
79
|
+
|
|
80
|
+
## Operations and ownership
|
|
81
|
+
|
|
82
|
+
| Operation | Inputs | Result and boundary |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| `connections.list` | None | The token's connected tenants; also used to verify consent. An empty list is valid, but permits no accounting request. |
|
|
85
|
+
| `organisation.read` | Required `tenantId` | One organisation's metadata, after verifying an `ORGANISATION` connection. Its returned ID must match. |
|
|
86
|
+
| `contacts.list` | Required `tenantId`; optional `page`, `pageSize`, `includeArchived`, `searchTerm` | One lightweight contact page, with `summaryOnly=true`. |
|
|
87
|
+
| `invoices.list` | Required `tenantId`; optional `page`, `pageSize` | One lightweight invoice page, with `summaryOnly=true`. |
|
|
88
|
+
| `contacts.get`, `invoices.get` | `tenantId`, `id` | Individual records with full native detail. |
|
|
89
|
+
| `contacts.create/update`, `invoices.create/update` | See write sections below | Deliberate contact, sales invoice and supplier bill changes. |
|
|
90
|
+
| `accounts.list`, `currencies.list`, `taxRates.list`, `trackingCategories.list` | `tenantId`; tracking optionally `includeArchived` | Organisation-owned settings for preparing entries. |
|
|
91
|
+
| `payments.list/create` | See payment sections below | Read payment pages or record an invoice payment; no card charge. |
|
|
92
|
+
| `reports.profitAndLoss`, `reports.balanceSheet`, `reports.agedReceivables`, `reports.agedPayables`, `reports.executiveSummary`, `reports.bankSummary`, `reports.trialBalance`, `reports.budgetSummary` | Explicit dates and report-specific fields below | Native report rows and decimal text. |
|
|
93
|
+
| `budgets.list/get` | `tenantId`, optional date range; detail requires `id` | Existing budgets and account budget lines. |
|
|
94
|
+
| `bankTransactions.list/get/create/update` | See bank sections below | Reads plus ordinary spend/receive writes. |
|
|
95
|
+
| `manualJournals.list/get/create/update` | See journal sections below | Reads and deliberate journal changes/posting. |
|
|
96
|
+
| `attachments.list/download/upload/replace` | Parent resource, record ID and file inputs below | Files attached to supported accounting records. |
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
Choose an organisation explicitly from `connections.list`; do not silently use
|
|
100
|
+
the first connection. Every accounting request rechecks the token's current
|
|
101
|
+
connections before adding the chosen `Xero-tenant-id` header. Practice tenants
|
|
102
|
+
are discoverable but cannot be used with these accounting operations. No caller
|
|
103
|
+
can supply arbitrary headers or URLs. The host must additionally authorise the
|
|
104
|
+
selected organisation for that application/workspace/user; a Xero grant can
|
|
105
|
+
contain more organisations than this application should expose.
|
|
106
|
+
|
|
107
|
+
Contact and invoice pages default to 100 items and allow 1–200; payment
|
|
108
|
+
pages allow 1–100. Bank transaction and manual journal pages are fixed at
|
|
109
|
+
up to 100. Page numbers start at 1 and are bounded at 1,000,000. Contact search is limited to 255 characters; archived contacts
|
|
110
|
+
default to excluded. Paging, summary payloads and any returned metadata are
|
|
111
|
+
preserved. The caller chooses subsequent pages; there is no automatic crawl,
|
|
112
|
+
inference of missing pages or accounting calculation. Writes are separate
|
|
113
|
+
explicit operations; listing or verifying a connection never writes records. Returned records
|
|
114
|
+
are private application data, not status metadata to broadcast or log.
|
|
115
|
+
The [contacts guide](https://developer.xero.com/documentation/api/accounting/contacts/)
|
|
116
|
+
and [paging guide](https://developer.xero.com/documentation/best-practices/api-call-efficiencies/paging/)
|
|
117
|
+
describe the underlying read parameters and lightweight responses.
|
|
118
|
+
|
|
119
|
+
## Application registration ownership
|
|
120
|
+
|
|
121
|
+
Each application owns its provider registration, callback route, credentials
|
|
122
|
+
and grants. Hosted and installed editors configure the same app-owned setup;
|
|
123
|
+
neither supplies a shared Vibe64 registration or token gateway. Use the app's
|
|
124
|
+
assigned public URL as the initial callback origin, append the route the backend
|
|
125
|
+
actually implements, and register the exact URL with the provider. Keep the
|
|
126
|
+
client secret and callback binding in the application's Env.
|
|
127
|
+
|
|
128
|
+
A custom-domain or hosting move that changes the callback requires updating both
|
|
129
|
+
the provider registration and the app's Env. Preserve the application's identity
|
|
130
|
+
and private connection store, validate callback state and initiator, and allow
|
|
131
|
+
only application-approved return destinations. The editor's address is not the
|
|
132
|
+
provider callback. See the [callback contract](../../connectors-core/docs/oauth-callbacks.md)
|
|
133
|
+
and [setup command](../../connectors-core/docs/setup-command.md).
|
|
134
|
+
|
|
135
|
+
Distinct client IDs do not prove separate developer-wide quotas or exemption
|
|
136
|
+
from commercial tiers. Do not create duplicate free apps to evade limits.
|
|
137
|
+
|
|
138
|
+
The newer [tenant guide](https://developer.xero.com/documentation/guides/oauth2/tenants/)
|
|
139
|
+
states that new apps start at five organisations and Core permits 50. Multiple
|
|
140
|
+
users connected to the same tenant count once toward the app's tenant limit.
|
|
141
|
+
The older code-flow page still mentions 25; use the current tenant and
|
|
142
|
+
[pricing documentation](https://developer.xero.com/pricing/), then check the
|
|
143
|
+
registration's actual tier. Per-organisation throttling and app capacity still
|
|
144
|
+
apply. The application owns its usage policy and operator provisioning.
|
|
145
|
+
|
|
146
|
+
## What an AI can automate
|
|
147
|
+
|
|
148
|
+
| Work | Available path |
|
|
149
|
+
|---|---|
|
|
150
|
+
| Create an application registration and obtain its secret | No documented general app-registration API was found in the public OAuth/tenant guides. Use the portal; an authorised browser operator can help with those fields. Human consent, agreements and account access remain required. |
|
|
151
|
+
| Generate application configuration and wire callbacks | AI can write this JSON and compose the shared library. Only real assigned IDs and externally supplied bindings make the flow usable. |
|
|
152
|
+
| Discover permitted organisations and read accounting data | Documented OAuth and Accounting APIs; these operations are implemented and locally tested. |
|
|
153
|
+
| Remove provider connections or revoke grants | Xero documents connection deletion and token revocation. These are provider mutations, separate from this fragment's local disconnect; they are not implemented here. |
|
|
154
|
+
| Upgrade capacity or obtain distribution approval | Portal/operator process. Configuration does not perform an upgrade or bypass it. |
|
|
155
|
+
|
|
156
|
+
The [tenants API](https://developer.xero.com/documentation/guides/oauth2/tenants/)
|
|
157
|
+
describes connection management, including a separate client-credentials path.
|
|
158
|
+
Do not confuse that management capability with public developer-app creation.
|
|
159
|
+
|
|
160
|
+
## Lifecycle and proof
|
|
161
|
+
|
|
162
|
+
`offline_access` permits refresh. The runtime serialises refresh for a stored
|
|
163
|
+
connection and saves rotated credentials even if the following read fails.
|
|
164
|
+
Expired/revoked grants become reconnect-required. Local disconnect removes the
|
|
165
|
+
encrypted grant and pending attempts; it does not revoke other Xero connections.
|
|
166
|
+
Callers must surface provider errors, preserve the file-store key across
|
|
167
|
+
restarts and authorise each named operation before references are resolved.
|
|
168
|
+
|
|
169
|
+
The focused source suite currently passes 24 controlled tests, covering OAuth,
|
|
170
|
+
tenant access, reads/writes, report and budget results, raw attachment transfer,
|
|
171
|
+
encrypted persistence, interruption and redacted failures. All provider responses
|
|
172
|
+
are fixtures. Earlier public editor phone/desktop checks covered the initial
|
|
173
|
+
Basic registration, 24 permission choices, ownership, references and persistence;
|
|
174
|
+
they do not prove the subsequently expanded instructions. The updated compact-screen form check passed with the expanded instructions
|
|
175
|
+
and persistence assertions. The offline installed-package suite also passed
|
|
176
|
+
24/24 tests through public exports. The current expanded instructions have not
|
|
177
|
+
been rerun at desktop width; the earlier desktop form evidence is retained. No real registration, consent, accounting
|
|
178
|
+
data or generated application has been exercised.
|
|
179
|
+
|
|
180
|
+
## Payment reads
|
|
181
|
+
|
|
182
|
+
`payments.list({ tenantId, page, pageSize })` returns the native `Payments`
|
|
183
|
+
envelope. Select `tenantId` from `connections.list`; access is checked again
|
|
184
|
+
before every accounting request. `page` starts at 1; `pageSize` is 1–100,
|
|
185
|
+
default 100. The application requests later pages explicitly.
|
|
186
|
+
|
|
187
|
+
Select `accounting.payments.read` (or `accounting.payments` for an application
|
|
188
|
+
that also needs payment writes) and obtain fresh consent before invoking this
|
|
189
|
+
operation. Payment scope is separate from invoice scope. Preserve each payment's
|
|
190
|
+
amount, currency rate, account and invoice references; do not assume an amount is
|
|
191
|
+
in the organisation's base currency or recompute financial totals with binary
|
|
192
|
+
floating-point arithmetic. Native frameworks use GET `/api.xro/2.0/Payments`
|
|
193
|
+
with the same bearer grant, `Xero-tenant-id` and paging query. No payment is
|
|
194
|
+
created by this read.
|
|
195
|
+
|
|
196
|
+
Contracts: [Xero Accounting OpenAPI](https://github.com/XeroAPI/Xero-OpenAPI/blob/master/xero_accounting.yaml)
|
|
197
|
+
and [current granular scopes](https://developer.xero.com/documentation/guides/oauth2/scopes/).
|
|
198
|
+
The OpenAPI still lists older broad scopes in places; the current scope guide
|
|
199
|
+
maps payment reads to `accounting.payments.read`.
|
|
200
|
+
|
|
201
|
+
## Financial reports
|
|
202
|
+
|
|
203
|
+
- `reports.profitAndLoss({ tenantId, fromDate, toDate, ...options })` needs
|
|
204
|
+
`accounting.reports.profitandloss.read` and an ordered YYYY-MM-DD date range.
|
|
205
|
+
- `reports.balanceSheet({ tenantId, date, ...options })` needs
|
|
206
|
+
`accounting.reports.balancesheet.read` and an explicit YYYY-MM-DD date.
|
|
207
|
+
|
|
208
|
+
Options are `periods` (1–12), `timeframe` (MONTH, QUARTER or YEAR),
|
|
209
|
+
`standardLayout` and `paymentsOnly` (cash basis). The application chooses these
|
|
210
|
+
accounting/reporting settings and displays them with the result. These endpoints
|
|
211
|
+
return a native `Reports` envelope with headings, sections, rows, cells and
|
|
212
|
+
attributes. Preserve monetary cell strings exactly; do not convert them into
|
|
213
|
+
JavaScript numbers to display or add them. The provider calculates the report.
|
|
214
|
+
An empty Rows array remains a successful empty report, not fabricated zero totals.
|
|
215
|
+
|
|
216
|
+
Select the corresponding report permission in setup and reconnect for consent.
|
|
217
|
+
The connected Xero user also needs report access in the selected organisation.
|
|
218
|
+
Native frameworks GET `/api.xro/2.0/Reports/ProfitAndLoss` or
|
|
219
|
+
`/api.xro/2.0/Reports/BalanceSheet` with the same tenant header, user token and
|
|
220
|
+
query names. Report rendering, filters and organisation selection stay app-owned.
|
|
221
|
+
Tracking-category filters and other report types are not yet supplied by these
|
|
222
|
+
operations; the Xero completion checklist remains open.
|
|
223
|
+
|
|
224
|
+
## Full contact and invoice detail
|
|
225
|
+
|
|
226
|
+
`contacts.get({ tenantId, id })` and `invoices.get({ tenantId, id })` retrieve
|
|
227
|
+
one record using its returned UUID. Their existing contact/invoice read or write
|
|
228
|
+
permissions suffice. The runtime rechecks the connected organisation before
|
|
229
|
+
fetching and rejects a mismatched record ID. It retains full provider fields,
|
|
230
|
+
including addresses/contact people and invoice line items, currency and balances.
|
|
231
|
+
The app decides which fields its authenticated visitor may see.
|
|
232
|
+
|
|
233
|
+
Native frameworks use GET `/api.xro/2.0/Contacts/{ContactID}` or
|
|
234
|
+
`/api.xro/2.0/Invoices/{InvoiceID}` with no summaryOnly query, the selected
|
|
235
|
+
`Xero-tenant-id` and the app-held bearer token. The list operations remain
|
|
236
|
+
lightweight summaries; request detail for a selected record. Treat attachment
|
|
237
|
+
links as data rather than automatically forwarding authorization headers to them.
|
|
238
|
+
|
|
239
|
+
## Contact creation and changes
|
|
240
|
+
|
|
241
|
+
`contacts.create({ tenantId, idempotencyKey, Name, ...fields })` creates a contact.
|
|
242
|
+
`contacts.update({ tenantId, id, idempotencyKey, ...fields })` changes the supplied
|
|
243
|
+
fields on an existing contact. Supported fields are Name, FirstName, LastName,
|
|
244
|
+
EmailAddress and ContactNumber. At least one changed field is required. Xero
|
|
245
|
+
still validates tenant-specific uniqueness and field semantics.
|
|
246
|
+
|
|
247
|
+
Select `accounting.contacts` and reconnect for write consent. The application
|
|
248
|
+
must authorize the person making the change and supply a stable idempotency key
|
|
249
|
+
for that exact logical request (maximum 128 printable non-space ASCII characters).
|
|
250
|
+
Keep the key with the request; a retry of the same action must not generate a new
|
|
251
|
+
key or change its content. There are no automatic retries. On timeout or uncertain
|
|
252
|
+
provider outcome, reconcile the contact in Xero before deciding whether to retry.
|
|
253
|
+
|
|
254
|
+
Native frameworks use PUT `/api.xro/2.0/Contacts` for creation or POST
|
|
255
|
+
`/api.xro/2.0/Contacts/{ContactID}` for an update, with `{ Contacts: [fields] }`,
|
|
256
|
+
`Idempotency-Key`, the authorized tenant header and bearer token. Tenant discovery
|
|
257
|
+
is always a separate GET with no body or write headers. The adapter rejects
|
|
258
|
+
validation-error records even when the provider returns HTTP success. Saving
|
|
259
|
+
configuration never creates or changes a contact.
|
|
260
|
+
|
|
261
|
+
## Record an invoice payment
|
|
262
|
+
|
|
263
|
+
Use `accounts.list({ tenantId })` to discover account IDs and payment eligibility.
|
|
264
|
+
It needs the settings read permission already selected by default. Choose an
|
|
265
|
+
appropriate bank or payment-enabled account in the same organisation.
|
|
266
|
+
|
|
267
|
+
`payments.create({ tenantId, idempotencyKey, invoiceId, accountId, Date, Amount,
|
|
268
|
+
CurrencyRate?, Reference? })` records one payment using `accounting.payments`.
|
|
269
|
+
Select that write permission and reconnect first. Supply an explicit invoice,
|
|
270
|
+
account, YYYY-MM-DD payment date and positive numeric amount. CurrencyRate is
|
|
271
|
+
optional and positive; the application determines whether the invoice needs it.
|
|
272
|
+
Xero validates the amount against the invoice balance and tenant accounting rules.
|
|
273
|
+
This operation does not debit a bank, charge a card or mark a payment reconciled.
|
|
274
|
+
|
|
275
|
+
The app authorizes and confirms this accounting change. Persist its request key
|
|
276
|
+
and exact input. Native frameworks PUT `/api.xro/2.0/Payments` with
|
|
277
|
+
`{ Payments: [{ Invoice: { InvoiceID }, Account: { AccountID }, Date, Amount,
|
|
278
|
+
CurrencyRate?, Reference? }] }` and the tenant, bearer and Idempotency-Key headers.
|
|
279
|
+
A provider failure can leave the outcome unknown: inspect payment history before
|
|
280
|
+
retrying the exact request with the same key. Never silently create a fresh key.
|
|
281
|
+
No batch payments, credit-note refunds, reconciliation or payment deletion are
|
|
282
|
+
implemented by this operation. Saving the editor form makes no accounting change.
|
|
283
|
+
|
|
284
|
+
## Create and update invoices or bills
|
|
285
|
+
|
|
286
|
+
`invoices.create({ tenantId, idempotencyKey, Type, contactId, Date, CurrencyCode,
|
|
287
|
+
LineAmountTypes, LineItems, ...fields })` creates one sales invoice (`ACCREC`) or
|
|
288
|
+
supplier bill (`ACCPAY`). Status defaults to DRAFT; the app can explicitly request
|
|
289
|
+
SUBMITTED or AUTHORISED. Optional fields are DueDate, Reference and InvoiceNumber.
|
|
290
|
+
The app chooses currency and Exclusive/Inclusive/NoTax basis explicitly.
|
|
291
|
+
|
|
292
|
+
Supply 1–100 lines with Description, Quantity, UnitAmount and AccountCode. Optional
|
|
293
|
+
TaxType and DiscountRate are supported; discounts apply only to sales invoices.
|
|
294
|
+
`unitdp=4` preserves four-decimal unit prices in the provider request. The runtime
|
|
295
|
+
passes supplied numeric values without recalculating totals; Xero validates tax,
|
|
296
|
+
account, currency and status rules and computes totals. Do not build monetary
|
|
297
|
+
calculations from JavaScript floating-point additions. Use the framework's decimal
|
|
298
|
+
facilities for calculations before creating the request.
|
|
299
|
+
|
|
300
|
+
`invoices.update({ tenantId, id, idempotencyKey, ...fields })` changes supplied
|
|
301
|
+
fields only. Read the full invoice before changing its lines: a supplied LineItems
|
|
302
|
+
collection must contain the intended complete set, including existing LineItemID
|
|
303
|
+
values when retaining lines. The application owns concurrent-edit review. It may
|
|
304
|
+
request DRAFT, SUBMITTED, AUTHORISED, VOIDED or DELETED; Xero decides which transition
|
|
305
|
+
is legal for the current record. PAID is not a direct status operation: record a
|
|
306
|
+
payment separately. A status update does not email the invoice.
|
|
307
|
+
|
|
308
|
+
Select Read and manage invoices and bills (`accounting.invoices`) and reconnect.
|
|
309
|
+
The app must authorize and confirm meaningful status/accounting changes. Persist
|
|
310
|
+
an idempotency key and exact payload for each logical action; inspect the invoice
|
|
311
|
+
before retrying an uncertain write. Native frameworks PUT `/api.xro/2.0/Invoices`
|
|
312
|
+
or POST `/api.xro/2.0/Invoices/{InvoiceID}`, adding `unitdp=4`, with an Invoices
|
|
313
|
+
array containing one record and the same tenant/token/idempotency headers.
|
|
314
|
+
Use `Contact: { ContactID: contactId }` in the provider payload.
|
|
315
|
+
|
|
316
|
+
This does not implement credit notes, tracked-inventory overrides, recurring
|
|
317
|
+
invoices, attachments/PDF/email delivery, batch writes or arbitrary custom fields.
|
|
318
|
+
Saving configuration never writes an invoice or grants the app user accounting
|
|
319
|
+
permissions they do not have in Xero.
|
|
320
|
+
|
|
321
|
+
### Settings and additional financial reports
|
|
322
|
+
|
|
323
|
+
`currencies.list`, `taxRates.list` and `trackingCategories.list` take `tenantId` and use `accounting.settings.read` (or `accounting.settings`). Tracking categories additionally accept `includeArchived` (default false). Results preserve Xero's currency codes, tax components/rates and tracking options; use these organisation-owned values when preparing accounting entries.
|
|
324
|
+
|
|
325
|
+
Select the corresponding report permission in the configuration form and reconnect before invoking a newly enabled report. The connected Xero user must have report access too. All operations require `tenantId`:
|
|
326
|
+
|
|
327
|
+
| Operation | Additional inputs | Scope |
|
|
328
|
+
| --- | --- | --- |
|
|
329
|
+
| `reports.agedReceivables` / `reports.agedPayables` | Required `contactId`, `date`; optional `fromDate`, `toDate` | `accounting.reports.aged.read` |
|
|
330
|
+
| `reports.executiveSummary` | Required `date` | `accounting.reports.executivesummary.read` |
|
|
331
|
+
| `reports.bankSummary` | Required `fromDate`, `toDate` | `accounting.reports.banksummary.read` |
|
|
332
|
+
| `reports.trialBalance` | Required `date`; optional `paymentsOnly` | `accounting.reports.trialbalance.read` |
|
|
333
|
+
|
|
334
|
+
Dates use `YYYY-MM-DD`. Choose the contact from `contacts.list`; aged reports are per contact. Date ranges must be chronological. Responses retain native report rows, titles and decimal text; the framework owns rendering and calculations. CLI consumers use the same operation inputs and configuration scopes as the editor.
|
|
335
|
+
|
|
336
|
+
### Budget reads
|
|
337
|
+
|
|
338
|
+
Select **Read budgets** (`accounting.budgets.read`) and reconnect. Call `budgets.list` with `tenantId`; call `budgets.get` with that tenant and the returned budget UUID as `id`. Both accept optional `DateFrom` and `DateTo` in `YYYY-MM-DD` format (capitalization matches Xero). The adapter preserves account budget lines, balances, periods, notes and tracking data, and rejects a detail response for a different budget. It does not create or edit budgets.
|
|
339
|
+
|
|
340
|
+
For a summary, separately select **Read budget summary reports** (`accounting.reports.budgetsummary.read`) and reconnect. `reports.budgetSummary` takes `tenantId`, required `date`, optional `periods` (1–12) and optional integer `timeframe`: 1=month, 3=quarter, 12=year. This differs from the string timeframe used by profit/loss reports. The application owns rendering; no Vibe64 runtime is required.
|
|
341
|
+
|
|
342
|
+
### Bank transaction and manual journal reads
|
|
343
|
+
|
|
344
|
+
Select **Read bank transactions** (`accounting.banktransactions.read`) or **Read manual journals** (`accounting.manualjournals.read`), then reconnect. Full corresponding write scopes also permit these reads. `bankTransactions.list` and `manualJournals.list` accept `tenantId` and `page` (default 1); Xero uses fixed pages of up to 100 records for these endpoints. Continue numbered pages until an empty page; there is no configurable `pageSize` or `summaryOnly` query.
|
|
345
|
+
|
|
346
|
+
Use `bankTransactions.get` or `manualJournals.get` with the same tenant and the record UUID as `id` to retrieve full native detail. Bank account references, currency, transaction lines, journal debit/credit amounts and statuses are preserved. Individual responses must match the requested record. Applications own presentation, accounting review and authorization; listing records does not reconcile a bank account or authorize edits.
|
|
347
|
+
|
|
348
|
+
### Manual journal creation and updates
|
|
349
|
+
|
|
350
|
+
Select **Read and manage manual journals** (`accounting.manualjournals`) and reconnect. `manualJournals.create` requires `tenantId`, a stable `idempotencyKey`, `Narration`, `Date`, `LineAmountTypes` (`Exclusive`, `Inclusive`, `NoTax`) and 2–100 `JournalLines`. Each line requires `AccountCode` and finite signed `LineAmount`; debits are positive and credits negative. Optional line fields are `Description`, `TaxType` and up to two `Tracking` entries with `Name` and `Option`. Choose organisation-owned accounts, taxes and tracking values from the settings reads.
|
|
351
|
+
|
|
352
|
+
Creation defaults to `Status: "DRAFT"`; explicitly choose `POSTED` only after accounting review. `manualJournals.update` requires the tenant, request key, `id` and at least one changed field. It supports Xero's DRAFT/POSTED/DELETED/VOIDED/ARCHIVED status choices; Xero determines which transitions and accounts are valid. Optional `ShowOnCashBasisReports` is preserved. When replacing JournalLines, send the entire intended set, not an incremental line patch. Xero validates balance and tax; the adapter does not silently adjust entries.
|
|
353
|
+
|
|
354
|
+
The project backend owns authorization and retaining the exact intended request/key. Provider validation errors fail the operation. No automatic retries follow an uncertain write; retrieve the journal and review provider history before retrying with the same request key. These are accounting records, not transfers of money.
|
|
355
|
+
|
|
356
|
+
### Spend and receive bank transaction writes
|
|
357
|
+
|
|
358
|
+
Select **Read and manage bank transactions** (`accounting.banktransactions`) and reconnect. `bankTransactions.create` requires `tenantId`, a stable `idempotencyKey`, `Type` (`SPEND` or `RECEIVE`), `contactId`, `bankAccountId`, `Date`, `LineAmountTypes` and 1–100 `LineItems`. Each line requires `Description`, positive `Quantity`, finite `UnitAmount` and `AccountCode`; optional `TaxType` and existing `LineItemID` are supported. Choose the contact and bank account using the read operations. Currency belongs to the bank account; optional positive `CurrencyRate` supplies an exchange rate. Optional `Reference` is preserved. Requests use `unitdp=4` to preserve four-decimal unit amounts.
|
|
359
|
+
|
|
360
|
+
`bankTransactions.update` requires the tenant, request key, `id` and at least one changed field. It also accepts `Status: "AUTHORISED"` or `"DELETED"`; Xero validates allowed changes. Retrieve and review the transaction first; send the complete intended line set if replacing lines. Neither operation moves funds. Transfers, prepayments, overpayments and reconciliation are outside these write operations. Do not retry automatically after uncertain results: inspect the transaction/history and retain the original request key.
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
### Attachments
|
|
364
|
+
|
|
365
|
+
Select **Read attachments** (`accounting.attachments.read`) for listing/downloading,
|
|
366
|
+
or **Read and manage attachments** (`accounting.attachments`) for uploads and
|
|
367
|
+
replacements, then reconnect. Your application chooses `tenantId`, `resource`
|
|
368
|
+
(`Contacts`, `Invoices`, `BankTransactions` or `ManualJournals`) and the parent
|
|
369
|
+
record UUID as `id`. These files belong to that record in that organisation.
|
|
370
|
+
|
|
371
|
+
- `attachments.list` returns Xero's attachment metadata. Select an `AttachmentID`
|
|
372
|
+
from it and pass that as `attachmentId` to `attachments.download`.
|
|
373
|
+
- Downloads return `contentBase64`, `contentType` and `size` (bytes). The application
|
|
374
|
+
decides how to present the file; do not execute or trust uploaded file content.
|
|
375
|
+
- `attachments.upload` and `attachments.replace` require `filename`, canonical
|
|
376
|
+
`contentBase64` and a stable `idempotencyKey`. Upload uses PUT; replace uses POST
|
|
377
|
+
with the existing filename. Filenames cannot contain path separators or control
|
|
378
|
+
characters. The file body is sent as raw bytes, not JSON or multipart data.
|
|
379
|
+
|
|
380
|
+
The adapter bounds each nonempty upload/download to 3 MiB. Xero also enforces its
|
|
381
|
+
own attachment counts and file restrictions. A failed or uncertain upload is not
|
|
382
|
+
retried automatically; list the parent's attachments before deciding whether to
|
|
383
|
+
retry with the original request key. There is no attachment deletion operation
|
|
384
|
+
or automatic public invoice attachment sharing. CLI consumers use the same
|
|
385
|
+
base64 input/output contract; other frameworks can use their native byte streams
|
|
386
|
+
against these provider endpoints with the same project-owned credentials.
|
|
387
|
+
|
|
388
|
+
## Closeout scope and remaining work
|
|
389
|
+
|
|
390
|
+
This provider is being closed against the September 13 existing-capability
|
|
391
|
+
milestone, not complete Xero API coverage or exact Lovable parity. The operation
|
|
392
|
+
index above is the supported runtime surface. The following work remains outside
|
|
393
|
+
that surface:
|
|
394
|
+
|
|
395
|
+
- Authentication: no secret-free native registration, Custom Connections,
|
|
396
|
+
client-credentials accounting access, or application sign-in. Each project
|
|
397
|
+
supplies its own confidential web registration and Env bindings.
|
|
398
|
+
- Connection management: disconnect is local; provider-side token revocation and
|
|
399
|
+
removing individual tenant connections must be done through Xero. The host
|
|
400
|
+
must implement its own organisation selection/authorization and connection UI.
|
|
401
|
+
- Contacts: create/update supports basic names, email and contact number, not
|
|
402
|
+
full address, phone, bank-detail, contact-person or group management.
|
|
403
|
+
- Invoices/bills: supported line fields and status updates are documented above.
|
|
404
|
+
No invoice email/PDF operations, repeating invoices, credit notes, purchase
|
|
405
|
+
orders, discounts on bills or automatic line merging. Tracking on invoice and
|
|
406
|
+
bank transaction writes is not implemented.
|
|
407
|
+
- Payments: invoice payment recording only; no payment deletion, batch payments,
|
|
408
|
+
prepayment/overpayment allocation or actual payment processing.
|
|
409
|
+
- Bank transactions: ordinary SPEND/RECEIVE only; no transfer, overpayment,
|
|
410
|
+
prepayment or reconciliation workflows.
|
|
411
|
+
- Journals: manual journal reads/writes only, with the bounded field set above;
|
|
412
|
+
no automatic balancing, tax calculation or general ledger journal import.
|
|
413
|
+
- Settings: discovery only; no creation or editing of accounts, taxes, currencies
|
|
414
|
+
or tracking categories. Budgets are read-only.
|
|
415
|
+
- Reports: only the eight named reports in the index. GST/BAS tax reports and
|
|
416
|
+
general report discovery are not implemented, despite the available tax scope.
|
|
417
|
+
- Attachments: four parent types, 3 MiB per file, no deletion or automatic online
|
|
418
|
+
invoice sharing. Larger files and other record types need native integration.
|
|
419
|
+
- Native application composition: the framework owns routes, UI, authorization,
|
|
420
|
+
business validations and operation calls. Installing the provider or saving the
|
|
421
|
+
editor form does not generate an accounting application. Editor coding-agent
|
|
422
|
+
tool attachment remains deferred under the shared milestone decision.
|
|
423
|
+
- Verification: controlled fixtures establish request/response and local lifecycle
|
|
424
|
+
behavior. Live OAuth, actual Xero organisations, provider tiers, production
|
|
425
|
+
permissions, accounting outcomes and generated-app execution are unverified.
|
|
426
|
+
|
|
427
|
+
Future work should address these items only when a concrete application requires
|
|
428
|
+
them. Do not present an unsupported operation as available merely because its
|
|
429
|
+
OAuth scope can be selected.
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Zoho Books
|
|
2
|
+
|
|
3
|
+
Import `zohoBooksProvider` from `@jskit-ai/connectors-catalog/server/zoho-books`.
|
|
4
|
+
This initial adapter discovers organisations and reads contact and invoice pages.
|
|
5
|
+
CLI and Vibe64 use the same configuration, OAuth service and encrypted file store.
|
|
6
|
+
Saving configuration does not connect an account.
|
|
7
|
+
|
|
8
|
+
## Register and configure
|
|
9
|
+
|
|
10
|
+
1. Open the [Zoho API Console](https://api-console.zoho.com/) in the data centre
|
|
11
|
+
containing your account. Choose **Get Started** or **Add Client**.
|
|
12
|
+
2. Choose **Server-based Applications**, then **Create Now**. Enter **Client
|
|
13
|
+
Name**, **Homepage URL** and the exact **Authorized Redirect URI** served by
|
|
14
|
+
your backend. Choose **Create**. This adapter uses a backend-held secret;
|
|
15
|
+
the Self Client flow is outside this implementation.
|
|
16
|
+
3. Open the client's **Client Secret** section. Copy its **Client ID** into
|
|
17
|
+
the registration. Store its secret in `ZOHO_BOOKS_CLIENT_SECRET`, and the
|
|
18
|
+
registered callback URL in `ZOHO_BOOKS_CALLBACK_URL`.
|
|
19
|
+
4. Select the matching **Data center** in Vibe64 or `settings.region` in JSON.
|
|
20
|
+
For accounts in other regions, open the client's **Settings**, enable
|
|
21
|
+
**Multi DC**, and enable each required region. Use that region's secret;
|
|
22
|
+
do not assume all enabled regions share one secret.
|
|
23
|
+
5. To restrict this integration's resource operations to one organisation,
|
|
24
|
+
open Zoho Books, click the organisation-name menu, then **Manage
|
|
25
|
+
Organizations**. Copy its ID into **Organization ID (optional)**. Otherwise
|
|
26
|
+
leave the field absent, discover organisations after consent, and have the
|
|
27
|
+
application explicitly select an authorised ID for each resource request.
|
|
28
|
+
6. Keep **Read organisations and settings** enabled for connection verification.
|
|
29
|
+
Contact and invoice reads are also selected initially. The ten optional
|
|
30
|
+
full-access scopes preserve configuration choices for future operations;
|
|
31
|
+
selecting them does not add write operations to this adapter.
|
|
32
|
+
7. Save configuration. The host calls `beginAuthorization`, opens the returned
|
|
33
|
+
URL in the system browser, and handles `completeAuthorization` with the same
|
|
34
|
+
authenticated owner. Zoho consent returns to the registered backend callback.
|
|
35
|
+
The library verifies through `organizations.list` before saving the grant.
|
|
36
|
+
|
|
37
|
+
The [Books OAuth guide](https://www.zoho.com/books/api/v3/oauth/) documents client
|
|
38
|
+
registration, scopes, consent and Multi DC. Zoho's [server application guide](https://www.zoho.com/developer/oauth/web-server-apps/overview.html)
|
|
39
|
+
explains server clients and PKCE. [Organisation discovery](https://www.zoho.com/books/api/v3/organizations/)
|
|
40
|
+
and [organisation IDs](https://www.zoho.com/books/api/v3/introduction/#organization-id)
|
|
41
|
+
describe the Books-specific selection.
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"schemaVersion": 1,
|
|
46
|
+
"registrations": {
|
|
47
|
+
"zoho": {
|
|
48
|
+
"source": "own",
|
|
49
|
+
"clientId": "1000.REPLACE_WITH_ASSIGNED_CLIENT_ID",
|
|
50
|
+
"clientSecretRef": "env:ZOHO_BOOKS_CLIENT_SECRET",
|
|
51
|
+
"callbackUrlRef": "env:ZOHO_BOOKS_CALLBACK_URL"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"integrations": {
|
|
55
|
+
"books": {
|
|
56
|
+
"provider": "zoho-books",
|
|
57
|
+
"displayName": "My accounting",
|
|
58
|
+
"accountMode": "per-user",
|
|
59
|
+
"authentication": { "method": "oauth2", "registrationRef": "zoho" },
|
|
60
|
+
"settings": { "region": "eu", "organizationId": "10234695" },
|
|
61
|
+
"scopes": [
|
|
62
|
+
"ZohoBooks.settings.READ",
|
|
63
|
+
"ZohoBooks.contacts.READ",
|
|
64
|
+
"ZohoBooks.invoices.READ"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Remove `organizationId` to use discovery. IDs remain strings of digits. Client
|
|
72
|
+
secrets and callback URLs are resolved from references; no provider tokens or
|
|
73
|
+
raw secrets belong in this file. Client authentication defaults to
|
|
74
|
+
`client_secret_post`, with URL-encoded token parameters. The Books guide contains
|
|
75
|
+
query-string examples and conflicting wording about token parameters; this
|
|
76
|
+
adapter follows the shared Zoho server flow's form-body exchange, not JSON token
|
|
77
|
+
bodies. Real Books consent remains unverified in this fixture-only pass.
|
|
78
|
+
[Zoho token request parameters](https://www.zoho.com/crm/developer/docs/api/v8/access-refresh.html)
|
|
79
|
+
|
|
80
|
+
## Regional routing and account ownership
|
|
81
|
+
|
|
82
|
+
| Setting | Accounts host | API host |
|
|
83
|
+
| --- | --- | --- |
|
|
84
|
+
| `us` | `accounts.zoho.com` | `www.zohoapis.com` |
|
|
85
|
+
| `eu` | `accounts.zoho.eu` | `www.zohoapis.eu` |
|
|
86
|
+
| `in` | `accounts.zoho.in` | `www.zohoapis.in` |
|
|
87
|
+
| `au` | `accounts.zoho.com.au` | `www.zohoapis.com.au` |
|
|
88
|
+
| `jp` | `accounts.zoho.jp` | `www.zohoapis.jp` |
|
|
89
|
+
| `ca` | `accounts.zohocloud.ca` | `www.zohoapis.ca` |
|
|
90
|
+
| `cn` | `accounts.zoho.com.cn` | `www.zohoapis.com.cn` |
|
|
91
|
+
| `sa` | `accounts.zoho.sa` | `www.zohoapis.sa` |
|
|
92
|
+
|
|
93
|
+
All API operations use `/books/v3`. EU is the configuration default; choose the
|
|
94
|
+
account's actual location. Token `api_domain` must exactly match the selected API
|
|
95
|
+
origin. Neither a token response nor `accounts-server` in a callback can supply
|
|
96
|
+
an arbitrary destination. A mismatch requires correcting configuration and
|
|
97
|
+
reconnecting. Region and organisation configuration changes invalidate an
|
|
98
|
+
existing grant's configuration binding. [Books data centres](https://www.zoho.com/books/api/v3/introduction/#multiple-data-centers),
|
|
99
|
+
[Accounts data centres](https://help.zoho.com/portal/en/kb/accounts/manage-your-zoho-account/articles/data-center-for-zoho-account).
|
|
100
|
+
|
|
101
|
+
The host's `authorize` policy maps an authenticated caller to a stable
|
|
102
|
+
application and subject. Personal mode gives each app user a separate connection.
|
|
103
|
+
Shared mode deliberately maps authorised members to one shared subject; assistant
|
|
104
|
+
mode uses its owner's identity. For a trusted CLI, compose the same service,
|
|
105
|
+
registered callback listener, explicit reference resolver and durable file key.
|
|
106
|
+
Do not copy a permissive CLI owner policy into a public endpoint.
|
|
107
|
+
|
|
108
|
+
An optional configured organisation limits the adapter's resource destination;
|
|
109
|
+
it does not reduce Zoho's OAuth grant. Discovery still returns the connected
|
|
110
|
+
account's organisation metadata. The host must enforce any narrower organisation
|
|
111
|
+
policy, and Zoho enforces the connected user's access to resource requests.
|
|
112
|
+
A Books connection is not application login.
|
|
113
|
+
|
|
114
|
+
## Operations and failure behavior
|
|
115
|
+
|
|
116
|
+
| Operation | Input | Result |
|
|
117
|
+
| --- | --- | --- |
|
|
118
|
+
| `organizations.list` | None | Provider `organizations` array; verifies that a configured organisation is active and present |
|
|
119
|
+
| `contacts.list` | `organization_id`, `page`, `per_page` | Provider `contacts` and `page_context` |
|
|
120
|
+
| `invoices.list` | `organization_id`, `page`, `per_page` | Provider `invoices` and `page_context` |
|
|
121
|
+
|
|
122
|
+
For resource reads, omit `organization_id` only when configuration supplies it.
|
|
123
|
+
An input conflicting with the configured organisation fails before transport.
|
|
124
|
+
Without a configured ID, the app must choose explicitly from discovery; the
|
|
125
|
+
adapter never picks a first/default organisation. An empty discovery result is
|
|
126
|
+
valid when no organisation is configured. A configured missing or inactive
|
|
127
|
+
organisation prevents connection verification.
|
|
128
|
+
|
|
129
|
+
Each list makes one GET request. `page` defaults to 1 and accepts 1–1,000,000;
|
|
130
|
+
`per_page` defaults to 100 and accepts 1–200. These are initial library bounds.
|
|
131
|
+
The host uses `page_context.has_more_page` to request another page. Null data
|
|
132
|
+
fields and string identifiers are preserved. The documented invoice singleton
|
|
133
|
+
`page_context` array is normalised to one object, matching contact pagination;
|
|
134
|
+
an empty or multiple-entry pagination array fails. Arbitrary URLs, filters, mutations,
|
|
135
|
+
SQL and automatic traversal are excluded. [Contacts](https://www.zoho.com/books/api/v3/contacts/#list-contacts),
|
|
136
|
+
[invoices](https://www.zoho.com/books/api/v3/invoices/#list-invoices),
|
|
137
|
+
[pagination](https://www.zoho.com/books/api/v3/pagination/).
|
|
138
|
+
|
|
139
|
+
Only HTTP 200 with `code: 0`, the expected records and matching pagination is
|
|
140
|
+
accepted. Empty arrays are valid; HTTP 204, malformed JSON, nonzero success
|
|
141
|
+
codes and inconsistent paging fail. Provider error text is not returned.
|
|
142
|
+
HTTP 401 requires reconnect; 403, 404, 429 and server failures have separate
|
|
143
|
+
safe errors. Missing configured scopes fail before transport. The runtime does
|
|
144
|
+
not retry. Cancellation and timeout reach the provider request.
|
|
145
|
+
[Error responses](https://www.zoho.com/books/api/v3/errors/)
|
|
146
|
+
|
|
147
|
+
Refresh keeps the previous refresh token when no replacement is returned.
|
|
148
|
+
Zoho's `invalid_code` token error becomes a reconnect condition. Failed or
|
|
149
|
+
cancelled replacement consent preserves the saved grant; callback replay fails.
|
|
150
|
+
`disconnect` deletes local credentials. Provider-side revocation is separate:
|
|
151
|
+
open Zoho Accounts, **Connected Apps**, and revoke the application's access.
|
|
152
|
+
Avoid repeatedly starting consent as an error recovery loop; Zoho limits active
|
|
153
|
+
refresh tokens. [Token lifecycle and revocation](https://www.zoho.com/books/api/v3/oauth/)
|
|
154
|
+
|
|
155
|
+
## Application ownership, callbacks and capacity
|
|
156
|
+
|
|
157
|
+
The application owner creates the provider registration and stores its secret
|
|
158
|
+
in the application's private Env. Public Vibe64, Vibe64 Online and CLI users use
|
|
159
|
+
this same ownership model. The configuration file holds the client ID and Env
|
|
160
|
+
references; the editor does not own the application's grants.
|
|
161
|
+
|
|
162
|
+
Register the exact callback implemented by the application. For a hosted project,
|
|
163
|
+
start with its assigned application URL and append the implemented callback path.
|
|
164
|
+
Save that same URL through the application's callback Env reference. On a domain
|
|
165
|
+
or host change, update both the provider registration and callback Env if the URL
|
|
166
|
+
changes. Preserve the application's identity and persistent grant store when
|
|
167
|
+
moving it; neither a new editor URL nor a new hosting address creates a new owner.
|
|
168
|
+
See the [callback guide](../../connectors-core/docs/oauth-callbacks.md) and
|
|
169
|
+
[application setup command](../../connectors-core/docs/setup-command.md).
|
|
170
|
+
|
|
171
|
+
Configure the required Multi DC settings on the application's own client and keep
|
|
172
|
+
regional secrets in its private Env. Preserve the selected region and Books
|
|
173
|
+
organisation with the connection. Separate client IDs do not guarantee separate
|
|
174
|
+
Books organisation capacity: rate limits and daily allowances are organisation-
|
|
175
|
+
based and plan-dependent.
|
|
176
|
+
[Books API limits](https://www.zoho.com/books/api/v3/introduction/#api-call-limit)
|
|
177
|
+
|
|
178
|
+
## Automation and verification
|
|
179
|
+
|
|
180
|
+
AI can write/validate this configuration, wire the existing library, implement
|
|
181
|
+
host callbacks and prepare regional setup values. Discovery itself is automated
|
|
182
|
+
through `organizations.list`. The reviewed provider documentation uses console
|
|
183
|
+
registration; a public API to create/configure these OAuth clients has not been
|
|
184
|
+
established. Account creation, sign-in, consent, regional enablement and any
|
|
185
|
+
provider review remain authorised operator/provider steps.
|
|
186
|
+
|
|
187
|
+
Local verification uses controlled HTTP responses and encrypted temporary files.
|
|
188
|
+
It does not connect real accounts, create provider clients, generate applications
|
|
189
|
+
or exercise accounting data. Deployed application callbacks, complete connection UI,
|
|
190
|
+
provider revocation, writes and the remaining Books APIs are separate unfinished
|
|
191
|
+
work. The initial adapter and its broader scope configuration do not imply full
|
|
192
|
+
API coverage.
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
## Existing-scope closeout — 13 September 2026
|
|
196
|
+
|
|
197
|
+
Supported: regional server OAuth, organisation discovery, configured or explicit
|
|
198
|
+
organisation selection, contact and invoice page reads, encrypted file grants
|
|
199
|
+
and refresh. Source 12/12 and installed-package 12/12 tests passed. Historical
|
|
200
|
+
editor form evidence is retained; no fresh browser run or runtime/form change.
|
|
201
|
+
|
|
202
|
+
Deferred work and limitations: no contact/invoice writes, customer payments,
|
|
203
|
+
credit notes, estimates, sales/purchase orders, bills, expenses, projects or
|
|
204
|
+
other Books resource operations. No record detail/search, attachments, webhooks,
|
|
205
|
+
automatic pagination, accounting calculations or processing of payments. Broader
|
|
206
|
+
scope choices do not enable these operations. No alternative OAuth grant types,
|
|
207
|
+
automatic client registration, region detection or provider-side revocation.
|
|
208
|
+
Organisation discovery does not prove contact/invoice permissions; an unconfigured
|
|
209
|
+
integration requires an explicit organisation per operation. The host must enforce
|
|
210
|
+
its own organisation/user policy in addition to provider permissions. Callback
|
|
211
|
+
routes, business/end-user connection UI and native framework wiring belong to the
|
|
212
|
+
application. Disconnect is local. Editor coding-agent attachment, live regional
|
|
213
|
+
consent/permissions/accounting outcomes and generated-app execution remain deferred
|
|
214
|
+
or unverified. The original broader accounting packet remains backlog.
|