# Connect your store using API, Getting started

Doc for more details [Here](https://drive.google.com/file/d/1q22kCgkeLftI0RtGtA8dU5P5BJFPOa1g/view?usp=sharing)

For speeding up integration you can use[ postman collection ](https://convertedin-assets.s3.eu-west-1.amazonaws.com/ConvertedIn-API-Integration.postman_collection.json)\
\
\
You should login to [app.converted.in](http://app.converted.in/), choose `api` option from data sources&#x20;

You'll be prompted to enter your base url for the api , for example if your API baseUrl was `https://cake-store.com/`, \
your Store info api should be `https://cake-store.com/convertedin/storeinfo`

We expect you to create an API that complies with the following documentation &#x20;

### Authentication&#x20;

\
Use your token provided inside converted.in after on boarding process to authenticate the request using form-data body

![](https://1119750375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7X1MfKrY7KCRp85qrV%2Fuploads%2FVMypww95MgEo8q5UXsMz%2FScreenshot%20from%202022-03-29%2015-25-28.png?alt=media\&token=41d2fcec-90b0-4a9f-bdda-baffbbd86c5b)

## **Notice**:&#x20;

All endpoints should follow the following standard pagination form Except for the store info API

```
{
    "current_page": 1,  // current page
    "data": [ ],
    "from": 1, // start for current page
    "to": 100,  // end for current page
    "last_page": 23, // last available page 
    "per_page": 100, // limit per page
    "total": 2220 // total number of entities
}
```

## Store Info

<mark style="color:green;">`POST`</mark> `YOUR_BASEURL/convertedin/storeinfo`

#### Request Body

| Name                                    | Type   | Description                                   |
| --------------------------------------- | ------ | --------------------------------------------- |
| token<mark style="color:red;">\*</mark> | string | Fixed token provided by Convertedin platform. |

{% tabs %}
{% tab title="200 Successful response." %}

```
{
    "code": 200,
    "data": {
        "name" : "store name",
        "currency" : "USD",
        "time_zone": "",
        "email" : "user@example.com",
        "description": "A great store selling stuff",
        "country": "US"
    }
}
```

{% endtab %}
{% endtabs %}

### Response

```json
{
    "code": 200,
    "data": {
        "name": "store Name",
        "currency": "EGP",
        "time_zone": "GMT+2",
        "email": "info@cake-store.com",
        "description": "buy all your cake",
        "country": "eg",
        "country_code": "EG"
    }
}
```

| key         | description                               |
| ----------- | ----------------------------------------- |
| name        | Store name or title                       |
| currency    | currency in ISO format (USD, EUR, etc...) |
| time\_zone  | store default timezone in your format     |
| email       | Admin or store contact email              |
| description | store brief or headline                   |
| country     | operating country in ISO code (US, GB)    |
