HomeStretch Public API (1.4.2)

Download OpenAPI specification:Download

HomeStretch support: support@homestretch.ru

HomeStretch API

Authentication

ApiKeyAuth

The token (Bearer Authentication), which must be specified in the header for each request. A unique token for a user account must be obtained using the POST /auth method.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

Authorization

Authorization

This method allows to get a bearer token for subsequent access to private API methods.

Token request options:

  • Pass the Authorization header with the value received as Basic base64(client_id:client_secret),
  • Pass the client_id and client_secret parameters in the request body, specifying application/x-www-form-urlencoded or application/json in the Content-Type header.

The received token will have an infinite TTL. Contact our support to get the client_id and client_secret. Specify the name of your company.

Request Body schema:

Obtaining a JWT token by id and client's secret key

client_id
required
string

Client ID

client_secret
required
string

Client's secret key

Responses

Request samples

Content type
{
  • "client_id": "705b36a9-c095-496b-aa4a-20bc31ba1991",
  • "client_secret": "recall$shrewd9Cobalt!Style"
}

Response samples

Content type
application/json
{
  • "requestId": "705b36a9-c095-496b-aa4a-20bc31ba1991",
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Company

Get company structure

Method for obtaining company structure

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "ownerId": "ChIJ9w44P7s0K4gRzfPYR32rXME",
  • "accountIds": [
    ],
  • "branches": [
    ]
}

Change company structure

Method for changing company structure

Authorizations:
Request Body schema: application/json
accountIds
Array of strings
Array of objects

Responses

Request samples

Content type
application/json
{
  • "accountIds": [