Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/payables/configure-customer.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ This will allow you to synchronize data with that source, fetching or creating s
| FreeAgent | `fbrh` |
| Oracle NetSuite | `akxx` |
| QuickBooks Online | `qhyg` |
| Sage Intacct | `knfz` |
| Xero | `gbol` |
| Zoho Books | `rwuv` |

As an example, let's create a QuickBooks Online (QBO) connection. In response, the endpoint returns a `dataConnection` object with a `PendingAuth` status and a `linkUrl`. Direct your customer to the `linkUrl` to initiate our [Link auth flow](/auth-flow/overview) and enable them to authorize this connection.

Expand Down
74 changes: 60 additions & 14 deletions docs/payables/sync/suppliers.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,37 +64,83 @@ Include all fields in the request, even if their values haven't changed. If you

:::info Software coverage

This action is currently only supported for FreeAgent, QuickBooks Online, and Xero.
This action is currently only supported for FreeAgent, Oracle NetSuite, QuickBooks Online, Sage Intacct, Xero, and Zoho Books.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Timeless> reported by reviewdog 🐶
Avoid time-based words like 'currently' in product documentation.


:::

### Software-specific behavior

Each accounting software has some limitations when updating suppliers. We've summarized them below.

#### Xero
<Tabs groupId="software">

| Limitation | Description |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
| **Supplier name** | It's not possible to clear the supplier name. Sending a `null` or `""` value for `supplierName`, or `null` value for both `supplierName` and `contactName` keeps the existing supplier name. |
| **Duplicate names** | Supplier names must be unique. Updating a name to match an existing supplier returns a `400` response. |
| **Archived suppliers** | It's not possible to update archived suppliers via the Xero API. To unarchive, do it manually in Xero. | |
<TabItem value="fa" label="FreeAgent">

| Limitation | Description |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Supplier name** | If `supplierName` is `null` in the request, FreeAgent uses the value in `contactName` instead (the value must contain a space). Codat rejects a request where both fields are `null` with a `400` response, because FreeAgent requires a name. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Parens> reported by reviewdog 🐶
Use parentheses judiciously.

| **Country** | It's not possible to clear the supplier's country. Sending a `null` value or excluding the field from the request sets the value to the company's default country. |
| **Default currency** | FreeAgent doesn't support currency at supplier level. Any value sent in the request is ignored, and the response returns the company's base currency. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('is ignored').


</TabItem>

#### QuickBooks Online
<TabItem value="netsuite" label="NetSuite">

| Limitation | Description |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Status** | Always include `status` in the request. Omitting it reactivates an archived supplier. |
| **Contact name** | `contactName` is not supported on update. Any value sent in the request is ignored and the response returns `null`. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Contractions> reported by reviewdog 🐶
Use 'isn't' instead of 'is not'.

Suggested change
| **Contact name** | `contactName` is not supported on update. Any value sent in the request is ignored and the response returns `null`. |
| **Contact name** | `contactName` isn't supported on update. Any value sent in the request is ignored and the response returns `null`. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('is ignored').

| **Duplicate names** | Supplier names must be unique. Updating a name to match an existing supplier returns a `400` response. |
| **Supplier name** | Omitting `supplierName` clears it. Include the existing name if you don't want to change it. |
| **Default currency** | The currency must be enabled in the NetSuite organization, or the update returns a `400` response. Sending a `null` value leaves the existing currency unchanged. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('be enabled').

| **Country** | Address `country` must be a 2-character ISO code. |

</TabItem>

<TabItem value="qbo" label="QuickBooks Online">

| Limitation | Description |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Supplier name** | If `supplierName` is `null` in the request, QBO uses the value in `contactName` instead. If both fields are `null`, QBO returns a `400` response. |
| **Default currency** | It's not possible to update the supplier's currency. Sending a `defaultCurrency` in the request that differs from the current value results in a `400` response. Send a `null` value to leave it unchanged. |
| **Archived suppliers** | All changes to archived suppliers are ignored. Include `"status": "Active"` in the update request to reactivate an archived supplier and apply the changes. |

#### FreeAgent
</TabItem>

<TabItem value="intacct" label="Sage Intacct">

| Limitation | Description |
| -------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Supplier name** | It's not possible to clear the supplier name. Sending a `null` value or excluding the field keeps the existing name. |
| **Default currency** | Sending a `null` value keeps the existing currency, but sending `""` clears the supplier's currency on the platform. |
| **Addresses** | Sage Intacct supports a single address per supplier, and the response returns the first address only. |
| **Contact name** | `contactName` is split on the last space into a first and last name, each limited to 40 characters. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('is split').


</TabItem>

<TabItem value="xero" label="Xero">

