# What is Simple Store?

[SimpleStore](https://simplestore.io/) is a hosted headless eCommerce platform that provides all the required back-end functionality to build a sophisticated and robust eCommerce experience.

## Support

If you have any questions or require help using the platform, send us an email to <support@simplestore.io>


# Portal

The Portal provides a user interface to support the management of your entire store.

Access the portal at: <https://portal.simplestore.io/login>

![](/files/-M3pKRyatMfYhSn_z9vg)


# Environments

### Live Mode and Test Mode


# Configuring Your Store


# Creating Your First Product

### Catalog

Assess the **Catalog** screen in the console via the console navigation bar.

Click **Add New**

<div align="left"><img src="/files/-M3VZTu4BM-eXPTGbiFE" alt=""></div>

### Add New Product

Enter a Product Title and Description

<div align="left"><img src="/files/-M3VZwQ1UVhXlAnv1fy_" alt=""></div>

Click **Submit**

### &#x20;Details

Specify a Sell and Retail Price (see [Pricing](/concepts/pricing))

Additional product **Details** can be specified including:

* Categories (see [Categories](/concepts/categories))
* Collections (see [Collections](/concepts/collections))

<div align="left"><img src="/files/-M3V_DJNRtEGhcvjzSca" alt=""></div>

### Inventory

**Optional:** in the Inventory Tab specify a Sku (stock-keeping unit) and available quantity and minimum active quantity. For more detail see [Inventory](/concepts/inventory).

<div align="left"><img src="/files/-M3V_V08hHf_tD1YEns9" alt=""></div>

### &#x20;Rewards

*Where rewards capability is enabled*

**Optional:** In the Rewards Tab specify if the Product can be redeemed for Points or Currency.

<div align="left"><img src="/files/-M3V_l_r7ptjzHG_3KMW" alt=""></div>

### Attributes

**Optional:** Additional product attributes can be specified as Key/Value pairs in the **Attributes** Tab.

<div align="left"><img src="/files/-M3V_vuOVkKm6MZdXN7g" alt=""></div>

Click **Save**


# QuickBuy

Quick Buy is a plug and play solution enabling your business to become an eCommerce business - quick and simple.

{% hint style="warning" %}
**Pre-requisites for QuickBuy operations**

* Product must be active
* Price must be specified (e.g. >= 0)
* Currency code specified for Store.
* Stripe needs to be configured for Store.
  {% endhint %}

To enable quick but navigate to the Product Details screen and click "Get Quick Buy Link"

![](/files/-M43WVoUL8lovy2bR3Ok)

This will generate a quick buy url:

![](/files/-M4JJXaFVAUBs7CihdqV)

Which you can post anywhere to sell your product:

![](/files/-M4JOtslhq8rOOKFUGgl)


# Assets

Simple store supports the upload, storage and management of assess (files) that can be associated with Products and Categories.  Examples of assets include: jpg, gif, png, pdf.

### Portal View

#### Accessing Assets&#x20;

Assess the Assets screen in the console via the console navigation bar.

<div align="left"><img src="/files/-M5oIIADuzDwgDfVgeyD" alt=""></div>

#### Add New Asset

Click Upload File to upload and create the new asset.

![](/files/-M5oIhZ8VDsS8ER2q-Mf)

Specify a Title, Description and Access Permission.

Access Permission allow an assets to be defined as Public or Private

Drag and Drop the asset to upload.

<div align="left"><img src="/files/-M5oJES1dlCvg9ox5rNp" alt=""></div>

Click **Submit**.

#### Edit Assets

Assets can be accessed by clicking on the main asset screen:

<div align="left"><img src="/files/-M5oK1RqClsALzCWr8oC" alt=""></div>

File Details can be edited.

<div align="left"><img src="/files/-M5oKBle4RnwcB2OLZYq" alt=""></div>

Click **Save** to commit your modifications.

Assets can be deleted by clicking the **Delete** button.

### Asset Properties

#### Folders

Assets can be stored in a hierarchy of folders.

{% tabs %}
{% tab title="Attributes" %}

| Element      | Description                                                                                                 |
| ------------ | ----------------------------------------------------------------------------------------------------------- |
| folderId     | Unique Identifer for the Folder                                                                             |
| version      | An incremental version number tracking changes to the folder configuration                                  |
| name         | Name                                                                                                        |
| parentId     | A parent folder identifier to support the creation of a hierarchical/tree based structure of related folder |
| attributes   | Attributes are a list of Key/Value to support customisation of a folder                                     |
| {% endtab %} |                                                                                                             |

{% tab title="Sample Object" %}

```
{
  "folderId": "string",
  "version": "string",
  "name": "string",
  "parentId": "string",
  "attributes": {}
}
```

{% endtab %}
{% endtabs %}

#### Files

Files represent the range of assets that can be stored and managed.

{% tabs %}
{% tab title="Attributes" %}

| Element          | Description                                                                |
| ---------------- | -------------------------------------------------------------------------- |
| fileId           | Unique Identifer for the File                                              |
| version          | An incremental version number tracking changes to the folder configuration |
| title            | Title of Image                                                             |
| description      | Description                                                                |
| contentType      | Content-Type of file                                                       |
| fileName         | File Name                                                                  |
| length           | File Length                                                                |
| width            | Width of File (images)                                                     |
| height           | Height of File (images)                                                    |
| accessUrl        | Access Url                                                                 |
| accessPermission | Access Permission                                                          |
| attributes       | Attributes are a list of Key/Value to support customisation of a folder    |
| isActive         | Is Active                                                                  |
| folderId         | Reference to Containing Folder Id                                          |
| edgeUrl          | Edge Url                                                                   |
| {% endtab %}     |                                                                            |

{% tab title="Sample Object" %}

```
{
  "fileId": "string",
  "version": "string",
  "title": "string",
  "description": "string",
  "contentType": "string",
  "fileName": "string",
  "length": 0,
  "width": 0,
  "height": 0,
  "accessUrl": "string",
  "accessPermission": 0,
  "attributes": {},
  "isActive": true,
  "folderId": "string",
  "edgeUrl": "string"
}
```

{% endtab %}
{% endtabs %}


# Image Resizing


# Cart

Simple Store supports a full ecommerce shopping cart object.

### Basic Cart Process

<div align="left"><img src="/files/-M4s87lrP2rIFe-Bhm4d" alt=""></div>

{% tabs %}
{% tab title="Attributes" %}

| Element                | Desciption                                                          |
| ---------------------- | ------------------------------------------------------------------- |
| cartId                 | Unique Identifier for the Cart                                      |
| items\[]               | An array of one or many items in the Cart                           |
| items\[].productId     | Unique Identifer for the Product (see [Product](/concepts/product)) |
| items\[].slug          | Product Slug                                                        |
| items\[].title         | Product Title                                                       |
| items\[].description   | Product Description                                                 |
| items\[].quanity       | Quantity of Product                                                 |
| items\[].paymentMethod | Payment Method                                                      |
| items\[].totalCurrency | Product Total in Currency                                           |
| items\[].totalPoints   | Product Total in Points                                             |
| items\[].files\[]      | See [Assets](/concepts/assets)                                      |
| items\[].attributes    | One or more key/value pairs to support customisation of products    |
| currencyCode           | ISO currency code                                                   |
| shippingFee            | Shipping Fee                                                        |
| subTotalCurrency       | Cart Total in Currency (excluding Shipping)                         |
| totalCurrency          | Cart Total in Currency                                              |
| totalPoints            | Cart Total in Points                                                |
| attributes             | One or more key/value pairs to support customisation of cart        |
|                        |                                                                     |
| {% endtab %}           |                                                                     |

{% tab title="Sample Object" %}

```
{
  "cartId": "string",
  "items": [
    {
      "productId": "string",
      "slug": "string",
      "title": "string",
      "description": "string",
      "quantity": 0,
      "paymentMethod": "CurrencyOnly",
      "totalCurrency": 0,
      "totalPoints": 0,
      "files": [
        {
          "fileId": "string",
          "contentType": "string",
          "accessPermission": "string",
          "accessUrl": "string",
          "attributes": {},
          "edgeUrl": "string"
        }
      ],
      "attributes": {}
    }
  ],
  "currencyCode": "string",
  "shippingFee": 0,
  "subTotalCurrency": 0,
  "totalCurrency": 0,
  "totalPoints": 0,
  "attributes": {}
}
```

{% endtab %}
{% endtabs %}


# Categories

Products can be assigned to one or more categories which classify products into groups which could represent:

* Type of Product for example a "Toaster" category containing one or many Toasters.
* Products belonging to a special offer for example a "Special Deals" category contain one or many products with special pricing.
* Products assigned to be presented in a specific location within a channel, for example "Home Page Banner" for all products that are assigned to appear on a Banner on the Home Page of a website.

### Portal View

#### Accessing Categories&#x20;

Assess the **Categories** screen in the console via the console navigation bar.

<div align="left"><img src="/files/-M3pBXcviqnuMdpuUvog" alt=""></div>

#### Add New Category

Specified a Name for the category.

Click **New Category** to create the new category.

<div align="left"><img src="/files/-M3pBpaeP3e_dMrv0Eej" alt=""></div>

#### Edit Categories

Additional **Category Details** can be specified including:

![](/files/-M3pDX5RcJKVuQGRjD1r)

Click **Save** to commit your modifications.

### Category Properties

{% tabs %}
{% tab title="Attributes" %}

| Element         | Description                                                                                            |
| --------------- | ------------------------------------------------------------------------------------------------------ |
| categoryId      | Internal Identifier for the category                                                                   |
| name            | Name of the category                                                                                   |
| slug            | A Url slug to access the category                                                                      |
| description     | A Description for the category                                                                         |
| attributes      | One or more key/value pairs                                                                            |
| parent Category | A parent category to support the creation of a hierarchical/tree based structure of related categories |
| images          | Image (assets) assigned to a category                                                                  |
| {% endtab %}    |                                                                                                        |

{% tab title="Sample Object" %}

```
{
  "categoryId": "string",
  "version": "string",
  "slug": "string",
  "name": "string",
  "description": "string",
  "names": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "descriptions": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "parentId": "string",
  "parentName": "string",
  "itemCount": 0,
  "attributes": {},
  "children": [
    {
      "categoryId": "string",
      "name": "string",
      "slug": "string",
      "names": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      }
    }
  ],
  "totalChildren": 0,
  "sibling": [
    {
      "categoryId": "string",
      "name": "string",
      "slug": "string",
      "names": {
        "additionalProp1": "string",
        "additionalProp2": "string",
        "additionalProp3": "string"
      }
    }
  ],
  "totalSibling": 0,
  "isActive": true,
  "files": [
    {
      "fileId": "string",
      "contentType": "string",
      "accessPermission": "string",
      "accessUrl": "string",
      "attributes": {},
      "edgeUrl": "string"
    }
  ]
}
```

{% endtab %}
{% endtabs %}


# Configuration

```
{
  "defaultCurrencyCode": "string",
  "rewardsConversionRate": 0,
  "languages": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  }
}
```


# Collections

A collection represents a broad logical grouping of products.

Examples of collections could be:

* Winter Collection
* Premium Collection

### Portal View

#### View Collections

Assess the **Collection** screen in the console via the console navigation bar.

<div align="left"><img src="/files/-M3pFCc-HIspEyhzFJHx" alt=""></div>

#### Add New Collection

Click **Add New** to create a new collection

![](/files/-M3pF68PdFXfMg0NkMYN)

Specified a Name and Description for the collection.

Click **Submit** to create the new collection.

![](/files/-M3pFi5xchck9J_wKqEG)

#### Edit Collection

Additional **Collection Details** can be specified including:

<div align="left"><img src="/files/-M3pGHFykj81IQEH77c9" alt=""></div>

Click **Save** to commit your modifications.

### Collection Properties

{% tabs %}
{% tab title="Attributes" %}

| Element      | Description                            |
| ------------ | -------------------------------------- |
| collectionId | Internal Identifier for the collection |
| name         | Name of the collection                 |
| slug         | A Url slug to accese the collection    |
| description  | A Description for the collection       |
| attributes   | One or more key/value pairs            |
| {% endtab %} |                                        |

{% tab title="Sample Object" %}

```
{
  "collectionId": "string",
  "version": "string",
  "name": "string",
  "slug": "string",
  "description": "string",
  "names": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "descriptions": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "isActive": true,
  "totalItems": 0,
  "attributes": {}
}
```

{% endtab %}
{% endtabs %}


# Customers

The Customer object supports the storage of a defined set and custom attributes relating to your customers.

### Portal View

#### Accessing Customers&#x20;

Assess the Customers screen in the console via the console navigation bar.

![](/files/-M5oRyu0PlytpNFOE6jQ)

#### Add New Customers

Click Add New to create a new customer.

![](/files/-M5oS5b69y0doNnxvWuC)

Specify a First Name. Last Name, Display Name and Email Address.

<div align="left"><img src="/files/-M5oUJWHES6mmk7rKF9m" alt=""></div>

Click **Submit**.

#### Edit Customers

Customers can be accessed by clicking on the main customer screen:

<div align="left"><img src="/files/-M5oUynsZvEyZKR0-Vgk" alt=""></div>

Customer Details can be edited.

<div align="left"><img src="/files/-M5oUjNOCO1JIhUQ3Cmq" alt=""></div>

Click **Save** to commit your modifications.

Customers can be deleted by clicking the **Delete** button.

### Customer Properties

{% tabs %}
{% tab title="Attributes" %}

| Element                       | Description                                                                |
| ----------------------------- | -------------------------------------------------------------------------- |
| customerId                    | A unique identifier for the Customer (Guid/UUID)                           |
| version                       | A incremental version number tracking modifications to the Customer object |
| firstName                     | Customer First Name                                                        |
| lastName                      | Customer Last Name                                                         |
| displayName                   | Customer Display Name                                                      |
| emailAddress                  | Customer Email Address in                                                  |
| phones\[]                     | An array of Phone numbers                                                  |
| phones\[].Key                 | A unique identifier for the Phone Number (Guid/UUID)                       |
| phones\[].Type                | Unknown, Phone, Mobile                                                     |
| phones\[].Country             | ISO Country Code                                                           |
| phones\[].NumberLocal         | Phone Number in Local format                                               |
| phones\[].NumberInternational | Phone Number in International format                                       |
| addresses\[]                  | An array of address(es)                                                    |
| addresses\[].Key              | A unique identifier for the Address (Guid/UUID)                            |
| addresses\[].Address1         | Address Line 1                                                             |
| addresses\[].Address2         | Address Line 2                                                             |
| addresses\[].Suburb           | Suburb                                                                     |
| addresses\[].PostCode         | Postal Code/Zip Code                                                       |
| addresses\[].State            | State/Province/Region                                                      |
| addresses\[].Country          | Country                                                                    |
| attributes                    | Attributes are a list of Key/Value to support customisation of a Customer  |
| {% endtab %}                  |                                                                            |

{% tab title="Sample Object" %}

```
{
  "customerId": "string",
  "version": "string",
  "firstName": "string",
  "lastName": "string",
  "displayName": "string",
  "emailAddress": "string",
  "phones": [
    {
      "key": "string",
      "type": "Unknown",
      "country": "string",
      "numberLocal": "string",
      "numberInternational": "string"
    }
  ],
  "addresses": [
    {
      "key": "string",
      "address1": "string",
      "address2": "string",
      "suburb": "string",
      "postcode": "string",
      "state": "string",
      "country": "string"
    }
  ],
  "attributes": {}
}
```

{% endtab %}
{% endtabs %}


# Inventory

Optionally SimpleStore supports the tracking of product inventory.

### Portal View

![](/files/-M3ur_g8fXpD-OCpKtvE)

The following elements can be specified for management of inventory:

### Inventory Properties

{% tabs %}
{% tab title="Attributes" %}

| Element           | Description                                                                                                         |
| ----------------- | ------------------------------------------------------------------------------------------------------------------- |
| sku               | Stock-keeping unit of product                                                                                       |
| availableQuantity | How many available in stock                                                                                         |
| minActiveQuantity | If AvailableQuantity is below this value then the Product will not longer will be available (Status = Out Of Stock) |
| grossWeight       | Gross weight of the product                                                                                         |
| trackInventory    | Enable tracking of inventory (true\|false)                                                                          |
| {% endtab %}      |                                                                                                                     |

{% tab title="Sample Object" %}

```
{
    "sku":	"string"
    "availableQuantity":		number($double)
    "minActiveQuantity":		number($double)
    "grossWeight":		number($double)
    "trackInventory":		boolean
}
```

{% endtab %}
{% endtabs %}

|   |
| - |


# Orders

The Order object stores completed Orders.

### Portal View

#### Accessing Orders

Assess the Orders screen in the console via the console navigation bar.

![](/files/-M64_oUM6NDW-CFAVxpg)

#### View Orders

Orders can be accessed by clicking on the main order screen:

![](/files/-M64TnxFZjTnTtizJMw0)

Click **Edit** to commit view the Order Detail modifications.

Additional a summary of the order is visible by expanding the tree view.

![](/files/-M64U57l-7WtftudMePX)

#### Order Details - General and Purchaser Details

![](/files/-M64Zifyv7AlahINIpmo)

#### Order Details - Items

![](/files/-M64ZnA0P7BeTbsCx_yk)

#### Order Details - Billing and Shipping Details

![](/files/-M64_7ylg9XR4hoh9ccU)

### Order Properties

{% tabs %}
{% tab title="Attributes" %}

| Element                        | Description                                                                |
| ------------------------------ | -------------------------------------------------------------------------- |
| orderId                        | A unique identifier for the Order (Guid/UUID)                              |
| version                        | A incremental version number tracking modifications to the Customer object |
| status                         | The Order Status ()                                                        |
| createdOnUtc                   | Created in UTC time (2020-04-29T10:02:03.212Z)                             |
| customerId                     | A unique identifier for the Customer (Guid/UUID)                           |
| purchaserName                  | Purchaser Name                                                             |
| purchaserContactNumberLocal    | Purchaser Contact Number (local)                                           |
| purchaserEmail                 | Purchaser Email Address                                                    |
| receiverName                   | Receiver Name                                                              |
| receiverContactNumberLocal     | Receiver Contact Number (local)                                            |
| receiverEmail                  | Receiver Email Address                                                     |
| items\[]                       | An array of Items                                                          |
| items\[].productId             | A unique identifier for the Product (Guid/UUID)                            |
| items\[].quantity              | Quantity of Product                                                        |
| items\[].sellPrice             | Sell Price                                                                 |
| items\[].total                 | Total (Quantity x Sell Price)                                              |
| currencyCode                   | ISO currency code                                                          |
| shippingFee                    | Shipping Fee                                                               |
| subtotal                       | Total (excluding Shipping Fee)                                             |
| total                          | Total                                                                      |
| payments\[]                    | An array of payments                                                       |
| payments\[].paymentId          | A unique identifier for the Payment (Guid/UUID)                            |
| payments\[].paidOnUtc          | Paid in UTC time (2020-04-29T10:02:03.212Z)                                |
| payments\[].type               | Payment Type (Credit, Cash, Points)                                        |
| payments\[].status             | Payment Status                                                             |
| payments\[].paidAmount         | Payment Amount                                                             |
| payments\[].cancellationReason | Cancellation Reason                                                        |
| payments\[].refundId           | Redund Identifier                                                          |
| payments\[].refundReason       | Redund Reason                                                              |
| payments\[].attributes         | Attributes are a list of Key/Value to support customisation of a Payment   |
| totalPaid                      | Total Paid (Total of all Payments)                                         |
| attributes                     | Attributes are a list of Key/Value to support customisation of a Order     |
| {% endtab %}                   |                                                                            |

{% tab title="Sample Object" %}

```
{
  "orderId": "string",
  "version": "string",
  "status": "Created",
  "createdOnUtc": "2020-04-29T10:02:03.212Z",
  "customerId": "string",
  "purchaserName": "string",
  "purchaserContactNumberLocal": "string",
  "purchaserEmail": "string",
  "receiverName": "string",
  "receiverContactNumberLocal": "string",
  "receiverEmail": "string",
  "items": [
    {
      "productId": "string",
      "title": "string",
      "quantity": 0,
      "sellPrice": 0,
      "total": 0
    }
  ],
  "currencyCode": "string",
  "shippingFee": 0,
  "subtotal": 0,
  "total": 0,
  "payments": [
    {
      "paymentId": "string",
      "paidOnUtc": "2020-04-29T10:02:03.212Z",
      "type": "Credit",
      "status": "Successful",
      "paidAmount": 0,
      "cancellationReason": "string",
      "refundId": "string",
      "refundReason": "string",
      "attributes": {}
    }
  ],
  "totalPaid": 0,
  "attributes": {}
}
```

{% endtab %}
{% endtabs %}


# Payments

API Only: reference&#x20;

Payment Detail in Order

No Console<br>


# Pricing

Pricing of products comprise a specified base price and a dynamically calculated effective price.

### Portal View

<div align="left"><img src="/files/-M3us0AQ21vEvEgojHE0" alt=""></div>

### Base Price

The pricing information that has been assigned to the product itself via the console/api.

{% tabs %}
{% tab title="Attributes" %}

| Element      | Description                                                                                    |
| ------------ | ---------------------------------------------------------------------------------------------- |
| currencyCode | ISO Currency code                                                                              |
| sellPrice    | Is the advertised Price present to customer (excluding specials, discounts or other modifiers) |
| retailPrice  | Optional: Retail Price is the Recommended Retail Price (RRP)                                   |
| {% endtab %} |                                                                                                |

{% tab title="Sample Object" %}

```
{
    "currencyCode":	"string"
    "sellPrice":	number($decimal)
    "retailPrice":	number($decimal)
    "attributes":	{...}
}
```

{% endtab %}
{% endtabs %}

### Effective Price

The effective price is the calculated price of the product after specials, discount or other modifiers have been applied to the product.  It is accessible as read only properties on the Catalog > Product API Responses


# Product

A Product represents something that can be purchased within the the Simple Store platform.

The Product object comprises both a standard set of default fields along with a flexible model to extend the product to meet your customisation needs.

The Product can be associated with Categories, Collection, Assets and Attributes.

### Portal View

![](/files/-M3usWqb-Mo8xWptoODv)

### Product Properties

{% tabs %}
{% tab title="Attributes" %}

| Element       | Description                                                                                                                                                                                                                                                                                                                                                           |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| productId     | Unique Identifer for the Product                                                                                                                                                                                                                                                                                                                                      |
| slug          | A Url slug used to identify a product                                                                                                                                                                                                                                                                                                                                 |
| shortUrl      | A globally unique id identifier (see [QuickBuy](/getting-started/quickbuy))                                                                                                                                                                                                                                                                                           |
| version       | An incremental version number tracking changes to the Product configuration                                                                                                                                                                                                                                                                                           |
| title         | Default Title for the Product                                                                                                                                                                                                                                                                                                                                         |
| description   | Default Description for the Product                                                                                                                                                                                                                                                                                                                                   |
| titles        | <p>Dictionary (key, value) of alternate Titles other languages to support internationalisation (i18n) and localisation (l10n):</p><ul><li>Key = ja-JP</li><li>Value = \<Title in Japanese></li></ul>                                                                                                                                                                  |
| descriptions  | <p>Dictionary (key, value) of alternate Descriptions other languages to support internationalisation (i18n) and localisation (l10n), for example:</p><ul><li>Key = ja-JP</li><li>Value = \<Description in Japanese></li></ul>                                                                                                                                         |
| isActive      | Active (True) or InActive (False)                                                                                                                                                                                                                                                                                                                                     |
| status        | <p>Available = Product is Available</p><p>Out Of Stock = Product is Out of Stock</p><p>Discontinued = Product has been discontinued</p><p>Unavailable = Product is unavailable</p>                                                                                                                                                                                    |
| attributes    | Attributes are a list of Key/Value to support customisation of a product                                                                                                                                                                                                                                                                                              |
| categories    | One or many categories the Product is assigned to (see [Categories](/concepts/categories))                                                                                                                                                                                                                                                                            |
| collections   | One or many collections the Product is assigned to (see [Collections](/concepts/collections))                                                                                                                                                                                                                                                                         |
| files\[]      | One or many assets associated with the Product (see [Assets](/concepts/assets))                                                                                                                                                                                                                                                                                       |
| paymentMethod | <p>Defines the supported payment methods for a product:</p><p>CurrencyOnly = Can be paid with by currency ONLY, not eligible to be paid for with points</p><p>RewardsOrCurrency = Can be paid with currency or rewards points in full</p><p>RewardsOnly = Can be paid in rewards points ONLY</p><p>RewardsPlusPay = Can be paid with a mix of currency and points</p> |
| basePrice     | See [Pricing](/concepts/pricing)                                                                                                                                                                                                                                                                                                                                      |
| price         | See [Pricing](/concepts/pricing)                                                                                                                                                                                                                                                                                                                                      |
| baseRewards   | See [Rewards ](/concepts/rewards)                                                                                                                                                                                                                                                                                                                                     |
| rewards       | See [Rewards ](/concepts/rewards)                                                                                                                                                                                                                                                                                                                                     |
| inventory     | See [Inventory](/concepts/inventory)                                                                                                                                                                                                                                                                                                                                  |
| {% endtab %}  |                                                                                                                                                                                                                                                                                                                                                                       |

{% tab title="Sample Object" %}

```
{
  "productId": "string",
  "slug": "string",
  "shortUrl": "string",
  "version": "string",
  "title": "string",
  "description": "string",
  "titles": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "descriptions": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "isActive": true,
  "status": "Available",
  "attributes": {},
  "categories": [
    {
      "key": "string",
      "value": "string",
      "slug": "string"
    }
  ],
  "collections": [
    {
      "key": "string",
      "value": "string",
      "slug": "string"
    }
  ],
  "files": [
    {
      "fileId": "string",
      "contentType": "string",
      "accessPermission": "string",
      "accessUrl": "string",
      "attributes": {},
      "edgeUrl": "string"
    }
  ],
  "paymentMethod": "CurrencyOnly",
  "basePrice"	{}
  "price"	{}
  "baseRewards"	{}
  "rewards"	{}
  "inventory"	{}
}
```

{% endtab %}
{% endtabs %}

####


# Rewards

Optionally the Simple Store platform supports rewards based pricing of products to support the purchase of product with points.

The rewards pricing of products comprises a specified base rewards price and a dynamically calculated effective rewards price.

### Portal View

<div align="left"><img src="/files/-M3urfD983sfHPYrMj7o" alt=""></div>

### Base Rewards Pricing Properties

The base rewards pricing in points that has been assigned to the product via the console/api.

{% tabs %}
{% tab title="Attributes" %}

| Element         | Description                         |
| --------------- | ----------------------------------- |
| isEnabled       | Rewards pricing is enabled          |
| points          | Product price in points             |
| minPayAmount    | Minimum payment amount for purchase |
| minPointsAmount | Minimum points amount for purchase  |
| {% endtab %}    |                                     |

{% tab title="Sample Object" %}

```
{
    "isEnabled":	boolean
    "points":	integer($int32)
    "minPayAmount":	number($decimal)
    "minPointsAmount":	number($decimal)
}
```

{% endtab %}
{% endtabs %}

### Effective Rewards

The effective rewards price is the calculated price in points of the product after specials, discounts or other modifiers have been applied to the product. It is accessible as read only properties on the Catalog > Product API Responses


# Shipping

Console based configuration coming soon.\
Currently configured via API:&#x20;


# Specials

Specials define rule based price modifiers to support discounting of products.

Specials can be either a **percentage** or a **fixed** amount.

Specials apply for a specified date range

Specials can be applied to:

* **Products** - specific products
* **Categories** - all Products assigned to a category
* **Collections** - all Products assigned to a collection

### Portal View

#### View Specials

Assess the **Special** screen in the console via the console navigation bar.

![](/files/-M4JGP-1ix5ImXSeuVhm)

#### Add New Special

Click **Add New** to create a new special

![](/files/-M4JHGF1n9cBp5BOtmdd)

Specified a:

* Name
* Description
* Special Type: Percentage or Fixed Amount
* Amount (based on Special Type)
* Date Range (from and to)

Click **Submit** to create the new special.

![](/files/-M4JHAUMUcxNxdB2lYYT)

#### Edit Special&#x20;

Additional **Details** are specified including the definition of Rules that determined which products specials apply to.  Specials can apply to specific products or all products assigned to specifed Categories or Collections.

![](/files/-M4JHt5cY8wILcuwDQ9Q)

Click **Save** to commit your modifications.

#### Specials Properties

{% tabs %}
{% tab title="Attributes" %}

| Element      | Description                                                                                                                                               |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| specialId    | Internal Identifier for the special                                                                                                                       |
| name         | Name for the special                                                                                                                                      |
| description  | Description for the special                                                                                                                               |
| specialType  | Percentage or Fixed Amount                                                                                                                                |
| amount       | Amount of special, unit based on Special Type                                                                                                             |
| startDate    | Start date for the special                                                                                                                                |
| endDate      | End date for the special                                                                                                                                  |
| attributes   | One or more key/value pairs to support customisation of specials                                                                                          |
| **Rules**    |                                                                                                                                                           |
| categories   | Categories that the special applies to (see [Categories](/concepts/categories)), if a Product is assigned to these categories then the special is applied |
| collections  | Collections that the special applies to (see [Specials](/concepts/specials)), if a Product is assigned to these collections then the special is applied   |
| products     | Products that the special applies to                                                                                                                      |
| {% endtab %} |                                                                                                                                                           |

{% tab title="Sample Object" %}

```
{
    "specialId":	string
     "version	string
    "nullable: true
    "name	string
    "nullable: true
    "description	string
    nullable: true
    isActive	boolean
    startOnUtc	string($date-time)
    endOnUtc	string($date-time)
    nullable: true
    specialType	SpecialTypestring
    Enum:
    Array [ 2 ]
    amount	number($decimal)
    rules	[...]
    attributes	{...}
}
```

{% endtab %}
{% endtabs %}


# Front End Client APIs

Client APIs support the implementation of the Simple Store API into public facing channels like a web or mobile application.

### API Key

All Front End Client APIs must include an API Key which is associated with your Simple Store (Tenant) Account.

the API key is passed onto each request using the header: x-api-key

### Token Authentication

A subset of the Client API support functionality tied to specific customers, examples include:

* Change Customer Details
* Change Password
* Get Order History

A token is issued by calling the [\[login\]](https://clients.api.simplestore.io/swagger/index.html#/Customer/Customer_Login) method on the Client API:

```bash
curl -d '{"emailAddress":"email address", "password":"password"}' \
     -H "Content-Type: application/json" \
     -H "x-api-key: [api-key]"
     -X POST https://clients.api.simplestore.io/v1/customer/login
```

### Swagger References

<https://clients.api.simplestore.io/swagger/index.html>


# Backend APIs

The Simple Store Backend API support system to system integration to allow the building of complete applications using the Simple Store Platform.  Example integrations include:

* Server Side Framework (Spring/MVC) to Simple Store
* Backend System (Order Management, Product Supplier) to Simple Store

### Client Credential Authentication

SimpleStore platform uses bearer token to authenticate API requests. Using OAuth client credentials to authenticate the calling application and return a token that is valid for 60 minutes.

This token then used as a Bearer Token for subsequent API calls to the platform.

{% hint style="warning" %}
`client_secret`is sensitive information and it should never used or disclosed publicly.
{% endhint %}

## Get an Access Token

This endpoint responsible in generating access tokens for Client (application) to allow full read and write access to the platform.

### **POST**

```
https://auth.simplestore.io/connect/token
```

#### Request: Headers

| Key          | Value                             |
| ------------ | --------------------------------- |
| Content-Type | application/x-www-form-urlencoded |

#### Request: Route

No Route

#### Request: Query

No Query

#### Request: Body

{% tabs %}
{% tab title="Request Object" %}

| Element        | Type   | Description                                      |
| -------------- | ------ | ------------------------------------------------ |
| grant\_type    | string | "client\_credentials"                            |
| client\_id     | string | Your client\_id generated from Control Panel     |
| client\_secret | string | Your client\_secret generated from Control Panel |
| {% endtab %}   |        |                                                  |

{% tab title="Sample Object" %}

```
{
  "grant_type" : "client_credentials"
  "client_id" : [from control panel]
  "client_secret" : [from control panel]
}
```

{% endtab %}
{% endtabs %}

#### Response: 200 Ok

Successful authentication of client credentials will return access token with expiry time in seconds.

{% hint style="info" %}
`access_token`has an expiry of 60 minutes. You must renew the token on or before expiry.
{% endhint %}

{% tabs %}
{% tab title="Response Object" %}

| Element       | Type   | Description |
| ------------- | ------ | ----------- |
| access\_token | string | A token     |
| expiries\_in  | int    | 3600        |
| token\_type   | string | "Bearer"    |
| {% endtab %}  |        |             |

{% tab title="Sample Object" %}

```
{
    "access_token": "<Token>",
    "expires_in": 3600,
    "token_type": "Bearer"
}
```

{% endtab %}
{% endtabs %}

#### Response: 400 Bad Request

Failed authentication will return invalid client

{% tabs %}
{% tab title="Response Object" %}

| Element      | Type   | Desciption        |
| ------------ | ------ | ----------------- |
| error        | string | error description |
| title        | string |                   |
| {% endtab %} |        |                   |

{% tab title="Sample Object" %}

```
{
    "error": "invalid_client"
}
```

{% endtab %}
{% endtabs %}


# Pagination

Pagination is used in all API endpoints that return a list of results.

**Example:**

```javascript
{
    "result": [],
    "pageSize": 10,
    "pageIndex": 0,
    "totalRecordsFound": 0,
    "resultCount": 0,
    "totalPages": 0,
    "queryDurationMilliseconds": 48
}
```

Each response will contain paging information alongside the results. To change pages or the page size, when making the GET request, append the following Query Parameters   `?pageSize=10&pageIndex=1`

{% hint style="info" %}
If no paging parameter are provided, default values are used. `pageSize=10&pageIndex=0`
{% endhint %}


# Swagger References

SimpleStore API design follows micro-services architecture. Each service is responsible on a set of business capabilities.&#x20;

You can use the swagger documentation to generate client proxies to use in your application

### Catalog Service

<https://api.simplestore.io/swagger/catalog/index.html>

### Assets Service

<https://api.simplestore.io/swagger/assets/index.html>

### Customers Service

<https://api.simplestore.io/swagger/customers/index.html>

### Cart Service&#x20;

<https://api.simplestore.io/swagger/cart/index.html>

### Orders Service&#x20;

<https://api.simplestore.io/swagger/orders/index.html>

### Shipping Service&#x20;

[https://api.simplestore.io/swagger/orders/index.html](https://api.simplestore.io/swagger/shipping/index.html)

### Promotions Service&#x20;

<https://api.simplestore.io/swagger/promotions/index.html>

### Clients Gateway

<https://clients.api.simplestore.io/swagger/index.html>


