> ## 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.

# CS-Cart

> Connect Alumio to CS-Cart.

## Extra information

System documentation: [CS-Cart API Reference](https://docs.cs-cart.com/latest/developer_guide/api/index.html)

## Connector package documentation

### Table of Contents

* **1.** Setting up HTTP Client CS-Cart
  * **1.1** Steps
* **2.** Subscribing to entities from CS-Cart
  * **2.1** Steps
  * **2.2** General concept
* **3.** Publishing entity to CS-Cart
  * **3.1** Steps
  * **3.2** General concept

### 1. Setting up HTTP Client CS-Cart

**1.1 Steps**

1. In the Alumio Dashboard, go to Clients -> HTTP Clients. Create a new HTTP Client and select "CS-Cart HTTP Client" as the HTTP Client.
2. Fill in the Base URI, Email, and API Key.
   (For more information, see [CS-Cart Authentication Reference](https://docs.cs-cart.com/latest/developer_guide/api/index.html#authentication))
3. You can optionally enable logging of request to get the log of the authentication.
4. Save the HTTP Client for use.

### 2. Subscribing to Entities from CS-Cart

**2.1 Steps**

1. Go to Connections -> Incoming and create a new incoming configuration and select "CS-Cart Subscriber" as the subscriber.
2. Select the Object to subscribe to from CS-Cart.
3. Fill in the Object Id (optional).
4. Select Nested Object (optional).
5. Fill in the Nested Object Id (optional).
6. Add any Query parameters needed to subscribe.
7. You can optionally add a transformer to transform the request parameters into something you will request from CS-Cart.
8. You can also optionally enable pagination to allow Alumio fetches paginated entities.
9. Select the CS-Cart HTTP Client to use.

**2.2 General Concept**

We follow CS-Cart documentation on building this connector, so you can easily use the connector based on [CS-Cart API Reference](https://docs.cs-cart.com/latest/developer_guide/api/index.html).

**Object**

The object you want to subscribe to CS-Cart. Please refer to the object from [CS-Cart API Reference](https://docs.cs-cart.com/latest/developer_guide/api/index.html) page.

**Query Parameters**

These are the query parameters you can provide based on the [CS-Cart API Reference](https://docs.cs-cart.com/latest/developer_guide/api/index.html) page..

Please look at the example below on how to fill object when we try to get a particular ["product variation"](https://docs.cs-cart.com/latest/developer_guide/api/entities/product_variations.html) of a particular ["product variation group"](https://docs.cs-cart.com/latest/developer_guide/api/entities/product_variation_groups.html).

<img src="https://mintcdn.com/alumio/rvdAjy4YRzDDREsn/images/connectors/cs-cart-01.png?fit=max&auto=format&n=rvdAjy4YRzDDREsn&q=85&s=d716887919443b26b32f61dfca62abe1" alt="CS-Cart connector screenshot 1" width="589" height="500" data-path="images/connectors/cs-cart-01.png" />

<img src="https://mintcdn.com/alumio/rvdAjy4YRzDDREsn/images/connectors/cs-cart-02.png?fit=max&auto=format&n=rvdAjy4YRzDDREsn&q=85&s=114753c9bbd13c037df1550fc2d87cca" alt="CS-Cart connector screenshot 2" width="690" height="40" data-path="images/connectors/cs-cart-02.png" />

Based on the Documentation, we pick the   ["Product Variation Groups"](https://docs.cs-cart.com/latest/developer_guide/api/entities/product_variation_groups.html) as the Object, then fill 1 in the "Object Id". We continue by  pick ["Product Variations"](https://docs.cs-cart.com/latest/developer_guide/api/entities/product_variations.html) as the Nested Object and filling 1 in the "Nested Object Id".

Alumio will then make a request to CS-Cart with the URL /product\_variations\_groups/1/product\_variations/1 and get this specific product variation.

* Query Parameters is defined set of parameters attached to the end of a url.\
  Example: [www.url.com?type=true\&start=0](http://www.url.com?type=true\&start=0)

**HTTP Client**

The HTTP Client configuration you will use to access CS-Cart.

### 3. Publishing Entity to CS-Cart

**3.1 Steps**

1. Go to Connections -> Outgoing, create a new outgoing configuration and select "CS-Cart Publisher" as the publisher.
2. Select the Method that you want the publisher to perform with the data.
3. Select the CS-Cart Object you want the data to be published to.
4. Fill in the Object Id (optional).
5. Select Nested Object (optional).
6. Fill in the Nested Object Id (optional).
7. You can optionally add any query data to the request on the key query.
8. You can optionally add any payload data to the request on the key payload.
9. Select the HTTP Client to use.

**3.2 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.

**Object**

We support publishing to most CS-Cart endpoints.
Please refer to [CS-Cart API Reference](https://docs.cs-cart.com/latest/developer_guide/api/index.html) page.

For example, we want to create a product. Please select Post as the method and ["Products"](https://docs.cs-cart.com/latest/developer_guide/api/entities/products.html) as the object of the publisher.
We don't have to fill in the "Object Id" and "Nested Object Id", we also don't need to select anything from the "Nested Object."

<img src="https://mintcdn.com/alumio/rvdAjy4YRzDDREsn/images/connectors/cs-cart-03.png?fit=max&auto=format&n=rvdAjy4YRzDDREsn&q=85&s=27f4611963602fea906cec54f6248875" alt="CS-Cart connector screenshot 3" width="690" height="423" data-path="images/connectors/cs-cart-03.png" />

<img src="https://mintcdn.com/alumio/rvdAjy4YRzDDREsn/images/connectors/cs-cart-04.png?fit=max&auto=format&n=rvdAjy4YRzDDREsn&q=85&s=f58a35722954aee4bbe19e5a7208face" alt="CS-Cart connector screenshot 4" width="690" height="192" data-path="images/connectors/cs-cart-04.png" />

Based on the documentation, we need to add a Body Request. So we put the body inside the payload key in the Data.

<img src="https://mintcdn.com/alumio/rvdAjy4YRzDDREsn/images/connectors/cs-cart-05.png?fit=max&auto=format&n=rvdAjy4YRzDDREsn&q=85&s=ecf156e3c2818ec4b6baee8042cc16c4" alt="CS-Cart connector screenshot 5" width="298" height="111" data-path="images/connectors/cs-cart-05.png" />

Alumio will send an API request to CS-Cart with URL /products
CS-Cart will then return the newly created "product\_id"

<img src="https://mintcdn.com/alumio/rvdAjy4YRzDDREsn/images/connectors/cs-cart-06.png?fit=max&auto=format&n=rvdAjy4YRzDDREsn&q=85&s=d40439811b645891dc14e4950ac19946" alt="CS-Cart connector screenshot 6" width="149" height="50" data-path="images/connectors/cs-cart-06.png" />

* Query is defined set of parameters attached to the end of a url.\
  Example: [www.url.com?type=true\&start=0](http://www.url.com?type=true\&start=0)
* Payload is the data contained within a request.

**HTTP Client**

The HTTP Client configuration you will use to access CS-Cart.
