# API Reference

This API is only available for API key holders. An API key will be shared as part of the white-label deal. This API is [documented here](https://app.swaggerhub.com/apis-docs/sstfrederik/SST_WhiteLabel/1.0.0#/) as well.

### Endpoint

The exact white-label API endpoint from [api.simplesystemtrading.com](https://api.simplesystemtrading.com) will be shared with the client when an agreement is made.

### Authorization

**`ApiKeyAuth` (apiKey)**

An API key is needed to authorize requests. An API key will be shared as part of the white-label deal. The API key will need to be placed in the header to authenticate all the requests.

Name: `x-api-key`

In: `header`

Value: `somerandomapikeythatfrederikwillprovide`

### Available white-label API Calls

{% openapi src="/files/segFfLKfLtBvgASwofEb" path="/name" method="get" %}
[sstfrederik-SST\_WhiteLabel-1.0.0-swagger.json](https://2811836781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FWCratXDWxdOMVFqMKz%2Fuploads%2F8DeWC323wp4SUtFmpWFa%2Fsstfrederik-SST_WhiteLabel-1.0.0-swagger.json?alt=media\&token=9ad571b4-c86d-4fff-bfef-a06d2b5a9bed)
{% endopenapi %}

{% hint style="info" %}
Getting the study bundle name that is under management for the api key that is used. This bundle name is also visible for SC accounts with access inside the SC custom study list. This name can be used to provide instructions to SC users on where they can find the study bundle after they are in the access list.
{% endhint %}

{% openapi src="/files/segFfLKfLtBvgASwofEb" path="/licenses" method="get" %}
[sstfrederik-SST\_WhiteLabel-1.0.0-swagger.json](https://2811836781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FWCratXDWxdOMVFqMKz%2Fuploads%2F8DeWC323wp4SUtFmpWFa%2Fsstfrederik-SST_WhiteLabel-1.0.0-swagger.json?alt=media\&token=9ad571b4-c86d-4fff-bfef-a06d2b5a9bed)
{% endopenapi %}

{% hint style="info" %}
Getting the total number of licenses under management. This is the number of licenses that can be managed within the white-label deal. If you want to raise this number get in touch with Frederik.
{% endhint %}

{% openapi src="/files/segFfLKfLtBvgASwofEb" path="/usage" method="get" %}
[sstfrederik-SST\_WhiteLabel-1.0.0-swagger.json](https://2811836781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FWCratXDWxdOMVFqMKz%2Fuploads%2F8DeWC323wp4SUtFmpWFa%2Fsstfrederik-SST_WhiteLabel-1.0.0-swagger.json?alt=media\&token=9ad571b4-c86d-4fff-bfef-a06d2b5a9bed)
{% endopenapi %}

{% hint style="info" %}
Getting the number of licenses used. This is the number of SC accounts that are currently assigned access to the white-label study bundle.
{% endhint %}

{% openapi src="/files/segFfLKfLtBvgASwofEb" path="/available" method="get" %}
[sstfrederik-SST\_WhiteLabel-1.0.0-swagger.json](https://2811836781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FWCratXDWxdOMVFqMKz%2Fuploads%2F8DeWC323wp4SUtFmpWFa%2Fsstfrederik-SST_WhiteLabel-1.0.0-swagger.json?alt=media\&token=9ad571b4-c86d-4fff-bfef-a06d2b5a9bed)
{% endopenapi %}

{% hint style="info" %}
Getting the number of licenses that are currently available within the agreed white-label deal. This is the number of SC accounts that still can be added to the access list.
{% endhint %}

{% openapi src="/files/segFfLKfLtBvgASwofEb" path="/scaccounts" method="get" %}
[sstfrederik-SST\_WhiteLabel-1.0.0-swagger.json](https://2811836781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FWCratXDWxdOMVFqMKz%2Fuploads%2F8DeWC323wp4SUtFmpWFa%2Fsstfrederik-SST_WhiteLabel-1.0.0-swagger.json?alt=media\&token=9ad571b4-c86d-4fff-bfef-a06d2b5a9bed)
{% endopenapi %}

{% hint style="info" %}
Get a full list of SC accounts that are currently on the access list for the white-label study bundle. The output will be a JSON array filled with the current SC accounts on the access list and a count value of the total number of SC accounts on the list.
{% endhint %}

{% openapi src="/files/segFfLKfLtBvgASwofEb" path="/add" method="post" %}
[sstfrederik-SST\_WhiteLabel-1.0.0-swagger.json](https://2811836781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FWCratXDWxdOMVFqMKz%2Fuploads%2F8DeWC323wp4SUtFmpWFa%2Fsstfrederik-SST_WhiteLabel-1.0.0-swagger.json?alt=media\&token=9ad571b4-c86d-4fff-bfef-a06d2b5a9bed)
{% endopenapi %}

{% hint style="success" %}
Add a SC user to the access list of the white-label study bundle. The SC account provided in the POST body will be used in an attempt to add it to the access list. The POST body needs to be JSON.

```json
{
  "sc_account": "ac12345"
}
```

If this call was successful the SC user will need to restart SC to automatically download the study bundle file. The SC user can make use of the study for as long as the user is on the access list. If this attempt was unsuccessful the reason will be displayed in the error message.

The SC user can find their SC account name by going to SC menu: **Help >> About**. The name will be displayed in the pop-up window. The full displayed name should be used, the name is not case-sensitive.
{% endhint %}

{% openapi src="/files/segFfLKfLtBvgASwofEb" path="/update" method="post" %}
[sstfrederik-SST\_WhiteLabel-1.0.0-swagger.json](https://2811836781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FWCratXDWxdOMVFqMKz%2Fuploads%2F8DeWC323wp4SUtFmpWFa%2Fsstfrederik-SST_WhiteLabel-1.0.0-swagger.json?alt=media\&token=9ad571b4-c86d-4fff-bfef-a06d2b5a9bed)
{% endopenapi %}

{% hint style="success" %}
Update a SC user on the access list of the white-label study bundle that is under management for the used api-key. This call can only be used when an user is already present on the access list. The POST body needs to be JSON.

```json
{
  "sc_account": "ac12345",
  "old_sc_account": "ac12345"
}
```

A normal use case would be when a user has changed SC account and needs access the the study bundle updated. In that case the update call can be used. Alternatively one could also call **remove** for the old SC account and **add** for the new account. The result of this update call (success or error) will be displayed in the output message.
{% endhint %}

{% openapi src="/files/segFfLKfLtBvgASwofEb" path="/remove" method="post" %}
[sstfrederik-SST\_WhiteLabel-1.0.0-swagger.json](https://2811836781-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FWCratXDWxdOMVFqMKz%2Fuploads%2F8DeWC323wp4SUtFmpWFa%2Fsstfrederik-SST_WhiteLabel-1.0.0-swagger.json?alt=media\&token=9ad571b4-c86d-4fff-bfef-a06d2b5a9bed)
{% endopenapi %}

{% hint style="success" %}
Remove a SC user from the access list of the white-label study bundle that is under management for the used api key. The POST body needs to be JSON.

```json
{
  "sc_account": "ac12345"
}
```

Removing a SC account from the access list will result in no longer having access to the custom study bundle. The study file will still be present for the SC user, but can no longer be used. If the study is used there will be an error message in the SC message log to explain the procedure to get access. The result of this remove call (success or error) will be displayed in the output message. This api does not keep track of SC accounts that were previously on the access list.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.simplesystemtrading.com/sst-services/white-label-sst-studies/api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