| Limitation | Description |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Supplier name** | It's not possible to clear the supplier name. Sending a `null` or `""` value for `supplierName`, or `null` value for both `supplierName` and `contactName` keeps the existing supplier name. |
| **Duplicate names** | Supplier names must be unique. Updating a name to match an existing supplier returns a `400` response. |
| **Archived suppliers** | It's not possible to update archived suppliers via the Xero API. To unarchive, do it manually in Xero. |

</TabItem>

<TabItem value="zoho" label="Zoho Books">

| Limitation | Description |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Supplier name** | It's not possible to clear the supplier name. Sending a `null` value or excluding the field keeps the existing name. |
| **Duplicate names** | Supplier names must be unique, unless the Zoho Books organization allows duplicate vendor names. Updating a name to match an existing supplier returns a `400` response. |
| **Default currency** | The currency must exist in the Zoho Books organization's currency list, or the update returns a `400` response. Sending a `null` value keeps the existing currency. Changing a supplier's currency also changes the currency of bills created for that supplier, because Zoho Books derives bill currency from the supplier. |
| **Addresses** | Billing and delivery addresses are replaced together. Sending only a billing address clears the delivery address. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('are replaced').

| **Archived suppliers** | Archived suppliers can still be updated — the field changes are applied and the supplier remains archived. A rejected update never changes the supplier's status. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('be updated').

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] <Google.EmDash> reported by reviewdog 🐶
Don't put a space before or after a dash.

Suggested change
| **Archived suppliers** | Archived suppliers can still be updatedthe field changes are applied and the supplier remains archived. A rejected update never changes the supplier's status. |
| **Archived suppliers** | Archived suppliers can still be updatedthe field changes are applied and the supplier remains archived. A rejected update never changes the supplier's status. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('are applied').


</TabItem>

| Limitation | Description |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Supplier name** | If `supplierName` is `null` in the request, FreeAgent uses the value in `contactName` instead (the value must contain a space). If both fields are `null`, FreeAgent returns a `400` response. |
| **Country** | It's not possible to clear the supplier's country. Sending a `null` value or excluding the field from the request sets the value to the company's default country. |
| **Default currency** | FreeAgent doesn't support currency at supplier level. Any value sent in the request is ignored, and the response returns the company's base currency. |
</Tabs>

:::tip Recap

Expand Down
110 changes: 102 additions & 8 deletions docs/payables/sync/update-bill.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ We distinguish between invoices where the company _owes_ money and those where t

:::info Software coverage

This action is currently only supported for FreeAgent, QuickBooks Online, and Xero.
This action is currently only supported for FreeAgent, Oracle NetSuite, QuickBooks Online, Sage Intacct, Xero, and Zoho Books.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Timeless> reported by reviewdog 🐶
Avoid time-based words like 'currently' in product documentation.


:::

