uptain customer backend API (2.0.0)

Download OpenAPI specification:Download

API for accessing the uptain customer backend.

Authentication

JWTHeaderToken

Security Scheme Type API Key
Header parameter name: authorization

Dashboard

Everything about your Dashboard.

Get Raw table data

This route will give you all the regains you have under this user. Page and PageSize determine where in the dataset you start to collect the data and how much of it you will retrieve. To access this route you need to acquire a login token from the /login route, you need to collect a list of shops that you want information on from /account/shops, finally you need a list of possible columns that you can get from /shop/{ID}/regainTableColumns. Set the token from /login to the authorization header (header.authorization), set the shop or the shops you want information on into the shop parameter/s of your query and use the columns retrieved from shop/{ID}/regainTableColumns in the col parameter/s to get all the columns you want information on.

Authorizations:
query Parameters
col
required
Array of strings

The column you wish to select. Every col variable contains one column. All possible options can be requested at /shop/{ID}/regainTableColumn

shop
required
Array of strings

The shop you want the table data for. Every shop variable contains one shop id

pageSize
required
number

The number of entries you want to fetch

page
required
number

The number of the page you are requesting (if you have 15 as pageSize then 2 as page would give you the 30th to 45th entry).

start
required
string

The date you want the first datapoint for

end
required
string

The date you want the last datapoint for

header Parameters
Authorization
required
string

The JWT Token to authenticate you against the server

Responses

200

The data has been gathered

400

The request you sent did not contain all the necessary information

get /transactions?{col}&{shop}&{pageSize}&{page}?{start}?{end}
https://backend.uptain.de/transactions?{col}&{shop}&{pageSize}&{page}?{start}?{end}

Get all the shops you have access to

This route will provide you with an array of shopIds that you have access to. All you need for this route to work is the authorization token from /login as well as one shop id gathered from /account/shops. Set the token in the header under the key "authorization" to gain access to your shops. Fill the shop id into the ID field of the query.

Authorizations:
path Parameters
ID
required
string

The shop's id you want to get the possible columns for.

header Parameters
authorization
string

The JWT token used to authenticate you against the server.

Responses

200

Your request was processed and the requested data is in the body of the response.

get /shop/{ID}/regainTableColumns
https://backend.uptain.de/shop/{ID}/regainTableColumns

Public

API to your shop data.

Login to your personal Uptain Account

This route provides the ability to log into your account. All that is required are the parameters: "username" holding your email you used to register as well as "password" holding the password you used to register.

Authorizations:
Request Body schema: application/json

The username and password. If you set the remember flag to true, your token will be valid for 365 days. If you do not send it or set it to false, the token will have a validity of 30 minutes.

email
string
password
string
remember
boolean

Responses

200

You were logged in successfully

403

The username or password that was provided is incorrect

404

The user was not found in the userbase

post /login
https://backend.uptain.de/login

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "email": "string",
  • "password": "string",
  • "remember": true
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "message": "string"
}

Returns a list with the available shop IDs.

All the shops that are available to the user you are requesting the shops for will be returned by this route. To access data on this route you need to login via the /login route.

Authorizations:
header Parameters
authorization
string

The JWT authentication token from the login.

Responses

200

Success

404

User does not exist

get /account/shops
https://backend.uptain.de/account/shops

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • "string"
]

Request shop specific regain and cancellation data.

The returned JSON object will have and Array called "data" and per index one object with two keys. These keys are either "count" and "date" or "value" and "data". Which keys you are getting depends on the setting you set in the "as" parameter. So if you choose as=count, you will get objects with keys: "date", "count". In order to request data from this route you need to login on the /login route and then ask on /account/shops for a list of all your shop ids. The other parameters need to be set according to their specifications

Authorizations:
query Parameters
shop
required
Array of strings

All the shops you are requesting data for. Each shop variable contains one shopID. Shop IDs that you have access to can be requested at /account/shops. Example for two shops: shop="123"&shop="456"

product
required
string

All the products for the shops you are requesting the data for. Each Shop Variable contains one product. Example for two products: product="1"&product="2"

start
required
string

The date for which you get the first datapoint. Format for the date is: "YYYY-MM-DD"

end
required
string

The date for which you get the last datapoint. Format for the date is: "YYYY-MM-DD"

interval
required
string

The interval in which you want the data to be calculated in. Possible options are: hours, days, weeks, months, years.

as
required
string

Describing if you want values or the count of values. The corresponding options are: count, values

header Parameters
Authorization
string

Responses

200

Your query for the values of the transactions was successful

400

The request you sent did not contain all necessary information

422

The 'as' paramter you provided is not supported by the API

get /data?{shop}&{product}&{start}&{end}&{interval}&{as}
https://backend.uptain.de/data?{shop}&{product}&{start}&{end}&{interval}&{as}

Get Raw table data

This route will give you all the regains you have under this user. Page and PageSize determine where in the dataset you start to collect the data and how much of it you will retrieve. To access this route you need to acquire a login token from the /login route, you need to collect a list of shops that you want information on from /account/shops, finally you need a list of possible columns that you can get from /shop/{ID}/regainTableColumns. Set the token from /login to the authorization header (header.authorization), set the shop or the shops you want information on into the shop parameter/s of your query and use the columns retrieved from shop/{ID}/regainTableColumns in the col parameter/s to get all the columns you want information on.

Authorizations:
query Parameters
col
required
Array of strings

The column you wish to select. Every col variable contains one column. All possible options can be requested at /shop/{ID}/regainTableColumn

shop
required
Array of strings

The shop you want the table data for. Every shop variable contains one shop id

pageSize
required
number

The number of entries you want to fetch

page
required
number

The number of the page you are requesting (if you have 15 as pageSize then 2 as page would give you the 30th to 45th entry).

start
required
string

The date you want the first datapoint for

end
required
string

The date you want the last datapoint for

header Parameters
Authorization
required
string

The JWT Token to authenticate you against the server

Responses

200

The data has been gathered

400

The request you sent did not contain all the necessary information

get /transactions?{col}&{shop}&{pageSize}&{page}?{start}?{end}
https://backend.uptain.de/transactions?{col}&{shop}&{pageSize}&{page}?{start}?{end}

Get all the shops you have access to

This route will provide you with an array of shopIds that you have access to. All you need for this route to work is the authorization token from /login as well as one shop id gathered from /account/shops. Set the token in the header under the key "authorization" to gain access to your shops. Fill the shop id into the ID field of the query.

Authorizations:
path Parameters
ID
required
string

The shop's id you want to get the possible columns for.

header Parameters
authorization
string

The JWT token used to authenticate you against the server.

Responses

200

Your request was processed and the requested data is in the body of the response.

get /shop/{ID}/regainTableColumns
https://backend.uptain.de/shop/{ID}/regainTableColumns