# 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&#x20;

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](https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/working-with-instances/adding-an-instance) 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/connectors-and-instances/patchworks-connectors/sage-200-prebuilt-connector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