Expand Down Expand Up @@ -101,6 +101,50 @@ PUT /companies/{companyId}/connections/{dataConnectionId}/payables/bills/{billId

</TabItem>

<TabItem value="netsuite" label="NetSuite example">

```json
{
"description": "Consulting",
"unitAmount": 500,
"quantity": 2,
"accountRef": { "id": "<account-internal-id>" },
"taxRateRef": { "id": "<tax-code-internal-id>" },
"trackingRefs": [
{
"id": "department-<department-internal-id>",
"dataType": "trackingCategories"
},
{
"id": "location-<location-internal-id>",
"dataType": "trackingCategories"
},
{
"id": "<customer-internal-id>",
"dataType": "customers",
"isBillable": true
}
]
}
```

</TabItem>

<TabItem value="intacct" label="Sage Intacct example">

```json
{
"description": "Consulting",
"unitAmount": 500,
"quantity": 2,
"accountRef": { "id": "<account-record-number>" },
"taxRateRef": { "id": "<tax-detail-id>" },
"taxAmount": 200
}
```

</TabItem>

<TabItem value="xero" label="Xero example">

```json
Expand All @@ -116,19 +160,38 @@ PUT /companies/{companyId}/connections/{dataConnectionId}/payables/bills/{billId

</TabItem>

<TabItem value="zoho" label="Zoho Books example">

```json
{
"description": "Consulting",
"unitAmount": 500,
"quantity": 2,
"accountRef": { "id": "<account-id>" },
"taxRateRef": { "id": "<tax-rate-id>" },
"taxAmount": 200,
"trackingRefs": [
{ "id": "<tag-id>-<tag-option-id>", "dataType": "trackingCategories" },
{ "id": "<customer-id>", "dataType": "customers", "isBillable": true }
]
}
```

</TabItem>

</Tabs>

### Software requirements

We have summarized the key differences between the integrations that support updates to bills below:

| Feature | FreeAgent | QBO | Xero |
| ------------------------ | -------------------- | ------------------- | ------------------- |
| **Reference max length** | 255 characters | 21 characters | 255 characters |
| **`TaxRateRef`** | Must be `null` | Required | Required |
| **Tax handling** | Use `taxAmount` only | Use `taxRateRef.id` | Use `taxRateRef.id` |
| **`AccountRef` format** | Nominal code | Numeric string | GUID |
| **Max line items** | 40 | No limit | No limit |
| Feature | FreeAgent | NetSuite | QBO | Sage Intacct | Xero | Zoho Books |
| ------------------------ | -------------------- | --------------------------------- | ------------------- | --------------------------------- | ------------------- | ------------------------------------ |
| **Reference max length** | 255 characters | 45 characters | 21 characters | 100 characters | 255 characters | 50 characters |
| **`TaxRateRef`** | Must be `null` | Required with `taxAmount` | Required | Required with `taxAmount` | Required | Required with a non-zero `taxAmount` |
| **Tax handling** | Use `taxAmount` only | Use `taxRateRef.id` + `taxAmount` | Use `taxRateRef.id` | Use `taxRateRef.id` + `taxAmount` | Use `taxRateRef.id` | Use `taxRateRef.id` + `taxAmount` |
| **`AccountRef` format** | Nominal code | Internal ID | Numeric string | Account record number | GUID | Numeric ID |
| **Max line items** | 40 | No limit | No limit | No limit | No limit | No limit |

### Validation errors

Expand Down Expand Up @@ -165,6 +228,26 @@ You may encounter a validation error when sending a request to update a bill. In

</TabItem>

<TabItem value="netsuite" label="NetSuite">

| Issue | Error message |
| ------------------------------- | ----------------------------------------- |
| Invalid supplier ID | `Supplier Ref` was not found in NetSuite. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Contractions> reported by reviewdog 🐶
Use 'wasn't' instead of 'was not'.

Suggested change
| Invalid supplier ID | `Supplier Ref` was not found in NetSuite. |
| Invalid supplier ID | `Supplier Ref` wasn't found in NetSuite. |

| Invalid account ID | `Account Ref` was not found in NetSuite. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Contractions> reported by reviewdog 🐶
Use 'wasn't' instead of 'was not'.

Suggested change
| Invalid account ID | `Account Ref` was not found in NetSuite. |
| Invalid account ID | `Account Ref` wasn't found in NetSuite. |

| Invalid tax rate ID | `Tax Rate Ref` was not found in NetSuite. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Contractions> reported by reviewdog 🐶
Use 'wasn't' instead of 'was not'.

Suggested change
| Invalid tax rate ID | `Tax Rate Ref` was not found in NetSuite. |
| Invalid tax rate ID | `Tax Rate Ref` wasn't found in NetSuite. |

| Changed or unsupported currency | `Currency` is not supported for supplier. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Contractions> reported by reviewdog 🐶
Use 'isn't' instead of 'is not'.

Suggested change
| Changed or unsupported currency | `Currency` is not supported for supplier. |
| Changed or unsupported currency | `Currency` isn't supported for supplier. |


</TabItem>

<TabItem value="intacct" label="Sage Intacct">

| Issue | Error message |
| ------------------------- | ----------------------------------------------------------------------- |
| Bill fully or partly paid | This bill has been paid or partially paid and can no longer be updated. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('been paid').

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('be updated').

| Invalid supplier ID | The Supplier with Id `<id>` was not found. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Contractions> reported by reviewdog 🐶
Use 'wasn't' instead of 'was not'.

Suggested change
| Invalid supplier ID | The Supplier with Id `<id>` was not found. |
| Invalid supplier ID | The Supplier with Id `<id>` wasn't found. |


</TabItem>

<TabItem value="qbo" label="QuickBooks Online">

| Issue | Error message |
Expand All @@ -184,6 +267,17 @@ You may encounter a validation error when sending a request to update a bill. In

</TabItem>

<TabItem value="zoho" label="Zoho Books">

| Issue | Error message |
| -------------------------- | ------------------------------------------------- |
| Duplicate reference | Reference has already been used for this supplier |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Passive> reported by reviewdog 🐶
In general, use active voice instead of passive voice ('been used').

| Invalid supplier ID | `SupplierRef Id` was not found in ZohoBooks. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Contractions> reported by reviewdog 🐶
Use 'wasn't' instead of 'was not'.

Suggested change
| Invalid supplier ID | `SupplierRef Id` was not found in ZohoBooks. |
| Invalid supplier ID | `SupplierRef Id` wasn't found in ZohoBooks. |

| Negative bill total | The total amount due cannot be negative. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] <Google.Contractions> reported by reviewdog 🐶
Use 'can't' instead of 'cannot'.

Suggested change
| Negative bill total | The total amount due cannot be negative. |
| Negative bill total | The total amount due can't be negative. |

| Due date before issue date | `dueDate` must be after `issueDate`. |

</TabItem>

</Tabs>

---
Expand Down
Loading