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

# Account integrations

> Integration guide for Account integrations

Read the catalog before changing a provider. It lists the current stored setup, supported settings, regional availability, and existing plan eligibility.

```bash theme={null}
curl --fail-with-body "$GIGSTACK_API_URL/teams/$TEAM_ID/integrations/catalog" \
  -H "Authorization: Bearer $GIGSTACK_TOKEN"
```

The response contains `data.team_id` and `data.providers`. Each provider has `source: "stored_configuration"`. A stored `completed: true` does not prove that its credentials still work or its latest synchronization succeeded. `web_actions` describes dashboard capabilities; use `api_actions` to determine which actions this API currently exposes.

## Change only the selected settings

For an already connected Stripe account, turn off automatic invoicing without changing its credentials or other settings:

```bash theme={null}
curl --fail-with-body -X PATCH \
  "$GIGSTACK_API_URL/teams/$TEAM_ID/integrations/stripe/settings" \
  -H "Authorization: Bearer $GIGSTACK_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"automatic_invoicing":false}'
```

Expect `success: true` and `data.settings.automatic_invoicing: false`. Read the provider again with `GET /teams/{id}/integrations/stripe` if the connection closes before the response arrives. Omitted fields remain unchanged. Nullable text accepts `null` to clear a value; boolean settings accept `true` or `false`, never `null`.

The selected provider determines the accepted fields. Sending Stripe fields to a different provider, provider secrets, arbitrary storage paths, or a `completed` flag fails validation. Most settings require an existing connection. Bank instructions have their own validation and can establish a new stored configuration; they require a country and account holder, plus a valid CLABE when country is `MEX`. This does not verify bank account ownership.

## Account scope and permissions

Current authorized members can read. A personal user credential must still belong to a current team or owning-account administrator to change settings. Team API credentials act within their current team authority and do not impersonate their creator. Membership and authority are checked again in the write transaction.

These settings are shared team configuration. A test credential does not isolate them from live use. Read `mode_scope` and the provider-specific operation before making a change. For example, disabling automatic invoicing can affect future live payments.

`installation` reports the existing dashboard plan rules. Existing connected providers remain manageable after reaching an installation limit; first-time bank configuration applies that limit. A catalog listing is not evidence that OAuth connection, provider synchronization, disconnect, or credential replacement is implemented. Use each dedicated operation when available.

## Common responses

* `400`: unsupported field, empty patch, invalid bank instructions, or a provider that requires its dedicated settings workflow.
* `403`: current authority or installation entitlement is missing.
* `404`: the target team or provider is outside the authorized scope or does not exist.
* `409 integration_not_configured`: complete the provider's connection workflow before changing these settings.

Use the [provider settings reference](/reference/updateAccountIntegrationSettings) for each accepted request schema, and the [catalog reference](/reference/listAccountIntegrations) for the exact response fields.

## NetSuite item mapping

NetSuite mappings are shared by the team. Preview and save use a live provider lookup even when the credential is in test mode. Read `effect_scope` before proceeding.

1. Read `GET /teams/{id}/integrations/netsuite/items` for the current mapping and `canEdit`.
2. Preview the intended rule:

```bash theme={null}
curl --fail-with-body -X POST \
  "$GIGSTACK_API_URL/teams/$TEAM_ID/integrations/netsuite/items/preview" \
  -H "Authorization: Bearer $GIGSTACK_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"rule":{"match":"Consulting","matchType":"exact","itemId":"42"},"days":30}'
```

3. Inspect the returned `data.data.rows`, `totals`, `requiresConfirmation` and `previewToken`.
4. Submit the same rule/window to `POST /teams/{id}/integrations/netsuite/items/rules` with that `previewToken`. If existing lines change, explicitly include `confirmChanges: true` after reviewing those changes.
5. Read the mapping again. A `409 state_changed` requires a fresh preview; do not reuse stale consent against a changed configuration.

The provider result sits inside `data.data`: the outer `data` identifies the provider, operation, credential mode and effect scope. Item IDs are numeric strings; `matchType` is `exact` or `contains`. Optional `scope` is `domestic` or `foreign`.

## Synchronization and disconnect

For NetSuite, use `GET /teams/{id}/integrations/netsuite/invoices/{invoiceId}/sync` to inspect an individual invoice. A sync enqueue response is not completed accounting work. The invoice must belong to the selected team and credential mode. A paid-invoice **resync can delete and recreate its applied NetSuite customer payment** for the current total. Inspect state and obtain explicit intent before that operation; do not automatically replay it after a timeout.

`GET /teams/{id}/integrations/netsuite/syncs` returns a bounded attention view. Preserve `truncated` and pass `nextBefore` as `before` for another page. The view scans at most 1,000 rows per source query and returns 50-item pages; it does not establish complete history. General NetSuite status includes both modes and caps recent syncs at 20.

For PayPal POS, `POST /teams/{id}/integrations/zettle/sync` with `{}` returns HTTP `202` and `queued: true` when work is durably queued. Test imports still read real merchant purchases. Settings and sync must match the stored connection mode; an active sync lease can temporarily refuse settings changes.

Disconnect outcomes differ:

* NetSuite disables the selected connection mode and returns `credentials_retained: true`. It does not erase stored encrypted credentials.
* PayPal POS fences local work and removes local credentials, then attempts remote subscription removal. Preserve `partial_cleanup: true` when that removal fails. `remote_removed: null` means no remote attempt was made.

These provider operations require a personal Firebase or signed MCP identity and the current provider-specific permission. A team API key cannot borrow the authority of its creator. A timeout returns `outcome_unknown`; read current state before deciding whether a new attempt is appropriate.


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