## Web services license

To register a new application and configure your API integration as described in this topic, you must have a Sage Intacct Web Services license. This license consists of a sender ID and sender password and is available exclusively to Sage Intacct customers and partners. If you do not have a web services license, contact your Sage Intacct account manager or partner representative to obtain one.

## About Try it

The **Try it** feature allows you to test API requests directly within a non-production environment. It's useful for quickly exploring API capabilities and understanding request and response structures.

## Authorization steps

Before you begin, ensure you complete the steps to [Register a new application](/intacct/docs/1/sage-intacct-rest-api/get-started/quick-start#register-a-new-application) and obtain your client ID and client secret. When you [Configure your API integration settings](/intacct/docs/1/sage-intacct-rest-api/get-started/quick-start#configure-your-api-integration-settings), select **Enable Try it** for your non-production application.

1. Go to [API Reference](/intacct/apis/intacct/1/intacct-openapi) and select an endpoint.
   In the upper right corner of the page, select **Try it**.

2. Under **Application**, select the application to use for testing the API and then select **Authorize**.

   If you did not previously enable **Try it** for a non-production application, you can select **Enable** in the dropdown. Then, in the application properties page, select **Enable Try it**.

3. After you select **Authorize**, sign in using your company credentials for the non-production environment.

## Use **Try it** to test API requests

After you authenticate into a non-production environment, you can use **Try it** to send test API requests directly from the API reference pages. You do not need to re-authenticate when testing another endpoint within the same application.

> **Note:** Examples in **Try it** show sample request and response structures. Responses depend on the data in your non-production environment. For example, a **GET** request for contacts returns only the contacts available in that environment. If none exist, the response is an empty array.

### GET requests

To return a list of resources using **GET**, select the endpoint that you want to test. Then, from the right side of the page, select **Send request**. Your response might look something like this:

```json
{
    "ia::result": [
        {
            "key": "116",
            "id": "SW-TEST",
            "href": "/objects/company-config/class/116"
        },
        {
            "key": "32",
            "id": "A26",
            "href": "/objects/company-config/class/32"
        },
        {
            "key": "18",
            "id": "A12",
            "href": "/objects/company-config/class/18"
        },
        {
            "key": "25",
            "id": "A19",
            "href": "/objects/company-config/class/25"
        }
    ],
    "ia::meta": {
        "totalCount": 4,
        "start": 1,
        "pageSize": 100,
        "next": null,
        "previous": null
    }
}
```

To retrieve a single resource using **GET**, select the endpoint that you want to test. Then, from the right side of the page, in **Path parameters** specify the key of the resource that you want to retrieve. For example, if you want to retrieve the class with a key of `18`, add that to the parameter and send your request. Your response might look something like this:

```json
{
    "ia::result": {
        "key": "18",
        "id": "A12",
        "href": "/objects/company-config/class/18"
    },
    "ia::meta": {
        "totalCount": 1,
        "totalSuccess": 1,
        "totalError": 0
    }
}
```

### POST requests

To create a new resource using **POST**, select the endpoint that you want to test. Then, from the right side of the page, select **Use examples** and edit them to structure your own request. You also have the option of creating a custom request body. For example, your **POST** request might look like this:

```json
{
  "id": "A56",
  "name": "Hardware",
  "description": "For IT use only.",
  "status": "active"
}
```

The response would then look like this:

```json
{
    "ia::result": {
        "key": "122",
        "id": "A56",
        "href": "/objects/company-config/class/122"
    },
    "ia::meta": {
        "totalCount": 1,
        "totalSuccess": 1,
        "totalError": 0
    }
}
```

### PATCH requests

To update a resource using **PATCH**, select the endpoint that you want to test. Then, from the right side of the page, in **Path parameters** specify the key of the resource that you want to update. For example, if you want to update the class with a key of `122`, add that to the parameter. Then, add your custom request, which might look like this:

```json
{
  "name": "Laptops"
}
```

The response would then look like this:

```json
{
    "ia::result": {
        "key": "122",
        "id": "A56",
        "href": "/objects/company-config/class/122"
    },
    "ia::meta": {
        "totalCount": 1,
        "totalSuccess": 1,
        "totalError": 0
    }
}
```

### DELETE requests

To delete a resource using **DELETE**, select the endpoint. Then, from the right side of the page, specify the key of the resource that you want to delete. For example, if you want to delete the class with a key of `122`, add that to the parameter and send your request.