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

# How to Activate a Vendor in Pleo

> For Vendor Creation, how to report the AS-assigned identifiers back to Pleo to activate a Vendor created from a DRAFT.

This how-to covers activating the Pleo Vendor once its corresponding record has been created in the Accounting System.

Run this after [How to Create a Vendor in the AS](/docs/current/how-tos/accounting-integrations/vendors/how-to-create-vendor-in-as), which covers creating the vendor record in the Accounting System.

## Prerequisites

Before you begin:

* You have completed [How to Create a Vendor in the AS](/docs/current/how-tos/accounting-integrations/vendors/how-to-create-vendor-in-as) and have the AS-assigned `externalId` (and `code`, if available)
* Your integration is authenticated using one of the [supported authentication methods](/docs/current/integration-design/auth/integration-design-auth-overview#authentication-policy-overview)
* Your integration can call Pleo's Vendors API endpoints

## Scenario

This how-to continues from the [How to Create a Vendor in the AS](/docs/current/how-tos/accounting-integrations/vendors/how-to-create-vendor-in-as) scenario: the "Greenfield Logistics" vendor was created in the AS with `externalId: AS-VENDOR-7841` and `code: 2041`.

## Steps

### 1. Activate the Vendor in Pleo

**API Endpoint**: POST [`/v1/vendors/{id}:activate`](/reference/external-vendors/activate-a-vendor)

**Example parameters**: id: `c27ed4d6-3d3d-458e-8f3f-735fdf32a3bc`

Report the identifiers assigned by the AS back to Pleo. This transitions the Vendor's `state` from `DRAFT` to `ACTIVE`.

**Example Pseudo:**

```pseudo theme={null}
activateRequest.externalId = asVendor.externalId
activateRequest.code       = asVendor.code
POST activateRequest to Pleo /v1/vendors/{draftVendor.id}:activate
```

#### Example Request

**OAuth 2.0**

```bash theme={null}
curl -X POST "https://external.staging.pleo.io/v1/vendors/c27ed4d6-3d3d-458e-8f3f-735fdf32a3bc:activate" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json;charset=UTF-8" \
  -d '{
        "externalId": "AS-VENDOR-7841",
        "code": "2041"
      }'
```

**API Key**

```bash theme={null}
curl --request POST \
  -u "pls_1ab2cd3e4f5g6h7a89b012c34de56f78_gabc90:" \
  -H "Accept: application/json;charset=UTF-8" \
  -H "Content-Type: application/json;charset=UTF-8" \
  "https://external.staging.pleo.io/v1/vendors/c27ed4d6-3d3d-458e-8f3f-735fdf32a3bc:activate" \
  -d '{
        "externalId": "AS-VENDOR-7841",
        "code": "2041"
      }' \
| jq
```

#### Example Response

This endpoint returns `204 No Content` on success. Fetching the Vendor afterwards confirms the new state:

```json theme={null}
{
  "data": {
    "id": "c27ed4d6-3d3d-458e-8f3f-735fdf32a3bc",
    "companyId": "12abc3d4-e567-890e-1234-abc56e78fabc",
    "name": "Greenfield Logistics",
    "country": "GB",
    "registrationNumber": "",
    "taxRegistrationNumber": "GB987654321",
    "externalId": "AS-VENDOR-7841",
    "code": "2041",
    "state": "ACTIVE",
    "defaultCurrency": "GBP",
    "createdAt": "2026-07-08T10:05:43.530450712Z",
    "updatedAt": "2026-07-08T10:14:02.221310Z"
  }
}
```

Note

`code` is optional on activation. If the AS has no separate account code beyond its own identifier, omit `code` or set it to the same value as `externalId`.

#### What it looks like in Pleo Web App

1. Select **Accounting** from the main left-hand navigation.
2. Select **Export** from the sub-menu.
3. Click on the same row to reopen the details panel for the expense used in [How to Create Vendors in Pleo](/docs/current/how-tos/accounting-integrations/vendors/how-to-create-vendors-in-pleo).

Once activation is complete, "Greenfield Logistics" appears on the Vendor field as a normal linked Vendor, with no draft notice:

![Vendor field on an expense showing Greenfield Logistics after activation, with no draft notice](https://mintcdn.com/pleo-61d4d38b/OQXz7YYPcGlsTpec/images/current/accounting-integrations/imports/vendor-sync/ui-vendors-active-linked-greenfield-logistics.png?fit=max\&auto=format\&n=OQXz7YYPcGlsTpec\&q=85\&s=c904d65a782c20574dfdf1b65f613677)

Warning

If this activate call fails, times out, or its outcome is unknown, don't repeat [How to Create a Vendor in the AS](/docs/current/how-tos/accounting-integrations/vendors/how-to-create-vendor-in-as). That vendor record already exists in the AS from that step, so creating it again would produce a duplicate.

Instead, persist the AS-assigned `externalId` and `code` as soon as that step succeeds. On retry, skip straight to this activate call using those stored identifiers.

See [If Activation Fails](/docs/current/integration-design/exports/vendors/integration-design-vendor-creation-create-and-activate#if-activation-fails) for the full retry model.

Remember

If you release your per-company concurrency lock too early, a [Vendor Sync](/docs/current/how-tos/accounting-integrations/imports/vendors/how-to-create-vendors) run could pick up this Vendor mid-flight and archive or duplicate it.

Only release it once this call succeeds, or once you abandon this Vendor under your own retry-abandonment policy.

This is the same lock your integration took before [How to Create a Vendor in the AS](/docs/current/how-tos/accounting-integrations/vendors/how-to-create-vendor-in-as). This activate call is where you release it.

***

## Result

The table below recaps the outcome for this Vendor.

| Vendor | Pleo State Before | Action | Final Pleo State |
| - | - | - | - |
| Greenfield Logistics | DRAFT | Activated | ACTIVE |

The Vendor is now activated and eligible to be matched by future [Vendor Sync](/docs/current/how-tos/accounting-integrations/imports/vendors/how-to-fetch-and-match-vendors) runs using its new `externalId`. It becomes available for bookkeepers to tag on expenses and invoices, provided Vendor Tagging is enabled for the company. See [How to Enable Vendor-Based Bookkeeping](/docs/current/how-tos/accounting-integrations/how-to-enable-vendor-based-bookkeeping).

***

## What Comes Next?

[Vendor Creation Workflow Guide →](/docs/current/guides/vendor-creation-workflow-guide#what-comes-next)

***

this how-to is part of:

[Vendor Creation Workflow Guide](/docs/current/guides/vendor-creation-workflow-guide)

***

## Related Reading

* [How to Create a Vendor in the AS](/docs/current/how-tos/accounting-integrations/vendors/how-to-create-vendor-in-as)
* [Create and Activate Vendors Integration Design](/docs/current/integration-design/exports/vendors/integration-design-vendor-creation-create-and-activate)
* [Platform Capabilities: Vendor Creation](/docs/current/platform/exports/vendors/vendor-creation-overview)

***
