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

# Brightpearl

> Connect Alumio to Brightpearl.

## Extra information

System documentation: [Brightpearl API Reference](https://api-docs.brightpearl.com/)

## Connector package documentation

**Brightpearl**

# Setting up HTTP Client Brightpearl

## Steps

1. In Alumio Dashboard, go to Clients > HTTPS Client. Create a new HTTP Client and select Brightpearl HTTP Client as the prototype of the HTTP Client.
2. Fill in the Base URI, Application Reference and Token.
3. Save the Client for use later.

# Subscribing to Entities from Brightpearl

## Steps

1. Go to Connections -> Incoming and create a new incoming configuration and select Brightpearl Subscriber as the subscriber.
2. Select the entity you want to subscribe from Brightpearl.
3. Add any request parameters needed to subscribe to the entity (optional).
4. You can optionally add a transformer to transform the request parameters into something you need.
5. Select the Brightpearl HTTP Client to use.

## General Concept

We follow Brightpearl documentation on building this connector so you can easily use the connector based on Brightpearl API Reference.

**Entity**
It’s the entity you want to subscribe from Brightpearl. Please refer to the entities in Management APIs from Brightpearl API Reference page.

**Request Parameters**
These are the parameters you can provide to get the needed entity based on Brightpearl API Reference. Please look at the example below on how to fill the Request Parameters field when subscribing Product entity

<img src="https://mintcdn.com/alumio/Y4FUbluEreYeFn73/images/connectors/brightpearl-01.png?fit=max&auto=format&n=Y4FUbluEreYeFn73&q=85&s=6dc4ee6d3c286dd7d64c2ef70d368469" alt="Brightpearl connector screenshot 1" width="690" height="370" data-path="images/connectors/brightpearl-01.png" />

<img src="https://mintcdn.com/alumio/Y4FUbluEreYeFn73/images/connectors/brightpearl-02.png?fit=max&auto=format&n=Y4FUbluEreYeFn73&q=85&s=52b0008039dd8b3f8c70ca4b7919e943" alt="Brightpearl connector screenshot 2" width="640" height="243" data-path="images/connectors/brightpearl-02.png" />

That’s why we need to define the **ID-SET** property inside the path property in the Request Parameters field. The properties inside query parameters will be parsed as query parameters. Here is the final URL that will be called when using such Request Parameters field on Product.

/product-service/product/126274

**Input Transformer**
Any transformer’s set here will be executed after the Request Parameters are loaded. So, you basically can add any transformer to provide and transform the request parameters into anything you need either as path parameters and/or as query parameters of an entity.

**HTTP Client**
It’s the HTTP Client configuration or prototype you will use to access Brightpearl.

# Publishing Entity to Brightpearl

## Steps

1. Go to Connections -> Outgoing, create a new outgoing configuration, and select Brightpearl Publisher as the publisher.
2. Select the action that you want the publisher to do with the data.
3. Select the Brightpearl entity you want the data to be published.
4. You can optionally add any query parameters to the request.
5. You can also optionally add any transformers to transform the data into anything you need before submitting it to Brightpearl.
6. Select the HTTP Client to use.
   <img src="https://mintcdn.com/alumio/Y4FUbluEreYeFn73/images/connectors/brightpearl-03.png?fit=max&auto=format&n=Y4FUbluEreYeFn73&q=85&s=70f2fe418c6252466eb511cdc009ab18" alt="Brightpearl connector screenshot 3" width="690" height="270" data-path="images/connectors/brightpearl-03.png" />

## General Concept

Like the subscriber, the publisher has similar methods on how to use it. The difference is the payload that will be submitted by the publisher originating from the data (from routes, from transformers in outgoing configuration), though you can also add or modify payload using the Request Transformer.

**Action**

Currently, we support Post (HTTP POST method), Put (HTTP PUT method), Patch (HTTP PATCH method), and Delete (HTTP DELETE method).

**Entity**

We support publishing to most Brightpearl endpoints. Please refer to the entities in Management APIs from the Brightpearl API Reference page. Based on the documentation, some endpoints may need one or more path parameters.

For endpoints that require an object as the request payload, please look at the example below. For example, we want to Create Product. Please select “Post” as the action and “Product” as the entity of the publisher.

<img src="https://mintcdn.com/alumio/Y4FUbluEreYeFn73/images/connectors/brightpearl-04.png?fit=max&auto=format&n=Y4FUbluEreYeFn73&q=85&s=e3200c768cf8435a2c0bcf06d986c4c4" alt="Brightpearl connector screenshot 4" width="690" height="272" data-path="images/connectors/brightpearl-04.png" />

<img src="https://mintcdn.com/alumio/Y4FUbluEreYeFn73/images/connectors/brightpearl-05.png?fit=max&auto=format&n=Y4FUbluEreYeFn73&q=85&s=2a565aaeb62f61226a5cb931a2c27b0b" alt="Brightpearl connector screenshot 5" width="690" height="260" data-path="images/connectors/brightpearl-05.png" />

You can put the payload you want to send to Brightpearl into the payload property in the data.

Alumio will send an API request to Brightpearl with URL /product-service/product

**HTTP Client**

It’s the HTTP Client configuration or prototype you will use to access Brightpearl.
