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

# Netsuite TBA

> Integrate your application with the Netsuite TBA API

## 🚀 Quickstart

Connect to Netsuite TBA with Nango and see data flow in 2 minutes.

<Steps>
  <Step title="Create the integration">
    In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Netsuite TBA*.
  </Step>

  <Step title="Authorize Netsuite TBA">
    Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then complete the Netsuite TBA authentication. Later, you'll let your users do the same directly from your app.

    <Note>Netsuite requires a user-specific account ID to run OAuth. You'll need to provide this along with your OAuth credentials.</Note>
  </Step>

  <Step title="Call the Netsuite TBA API">
    Let's make your first request to the Netsuite API. Replace the placeholders below with your [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl "https://api.nango.dev/proxy/record/v1/customer" \
          -H "Authorization: Bearer <NANGO-SECRET-KEY>" \
          -H "Provider-Config-Key: <INTEGRATION-ID>" \
          -H "Connection-Id: <CONNECTION-ID>"
        ```
      </Tab>

      <Tab title="Node">
        Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

        ```typescript theme={null}
        import { Nango } from '@nangohq/node';

        const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });

        const res = await nango.get({
            endpoint: '/record/v1/customer',
            providerConfigKey: '<INTEGRATION-ID>',
            connectionId: '<CONNECTION-ID>'
        });

        console.log(res.data);
        ```
      </Tab>
    </Tabs>

    Or fetch credentials with the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get).

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.
  </Step>

  <Step title="Implement Nango in your app">
    Follow our [Auth implementation guide](/guides/primitives/auth) to integrate Nango in your app.

    To obtain your own production credentials, follow the setup guide linked below.
  </Step>
</Steps>

## 📚 Netsuite TBA Integration Guides

Nango maintained guides for common use cases.

* [How to set up Netsuite TBA with Nango](/api-integrations/netsuite-tba/how-to-set-up-netsuite-tba-with-nango)\
  Configure token-based authentication with Netsuite and connect it to Nango

Official docs: [Netsuite REST API documentation](https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2023.1/index.html)

## 🧩 Pre-built syncs & actions for Netsuite TBA

Enable them in your dashboard. Extend and customize to fit your needs.

### Bills

| Function name | Description                                  | Type                                         | Source code                                                                                                              |
| ------------- | -------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `bill-create` | Creates a vendor bill in Netsuite.           | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/bill-create.ts) |
| `bill-update` | Updates an existing vendor bill in Netsuite. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/bill-update.ts) |

### Credit Notes

| Function name        | Description                          | Type                                           | Source code                                                                                                                     |
| -------------------- | ------------------------------------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `credit-note-create` | Creates a credit note in Netsuite    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/credit-note-create.ts) |
| `credit-note-update` | Updates a credit note in Netsuite    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/credit-note-update.ts) |
| `credit-notes`       | Fetches all credit notes in Netsuite | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/syncs/credit-notes.ts)         |

### Customers

| Function name     | Description                       | Type                                           | Source code                                                                                                                  |
| ----------------- | --------------------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `customer-create` | Creates a customer in Netsuite    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/customer-create.ts) |
| `customer-update` | Updates a customer in Netsuite    | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/customer-update.ts) |
| `customers`       | Fetches all customers in Netsuite | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/syncs/customers.ts)         |

### Fields

| Function name  | Description                    | Type                                         | Source code                                                                                                               |
| -------------- | ------------------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `fetch-fields` | Fetches all fields in Netsuite | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/fetch-fields.ts) |

### Invoices

| Function name    | Description                      | Type                                           | Source code                                                                                                                 |
| ---------------- | -------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `invoice-create` | Creates an invoice in Netsuite   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/invoice-create.ts) |
| `invoice-update` | Updates an invoice in Netsuite   | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/invoice-update.ts) |
| `invoices`       | Fetches all invoices in Netsuite | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/syncs/invoices.ts)         |

### Payments

| Function name    | Description                                              | Type                                           | Source code                                                                                                                 |
| ---------------- | -------------------------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `payment-create` | Creates a payment in Netsuite                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/payment-create.ts) |
| `payment-update` | Updates a payment in Netsuite                            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/payment-update.ts) |
| `payments`       | Fetches all payments received from customers in Netsuite | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/syncs/payments.ts)         |

### Purchase Orders

| Function name           | Description                                     | Type                                         | Source code                                                                                                                        |
| ----------------------- | ----------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `purchase-order-create` | Creates a purchase order in Netsuite            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/purchase-order-create.ts) |
| `purchase-order-update` | Updates an existing purchase order in Netsuite. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/actions/purchase-order-update.ts) |

### Others

| Function name    | Description                            | Type                                           | Source code                                                                                                               |
| ---------------- | -------------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `general-ledger` | Fetches all JournalEntries in Netsuite | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/syncs/general-ledger.ts) |
| `locations`      | Fetches all locations in Netsuite      | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/netsuite-tba/syncs/locations.ts)      |

***
