> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/patchworks-connectors/sage-200-prebuilt-connector.md).

# Sage 200 (prebuilt connector)

## Description

**Sage 200** is a set of accountancy and management products developed by Sage Group aimed at medium-sized enterprises.

## API documentation

API documentation for **Sage 200** (used to build this connector) can be found via the link below:

{% embed url="<https://developer.sage.com/200/reference/>" %}

## Authentication

When adding connector instances for **Sage 200**, the following authentication methods are supported:

* [OAuth 2 (authorisation code)](#oauth-2-authorisation-code)

### OAuth 2 (authorisation code)

When a user chooses to [add a connector instance](/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance.md) using **OAuth 2 (authorisation code)** authentication, the credentials below are prompted:

<table><thead><tr><th>Credential</th><th data-type="checkbox">Required?</th><th>Notes</th></tr></thead><tbody><tr><td><code>State length</code></td><td>true</td><td>This is a numeric value which determines the length of a random string generated (behind the scenes) during the OAuth process, for verification purposes. Our suggested setting is <code>10</code>.</td></tr><tr><td><code>Scope</code></td><td>true</td><td>Set to <code>readonly</code> or <code>full_access</code>. For more information see <a href="https://developer.sage.com/accounting/guides/authenticating/authentication/">this Sage guide</a>.</td></tr><tr><td><code>Client ID</code> &#x26; <code>Client secret</code></td><td>true</td><td>These credentials allow Patchworks to authenticate and interact with Sage 200. Credentials are provided by Sage, upon request. For more information see <a href="https://developer.sage.com/200/api/get-started/">this Sage guide</a>.</td></tr><tr><td><code>Subscription key</code></td><td>true</td><td>Subscription keys are required to allow API access to data in Sage products. These keys are generated in the Sage Developer Portal, by subscribing to a product - in this case you would subscribe to Sage 200. For more information see <a href="https://developer.sage.co">this Sage guide</a>.</td></tr><tr><td><code>X-Company</code>&#x26; <code>X-Site</code></td><td>true</td><td>These are unique identifiers for your company and specific site(s) within Sage 200. Including these IDs ensures that requests are routed to the right company and site. To retrieve this information from Sage, please refer <a href="https://developer-community.sage.com/topic/693-x-site-x-company-headers-sage-200-api/">this Sage community topic</a>.</td></tr><tr><td><code>OAuth Authorised Code</code></td><td>false</td><td>This advanced setting is not required for general use.</td></tr></tbody></table>
