Simulator.Company REST API (1.0)

Download OpenAPI specification:Download

Simulator.Company Public REST API.

Authentication

OAuth2

Control Events use the OAuth 2.0 protocol for authentication and authorization. Control Events supports common OAuth 2.0 scenarios such as those for web server, installed, and client-side applications.

If you want to make requests on behalf of other control.events users, you can register an OAuth application and have them grant permissions to your app.

Security Scheme Type OAuth2
authorizationCode OAuth Flow
Authorization URL: https://account.corezoid.com/oauth2/authorize
Token URL: https://account.corezoid.com/oauth2/token
Scopes:
  • control.events:users.readonly -

    View workspace users information

  • control.events:workspaces.readonly -

    View all your workspaces

  • control.events:forms.readonly -

    View forms

  • control.events:forms.management -

    Create, update, and delete forms

  • control.events:actors.readonly -

    View actors info

  • control.events:actors.management -

    Create, update, and delete actors

  • control.events:attachments.readonly -

    View attachments

  • control.events:attachments.management -

    Create, update, and delete attachments

BearerAuth

You can generate an API access_token for your workspace on the Account (Account -> API Keys).

To use an API access_token to authenticate an API request, just replace access_token in the following API endpoints with the string key, and pass the Authorization header:

Authorization: Bearer YOUR_ACCESS_TOKEN

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

reactions

Reactions API

Create reaction

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
type
required
string
Enum: "view" "comment" "rating" "done" "sign" "reject" "freeze"

Reaction type

actorId
required
string

Actor ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
description
string

Comment text

appId
string

Script actor ID

appSettings
object

Script settings, e.g. autorun

data
object

Extra data for reaction

parentId
string

Parent reaction ID (reply to a comment)

object

Meta information

Responses

Request samples

Content type
application/json
{
  • "description": "Some comment text",
  • "appId": "string",
  • "appSettings": {
    },
  • "data": {
    },
  • "parentId": "string",
  • "metaInfo": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get all actor reactions

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:reactions.readonly)
path Parameters
actorId
required
string

Actor ID

query Parameters
orderValue
string
Default: "ASC"
Enum: "ASC" "DESC"

Sorting vector

limit
integer
Default: 20

The total number of reactions to retrieve (used with offset)

offset
integer
Default: 0

The number of rows to skip when fetching list

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/reactions/list/%7BactorId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get reactions statistics

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
actorId
required
string

Actor ID to get reactions statistics

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/reactions/stats/%7BactorId%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update reaction

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
rootActorId
required
string

Root actor ID (the actor to which the reaction belongs)

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
actorId
string

Reaction actor ID (which is being edited)

description
string

Comment text

appId
string

Script actor ID

appSettings
object

Script settings, e.g. autorun

data
object

Extra data for reaction

Responses

Request samples

Content type
application/json
{
  • "actorId": "string",
  • "description": "Some comment text",
  • "appId": "string",
  • "appSettings": { },
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Remove reaction

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
actorId
required
string

ID of the actor to which the reaction is linked

Request Body schema: application/json
actorId
required
string

Reaction actor ID

Responses

Request samples

Content type
application/json
{
  • "actorId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

upload

Upload API

Upload file

Scopes [control.events:attachments.management]

Authorizations:
OAuth2 (control.events:attachments.management)
path Parameters
accId
required
string

Workspace ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: multipart/form-data

File binary

file
string <binary>

Responses

Request samples

curl --request POST \
  --url https://api.simulator.company/v/1.0/upload/%7BaccId%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

Upload file base64

Scopes [control.events:attachments.management]

Authorizations:
OAuth2 (control.events:attachments.management)
path Parameters
accId
required
string

Workspace ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json

File binary

file
string <base64>

File in base64 format

originalName
string

File name

Responses

Request samples

Content type
application/json
{
  • "file": "string",
  • "originalName": "fileName.png"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

download

Download API

Download file

path Parameters
fileName
required
string
query Parameters
origin
boolean
Default: false

Specify true to download file with initial filename and extension.

preview
boolean
Default: false

Specify true to show file preview only (without download).

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/download/%7BfileName%7D

attachments

Attachments API

Get all attachments

Scopes [control.events:attachments.readonly]

Authorizations:
OAuth2 (control.events:attachments.readonly)
path Parameters
accId
required
string

Workspace Id

query Parameters
orderBy
string
Enum: "created_at" "title"

Attachments sorting mode

orderValue
string
Enum: "ASC" "DESC"

Sorting vector

limit
integer

The total number of attachments to retrieve (used with offset)

offset
integer

The number of rows to skip when fetching list

starred
boolean

Get favorite attachments

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/attachments/%7BaccId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Add attachment to actor

Scopes [control.events:attachments.management]

Authorizations:
OAuth2 (control.events:attachments.management)
path Parameters
accId
required
string

Workspace ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
Array ()
attachId
required
integer
actorId
required
string

Actor ID

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Remove attachment

Scopes [control.events:attachments.management]

Authorizations:
OAuth2 (control.events:attachments.management)
path Parameters
accId
required
string

Workspace ID

Request Body schema: application/json
Array ()
attachId
required
integer
actorId
required
string

Actor ID

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": [
    ]
}

forms

Forms API

Get list of forms

Scopes [control.events:forms.readonly]

Authorizations:
OAuth2 (control.events:forms.readonly)
path Parameters
accId
required
string

Workspace Id

query Parameters
limit
integer
Default: 20

The total number of rows to retrieve (used with offset)

offset
integer
Default: 0

The number of rows to skip when fetching list

noDefault
boolean

Exclude default form

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/forms/templates/%7BaccId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get list of system forms

This API is used to get system forms:

  • Graphs
  • Layers
  • Streams
  • Events
  • Widgets
  • Scripts
  • Locations
  • Tags
  • Reactions

Scopes [control.events:forms.readonly]

Authorizations:
OAuth2 (control.events:forms.readonly)
path Parameters
accId
required
string

Workspace Id

query Parameters
formTypes
string
Enum: "connector" "system"
Example: formTypes=system
header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url 'https://api.simulator.company/v/1.0/forms/templates/system/%7BaccId%7D?formTypes=system'

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create form

Scopes [control.events:forms.management]

Authorizations:
OAuth2 (control.events:forms.management)
path Parameters
accId
required
string

Workspace ID

isTemplate
required
boolean

Specify true if the form is a template; otherwise, false

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
title
string
description
string
color
string
sections
Array of objects
settings
object
tags
Array of objects

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "color": "string",
  • "sections": [
    ],
  • "settings": { },
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set form status

Scopes [control.events:forms.management]

Authorizations:
OAuth2 (control.events:forms.management)
path Parameters
formId
required
integer

Form ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
status
string
Enum: "verified" "rejected" "pending" null

Responses

Request samples

Content type
application/json
{
  • "status": "verified"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get form by ref

Scopes [control.events:forms.readonly]

Authorizations:
OAuth2 (control.events:forms.readonly)
path Parameters
formId
required
string

Form ref

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/forms/ref/%7Bref%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get form by ID

Scopes [control.events:forms.readonly]

Authorizations:
OAuth2 (control.events:forms.readonly)
path Parameters
formId
required
integer

Form ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/forms/%7BformId%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update form

Scopes [control.events:forms.management]

Authorizations:
OAuth2 (control.events:forms.management)
path Parameters
formId
required
integer

Form ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
title
string
description
string
color
string
sections
Array of objects
settings
object
tags
Array of objects

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "description": "string",
  • "color": "string",
  • "sections": [
    ],
  • "settings": { },
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Remove form

Scopes [control.events:forms.management]

Authorizations:
OAuth2 (control.events:forms.management)
path Parameters
formId
required
integer

Form ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request DELETE \
  --url https://api.simulator.company/v/1.0/forms/%7BformId%7D

Response samples

Content type
application/json
{
  • "data": "ok"
}

Clear cache for form item options

Helps to clear cache for form item options, where source type is 'api'.

Scopes [control.events:forms.management]

Authorizations:
OAuth2 (control.events:forms.management)
path Parameters
formId
required
integer

Form ID

itemId
required
string

Form item ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request DELETE \
  --url https://api.simulator.company/v/1.0/forms/item_cache/%7BformId%7D/%7BitemId%7D

Response samples

Content type
application/json
{
  • "data": "ok"
}

meta graph

Meta graph API

Get linked actors with links

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
actorId
required
string

Actor ID

query Parameters
edgeTypeId
any

Link type ID from the list of available link types.
To get only hierarchical links use a link type with the name hierarchy, to get only links for calculating balances - a link type with the name calculatedTree.

filter
string
Example: filter=id,title,status,data.item_16357762770841362

Comma-separated list of fields we want to receive for every actor in response data. To add actor's form fields (data), specify every demanded field as data.item_16357762770841362. Don't pass this parameter to get full actors' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/graph/linked_actors/%7BactorId%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get linked actors

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
type
required
string
Enum: "children" "parents" "linked"

Type of relation to the actor, linked means both child and parent actors

actorId
required
string

Actor ID

query Parameters
edgeTypeId
required
integer

Link type ID from the list of available link types.
To get only hierarchical links use a link type with the name hierarchy, to get only links for calculating balances - a link type with the name calculatedTree.

formId
integer

Form ID to filter linked actors

exceptFormId
integer

Form ID to exclude actors from the result

orderBy
string
Default: "createdAt"
Enum: "createdAt" "formTitle"

Actors sorting mode

orderValue
string
Default: "DESC"
Enum: "ASC" "DESC"

Sorting vector

limit
integer
Default: 20

The total number of actors to retrieve (used with offset)

offset
integer
Default: 0

The number of rows to skip when fetching list

withForm
boolean

Specify true to add form info to response data

lastReaction
boolean

Specify true to add last actor reaction to response data

reactionsStats
boolean

Specify true to add users' reactions statistics to response data

starred
boolean
filter
string
Example: filter=id,title,status,data.item_16357762770841362

Comma-separated list of fields we want to receive for every actor in response data. To add actor's form fields (data), specify every demanded field as data.item_16357762770841362. Don't pass this parameter to get full actors' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/graph/%7Btype%7D/%7BactorId%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

layers

Layers API

Get layer

Scopes [control.events:actors.readonly]

A layer is an actor created with system form Layers. This API retrieves all layer actor data together with it's nodes and links.

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
layerId
required
string

Layer ID

query Parameters
noDuplicate
boolean
Default: true

Specify false to add all nodes copies on layer

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/graph_layers/%7BlayerId%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

Manage layer elements

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
layerId
required
string

Layer Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json

List of actions

Array (non-empty)
action
string
Enum: "create" "delete"
object

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": {
    }
}

Save layer nodes positions on layer

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
layerId
required
string

Layer ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
Array ()
id
required
string

Unique element ID on layer

required
object

New element position (x, y)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": {
    }
}

Move actors to another layer

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
sourceLayerId
required
string

Source layer ID

targetLayerId
required
string

Target layer ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
Array ([ 1 .. 10 ] items)
actorId
required
string
laId
integer

Unique element ID on source layer

object

Actor position on target layer

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": {
    }
}

Clear the layer

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
layerId
required
string

Layer Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request DELETE \
  --url https://api.simulator.company/v/1.0/graph_layers/clean/%7BlayerId%7D

Response samples

Content type
application/json
{
  • "data": "ok"
}

Check element existence

Scopes [control.events:actors.readonly]

This method searches an element on the layer and returns a list of their layer-unique IDs.

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
layerId
required
string

Layer Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
id
string

Element ID

type
string
Enum: "node" "edge"

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "type": "node"
}

Response samples

Content type
application/json
[
  • {
    }
]

Search layer actors

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
layerId
required
string

Layer ID

query
required
string >= 2 characters

Search string

query Parameters
filter
string
Example: filter=id,title,status,data.item_16357762770841362

Comma-separated list of fields we want to receive for every actor in response data. To add actor's form fields (data), specify every demanded field as data.item_16357762770841362. Don't pass this parameter to get full actors' info.

withForm
boolean

Specify true to add form info to response data

lastReaction
boolean

Specify true to add last actor reaction to response data

reactionsCount
boolean

Specify true to add actor reactions count to response data

reactionsStats
boolean

Specify true to add users' reactions statistics to response data

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/layer_actors_filters/search/%7BlayerId%7D/%7Bquery%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get layer actors by form ID

Scopes [control.events:actors.readonly]

This method returns all layer actors filtered by form ID.

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
layerId
required
string

Layer ID

formId
required
integer

Form ID

query Parameters
from
required
integer

Unixtime from which to receive items. If not specified, unixtime will be set to start of the month.

to
required
integer

Unixtime to which to receive items. If not specified, unixtime will be set to the end of the month.

limit
integer [ 0 .. 200 ]
Default: 50

The total number of actors to retrieve (used with offset)

offset
integer <= 10000
Default: 0

The number of rows to skip when fetching list

orderBy
string
Default: "created_at"
Enum: "updated_at" "created_at"

Actors sorting mode

orderValue
string
Default: "DESC"
Enum: "ASC" "DESC"

Sorting vector

withForm
boolean

Specify true to add form info to response data

lastReaction
boolean

Specify true to add last actor reaction to response data

reactionsCount
boolean

Specify true to add actor reactions count to response data

reactionsStats
boolean

Specify true to add users' reactions statistics to response data

filter
string
Example: filter=id,title,status,data.item_16357762770841362

Comma-separated list of fields we want to receive for every actor in response data. To add actor's form fields (data), specify every demanded field as data.item_16357762770841362. Don't pass this parameter to get full actors' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/layer_actors_filters/%7BlayerId%7D/%7BformId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get all graph layers with actor

Scopes [control.events:actors.readonly]

This method retrieves all layers where the actor is added.

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
actorId
required
string

Actor Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/layers_links/actor_global/%7BactorId%7D

Response samples

Content type
application/json
[
  • {
    }
]

actors

Actors API

Create actor

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
formId
required
integer

Form ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
ref
string [ 1 .. 255 ] characters

A string value for making actors API requests by ref (must be unique within a form)

title
string
description
string
picture
string
data
object

Form fields values

appId
string Nullable

Script actor ID

object Nullable

Script settings, e.g. autorun

cardActorId
string

Actor ID to display its data card

object

Data for company card

Responses

Request samples

Content type
application/json
{
  • "ref": "string",
  • "title": "string",
  • "description": "string",
  • "picture": "string",
  • "data": { },
  • "appId": "string",
  • "appSettings": {
    },
  • "cardActorId": "string",
  • "viewData": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get actor by ID

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
actorId
required
string

Actor ID

query Parameters
attachments
boolean

Flag to add attachments list to response

reactionsStats
boolean

Flag to add actor reactions statistics by users to response

filter
string
Example: filter=id,title,status,data.item_16357762770841362

Comma-separated list of fields we want to receive for every actor in response data. To add actor's form fields (data), specify every demanded field as data.item_16357762770841362. Don't pass this parameter to get full actors' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/actors/%7BactorId%7D

Response samples

Content type
application/json
{
  • "id": "string",
  • "ref": "string",
  • "title": "string",
  • "description": "string",
  • "formId": 0,
  • "formTitle": "string",
  • "status": "verified",
  • "starred": false,
  • "readonly": false,
  • "color": "string",
  • "userId": 0,
  • "picture": "string",
  • "data": { },
  • "isSystem": true,
  • "systemObjId": 0,
  • "systemObjType": "user",
  • "systemObjStatus": "active",
  • "createdAt": 0,
  • "updatedAt": 0,
  • "privs": {
    },
  • "access": [
    ],
  • "user": {
    },
  • "reactionsStats": {
    },
  • "attachments": [
    ]
}

Remove actor by ID

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
actorId
required
string

Actor ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request DELETE \
  --url https://api.simulator.company/v/1.0/actors/%7BactorId%7D

Response samples

Content type
application/json
{
  • "data": "ok"
}

Remove multiple actors and links

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
Array ([ 1 .. 20 ] items)
id
required
string

Actor or link ID

type
required
string
Enum: "node" "edge"

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": "ok"
}

Update actor by ID

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
formId
required
integer

Form ID

actorId
required
string

Actor ID

query Parameters
replaceEmpty
boolean

Specify false to update only those actor fields that are explicitly passed in the request body. Otherwise, non-passed fields will be cleared.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
ref
string [ 1 .. 255 ] characters

A string value for making actors API requests by ref (must be unique within a form)

title
string
description
string
picture
string
data
object

Form fields values

appId
string Nullable

Script actor ID

object Nullable

Script settings, e.g. autorun

cardActorId
string

Actor ID to display its data card

object

Data for company card

Responses

Request samples

Content type
application/json
{
  • "ref": "string",
  • "title": "string",
  • "description": "string",
  • "picture": "string",
  • "data": { },
  • "appId": "string",
  • "appSettings": {
    },
  • "cardActorId": "string",
  • "viewData": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get actor by ref

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
formId
required
integer

Form ID

ref
required
string

Actor ref

query Parameters
filter
string
Example: filter=id,title,status,data.item_16357762770841362

Comma-separated list of fields we want to receive for every actor in response data. To add actor's form fields (data), specify every demanded field as data.item_16357762770841362. Don't pass this parameter to get full actors' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/actors/ref/%7BformId%7D/%7Bref%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get actor by systemObjId

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace ID

objType
required
string
Value: "user"

Object type

objId
required
int

User ID to get system actor

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/actors/system/%7BaccId%7D/%7BobjType%7D/%7BobjId%7D

Response samples

Content type
application/json
{
  • "id": "string",
  • "ref": "string",
  • "title": "string",
  • "description": "string",
  • "formId": 0,
  • "formTitle": "string",
  • "status": "verified",
  • "starred": false,
  • "readonly": false,
  • "color": "string",
  • "userId": 0,
  • "picture": "string",
  • "data": { },
  • "isSystem": true,
  • "systemObjId": 0,
  • "systemObjType": "user",
  • "systemObjStatus": "active",
  • "createdAt": 0,
  • "updatedAt": 0,
  • "privs": {
    },
  • "access": [
    ],
  • "user": {
    }
}

Remove actor by ref

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
formId
required
integer

Form ID

ref
required
string

Actor ref

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request DELETE \
  --url https://api.simulator.company/v/1.0/actors/ref/%7B%7BformId%7D%7D/%7B%7Bref%7D%7D

Response samples

Content type
application/json
{
  • "data": "ok"
}

Update actor by ref

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
formId
required
integer

Form ID

ref
required
string

Actor ref

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
ref
string [ 1 .. 255 ] characters

A string value for making actors API requests by ref (must be unique within a form)

title
string
description
string
picture
string
data
object

Form fields values

appId
string Nullable

Script actor ID

object Nullable

Script settings, e.g. autorun

cardActorId
string

Actor ID to display its data card

object

Data for company card

Responses

Request samples

Content type
application/json
{
  • "ref": "string",
  • "title": "string",
  • "description": "string",
  • "picture": "string",
  • "data": { },
  • "appId": "string",
  • "appSettings": {
    },
  • "cardActorId": "string",
  • "viewData": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Set actor status

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
actorId
required
string

Actor ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
status
string
Enum: "verified" "rejected" "pending" null

Responses

Request samples

Content type
application/json
{
  • "status": "verified"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Search actors

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace Id

query
required
string >= 2 characters

Search string

query Parameters
limit
integer
Default: 20

The total number of actors to retrieve (used with offset)

offset
integer
Default: 0

The number of rows to skip when fetching list

isSystem
boolean

Specify true to filter only system actors, false - only custom actors. Don't pass this parameter to get both types of actors.

formId
integer

Form ID

filter
string
Example: filter=id,title,status,data.item_16357762770841362

Comma-separated list of fields we want to receive for every actor in response data. To add actor's form fields (data), specify every demanded field as data.item_16357762770841362. Don't pass this parameter to get full actors' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/actors_filters/search/%7BaccId%7D/%7Bquery%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Filter by form

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
formId
required
integer

Form ID

query Parameters
from
required
integer

Unixtime from which to receive items. If not specified, unixtime will be set to start of the month.

to
required
integer

Unixtime to which to receive items. If not specified, unixtime will be set to the end of the month.

limit
integer
Default: 50

The total number of actors to retrieve (used with offset)

offset
integer
Default: 0

The number of rows to skip when fetching list

scroll
boolean

Specify true to retrieve large sets of results. The response will contain a scroll ID in the response body. You can then use the scroll ID to retrieve the next batch of results for the request.

scrollId
string

Scroll ID from the previous response to retrieve the next batch of results. Scroll ID expires in 1 minute.

orderBy
string
Default: "created_at"
Enum: "created_at" "updated_at"

Actors sorting mode

orderByKey
string

It`s the key by which the sorting will be performed

accountNameId
string

Filter by account name

currencyId
string

Filter by currency

incomeType
string
Enum: "debit" "credit"

Use with accountNameId and currencyId, if it is null, filter will be applied to total balance

orderValue
string
Default: "DESC"
Enum: "ASC" "DESC"

Sorting vector

isSystem
boolean

Specify true to filter only system actors, false - only custom actors. Don't pass this parameter to get both types of actors.

systemObjType
string
Enum: "user" "tag" "location"

Type of system object

systemObjStatus
string
Enum: "active" "removed"

Status

q
string
Example: q=industry%3DRetail%26country%3DUSA&search=string, q=conditions.data.state=active&limit=2&offset=2, q=conditions.data.statusCond.ref=statusone

URL-encoded query string consists of data values (template fields). Also use "search" to find actor by title. Multiple key-value pairs are separated by '&'. To search by nested fields, use a dot, see the second example. To search by actor`s ref see third example. For fields of type calendar, you can use the symbols '>', '<', '>=', '<='. Example: dateOfBirth>{'startDate':71182800}

filter
string
Example: filter=id,title,status,data.item_16357762770841362

Comma-separated list of fields we want to receive for every actor in response data. To add actor's form fields (data), specify every demanded field as data.item_16357762770841362. Don't pass this parameter to get full actors' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/actors_filters/%7BformId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get link types list

Scopes [control.events:actors.readonly]

Link type is an attribute of every link between actors. E.g., on the Economics layer - a link type with the name calculatedTree is used, on other layers - a hierarchical link (with the name hierarchy).

There is a set of specific link types used for links between actors in the accounts tree. For every existing actor's account (unique pair of name and currency), there is a dedicated link type.
Such link type name is a concatenation of two ID fields: <nameId>_<currencyId> (Learn more about account names, currencies)

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/edge_types/%7BaccId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create link type

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
accId
required
string

Workspace Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
name
string

Link type name

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

accounts

Actors accounts API

Get list of accounts by actor ID

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
actorId
required
string

Actor ID

query Parameters
accountType
string
Enum: "fact" "plan"

Type of account

incomeType
required
string
Enum: "debit" "credit"
from
integer
Example: from=1662471080000

Start timestamp point for result, in milliseconds

to
integer
Example: to=1662816684000

End timestamp point for result, in milliseconds

amountFrom
integer
Example: amountFrom=0

Minimum amount to filter accounts for

amountTo
integer
Example: amountTo=9999

Maximum amount to filter accounts for

tag
string
Example: tag=f5ec6878-f4d1-4d80-89a3-0f0e56f562f0

Tags (system form) actor ID to filter actor accounts

filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every account in response data. Don't pass this parameter to get full accounts' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/accounts/%7BactorId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create accounts by actor ID

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
actorId
required
string

Actor ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
accountType
string
Default: "fact"
Enum: "fact" "plan"
currencyId
required
integer

Currency ID from the list of available currencies

nameId
required
string

Name ID from the list of available account names

treeCalculation
boolean
Default: true

Flag to calculate account balance in accounts tree

search
boolean
Default: true

Flag if account transactions are searchable

minLimit
integer

Minimum allowed account balance after transaction

maxLimit
integer

Maximum allowed account balance after transaction

Responses

Request samples

Content type
application/json
{
  • "accountType": "fact",
  • "currencyId": 0,
  • "nameId": "string",
  • "treeCalculation": true,
  • "search": true,
  • "minLimit": 0,
  • "maxLimit": 0
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get actor's accounts by currency ID and name ID

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
actorId
required
string

Actor ID

currencyId
required
integer

Currency ID from the list of available currencies

nameId
required
string

Name ID from the list of available account names

query Parameters
accountType
string
Enum: "fact" "plan"

Type of account

incomeType
required
string
Enum: "debit" "credit"
filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every account in response data. Don't pass this parameter to get full accounts' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/accounts/%7BactorId%7D/%7BcurrencyId%7D/%7BnameId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get children accounts by actor ID

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
actorId
required
string

Parent actor ID

query Parameters
accountType
string
Enum: "fact" "plan"

Type of account

from
integer
Example: from=1662471080000

Start timestamp point for result, in milliseconds

to
integer
Example: to=1662816684000

End timestamp point for result, in milliseconds

filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every account in response data. Don't pass this parameter to get full accounts' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/accounts/children/%7BactorId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Remove accounts by actor ID

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
actorId
required
string

Actor ID

currencyId
required
integer

Currency ID from the list of available currencies

nameId
required
string

Name ID from the list of available account names

accountType
required
string
Enum: "fact" "plan"

Type of account

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request DELETE \
  --url https://api.simulator.company/v/1.0/accounts/%7BactorId%7D/%7BcurrencyId%7D/%7BnameId%7D/%7BaccountType%7D

Response samples

Content type
application/json
{
  • "data": "ok"
}

Block account by actor ID

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
actorId
required
string

Actor ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
nameId
required
string

Name ID from the list of available account names

currencyId
required
integer

Currency ID from the list of available currencies

type
required
string
Enum: "fact" "plan"

Account type

status
required
string
Enum: "active" "blocked"

Responses

Request samples

Content type
application/json
{
  • "nameId": "string",
  • "currencyId": 0,
  • "type": "fact",
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get single account by actor ref

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
formId
required
integer

Form ID

ref
required
string

Actor ref

query Parameters
nameId
required
string

Name ID from the list of available account names

currencyId
required
integer

Currency ID from the list of available currencies

accountType
string
Enum: "fact" "plan"

Type of account

incomeType
required
string
Enum: "debit" "credit"
filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every account in response data. Don't pass this parameter to get full accounts' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/accounts/single/ref/%7BformId%7D/%7Bref%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get list of accounts by actor ref

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
formId
required
integer

Form ID

ref
required
string

Actor ref

query Parameters
accountType
string
Enum: "fact" "plan"

Type of account

filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every account in response data. Don't pass this parameter to get full accounts' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/accounts/ref/%7BformId%7D/%7Bref%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create accounts by actor ref

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
formId
required
integer

Form ID

ref
required
string

Actor ref

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
accountType
string
Enum: "fact" "plan"

Account type

nameId
string

Name ID from the list of available account names

currencyId
integer

Currency ID from the list of available currencies

Responses

Request samples

Content type
application/json
{
  • "accountType": "fact",
  • "nameId": "string",
  • "currencyId": 0
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create account pair

Gives opportunity to create account pair with name and currency.

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
accId
required
string

Workspace Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
accountName
string

Name of the account to create

currencyName
string

Name of the currency to create

Responses

Request samples

Content type
application/json
{
  • "accountName": "string",
  • "currencyName": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get children accounts by actor ref

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
formId
required
integer

Form ID

ref
required
string

Actor ref

query Parameters
accountType
string
Enum: "fact" "plan"

Type of account

filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every account in response data. Don't pass this parameter to get full accounts' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/accounts/children/ref/%7BformId%7D/%7Bref%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Remove accounts by actor ref

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
formId
required
integer

Form ID

ref
required
string

Actor ref

currencyId
required
integer

Currency ID from the list of available currencies

nameId
required
string

Name ID from the list of available account names

accountType
required
string
Enum: "fact" "plan"

Type of account

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request DELETE \
  --url https://api.simulator.company/v/1.0/accounts/ref/%7BformId%7D/%7Bref%7D/%7BcurrencyId%7D/%7BnameId%7D/%7BaccountType%7D

Response samples

Content type
application/json
{
  • "data": "ok"
}

Get account by ID

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accountId
required
string

Account ID

query Parameters
filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every account in response data. Don't pass this parameter to get full accounts' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/accounts/single/%7BaccountId%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get accounts by array of IDs

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
query Parameters
from
integer
Example: from=1662471080000

Start timestamp point for result, in milliseconds

to
integer
Example: to=1662816684000

End timestamp point for result, in milliseconds

accountType
string
Enum: "fact" "plan"

Type of account

incomeType
required
string
Enum: "debit" "credit"
tag
string
Example: tag=f5ec6878-f4d1-4d80-89a3-0f0e56f562f0

Tags (system form) actor ID to filter actor accounts

amountFrom
integer
Example: amountFrom=0

Minimum amount to filter accounts for

amountTo
integer
Example: amountTo=9999

Maximum amount to filter accounts for

filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every account in response data. Don't pass this parameter to get full accounts' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
actors
Array of strings

array of actor IDs. [Max 20 actors]

Responses

Request samples

Content type
application/json
{
  • "actors": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Get account value info

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accountId
required
string

Account ID

query Parameters
filter
string
Example: filter=id,title,status,data.item_16357762770841362

Comma-separated list of fields we want to receive for every actor in response data. To add actor's form fields (data), specify every demanded field as data.item_16357762770841362. Don't pass this parameter to get full actors' info.

limit
integer
Default: 20

The total number of actors to retrieve (used with offset)

offset
integer
Default: 0

The number of rows to skip when fetching list

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/accounts/value/%7BaccountId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get accounts by array of actors refs

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
currencyId
required
integer

Currency ID from the list of available currencies

nameId
required
string

Name ID from the list of available account names

query Parameters
accountType
string
Enum: "fact" "plan"

Type of account

incomeType
string
Enum: "debit" "credit"
filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every account in response data. Don't pass this parameter to get full accounts' info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
Array of objects

array of actor Refs and formIds. [Max 200 actors]

Responses

Request samples

Content type
application/json
{
  • "actorsRefs": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Set account amount

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
accountId
required
string

Account ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
amount
required
integer

Amount to set to account

Responses

Request samples

Content type
application/json
{
  • "amount": 2000
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "ref": "string",
  • "accountId": "string",
  • "parentId": "string",
  • "userId": 0,
  • "type": "authorized",
  • "isDone": true,
  • "amount": 1000,
  • "commission": 0,
  • "comment": "string",
  • "originalDate": 0,
  • "actorId": "string",
  • "accountAmount": 2000,
  • "accountHoldAmount": 0,
  • "accountMinLimit": 0,
  • "accountMaxLimit": 0
}

Set account formula

'Scopes [control.events:actors.management]'

Supported functions syntax
sum(a, b, c, ...) - returns the sum of all the arguments passed
mean(a, b, c, ...) - returns a numeric value that is the arithmetic mean (average) of its arguments
Use account ID as an argument to calculate it's amount with formula.

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accountId
required
string

Account ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
formula
string Nullable

Formula for calculating account amount

Responses

Request samples

Content type
application/json
{
  • "formula": "sum({accountId_1},{accountId_2})/100"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get account formula info

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accountId
required
string

Account ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/accounts/formula_info/%7BaccountId%7D

Response samples

Content type
application/json
{
  • "data": {
    }
}

transactions

Transactions API

Get list of transactions by actor ID

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
actorId
required
string

Actor ID

query Parameters
currencyId
required
integer

Currency ID from the list of available currencies

nameId
required
string

Name ID from the list of available account names

accountType
string
Enum: "fact" "plan"

Type of account

incomeType
required
string
Enum: "debit" "credit"
onlyRoot
boolean
Default: true

Specify false to get child transactions

from
required
integer

Unixtime from which to receive items. If not specified, unixtime will be set to start of the month.

to
required
integer

Unixtime to which to receive items. If not specified, unixtime will be set to the end of the month.

limit
integer
Default: 50

The total number of rows to retrieve (used with offset)

offset
integer
Default: 0

The number of transactions to skip when fetching transaction history

filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every transaction in response data. Don't pass this parameter to get full transaction`s info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/transactions/%7BactorId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get list of transactions by actor ref

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
formId
required
integer

Form ID

actorRef
required
string

Actor ref

query Parameters
currencyId
required
integer

Currency ID from the list of available currencies

nameId
required
string

Name ID from the list of available account names

accountType
string
Enum: "fact" "plan"

Type of account

incomeType
required
string
Enum: "debit" "credit"
onlyRoot
boolean
Default: true

Specify false to get child transactions

from
required
integer

Unixtime from which to receive items. If not specified, unixtime will be set to start of the month.

to
required
integer

Unixtime to which to receive items. If not specified, unixtime will be set to the end of the month.

limit
integer
Default: 50

The total number of rows to retrieve (used with offset)

offset
integer
Default: 0

The number of transactions to skip when fetching transaction history

filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every transaction in response data. Don't pass this parameter to get full transaction`s info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/transactions/actor_ref/%7BformId%7D/%7BactorRef%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get list of transactions by account id

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accountId
required
string

Account ID

query Parameters
from
required
integer

Unixtime from which to receive items. If not specified, unixtime will be set to start of the month.

to
required
integer

Unixtime to which to receive items. If not specified, unixtime will be set to the end of the month.

limit
integer
Default: 50

The total number of rows to retrieve (used with offset)

offset
integer
Default: 0

The number of transactions to skip when fetching transaction history

filter
string
Example: filter=id,amount,incomeType ...

Comma-separated list of fields we want to receive for every transaction in response data. Don't pass this parameter to get full transaction`s info.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/transactions/list/%7BaccountId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get transaction by ref

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accountId
required
string

Account ID

ref
required
string <= 255 characters

Transaction ref

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/transactions/ref/%7BaccountId%7D/%7Bref%7D

Response samples

Content type
application/json
{
  • "id": "string",
  • "ref": "string",
  • "accountId": "string",
  • "parentId": "string",
  • "userId": 0,
  • "type": "authorized",
  • "isDone": true,
  • "amount": 0,
  • "commission": 0,
  • "comment": "string",
  • "originalDate": 0
}

Get child transactions

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
transactionId
required
string

Transaction ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/transactions/children/%7BtransactionId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create transaction

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
accountId
required
string

Actor's account ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
amount
required
integer

Transactions amount

comment
string

A comment for the transaction

ref
string <= 255 characters

A string value for making transactions API requests by ref (must be unique within an account)

originalDate
integer <unixtime>

The original date of the transaction

addValues
Array of strings

Array of actor Ids that will be added to the balance

delValues
Array of strings

Array of actor Ids that will be deleted from the balance

Responses

Request samples

Content type
application/json
{
  • "amount": 0,
  • "comment": "string",
  • "ref": "string",
  • "originalDate": 0,
  • "addValues": [
    ],
  • "delValues": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "ref": "string",
  • "accountId": "string",
  • "parentId": "string",
  • "userId": 0,
  • "type": "authorized",
  • "isDone": true,
  • "amount": 0,
  • "commission": 0,
  • "comment": "string",
  • "originalDate": 0
}

Create transactions (atomic)

Scopes [control.events:actors.management]

This API method ensures that every transaction is either explicitly committed or rolled back.

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
accId
required
string

Workspace Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json

List of transactions

Array ()
accountId
required
string

Actor's account ID

amount
required
integer

Transactions amount

comment
string

A comment for the transaction

ref
string <= 255 characters

A string value for making transactions API requests by ref (must be unique within an account)

originalDate
integer <unixtime>

The original date of the transaction

addValues
Array of strings

Array of actor Ids that will be added to the balance

delValues
Array of strings

Array of actor Ids that will be deleted from the balance

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": "1"
}

Authorize transaction (2-Step)

Scopes [control.events:actors.management]

This API supports two-step transactions, so you can first authorize, then wait to complete or cancel it later. Authorizing a transaction places a hold on the account for the specified amount.

Waiting for completion or cancellation can be limited with the expiration parameter for an authorized transaction. When the authorized transaction expires, the reversed transaction will be created automatically.

Save transaction ID, you will need it for a second step.

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
accountId
required
string

Actor's account ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
amount
required
number

Transaction amount

expiration
integer

UNIX timestamp when the authorized transaction expires

comment
string

A comment for the transaction

createdAt
integer

UNIX timestamp of the transaction (by default - current timestamp)

data
object

Some extra data of transaction

ref
string <= 255 characters

A string value for making transactions API requests by ref (must be unique within an account)

Responses

Request samples

Content type
application/json
{
  • "amount": 0,
  • "expiration": 0,
  • "comment": "string",
  • "createdAt": 0,
  • "data": { },
  • "ref": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "ref": "string",
  • "accountId": "string",
  • "parentId": "string",
  • "userId": 0,
  • "type": "authorized",
  • "isDone": true,
  • "amount": 0,
  • "commission": 0,
  • "comment": "string",
  • "originalDate": 0
}

Complete transaction (2-Step)

Scopes [control.events:actors.management]

You can complete transaction that was previously authorized (use its ID). This is the second half of the two-step transaction flow.

You cannot complete an authorized transaction that has been already canceled or expired.

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
accountId
required
string

Actor's account ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
parentId
required
number

The ID of authorized transaction to complete

amount
required
number

Final amount to complete transaction

comment
string

A comment for the transaction

createdAt
integer

UNIX timestamp of the transaction (by default - current timestamp)

data
object

Some extra data of transaction

ref
string <= 255 characters

A string value for making transactions API requests by ref (must be unique within an account)

Responses

Request samples

Content type
application/json
{
  • "parentId": 0,
  • "amount": 0,
  • "comment": "string",
  • "createdAt": 0,
  • "data": { },
  • "ref": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "ref": "string",
  • "accountId": "string",
  • "parentId": "string",
  • "userId": 0,
  • "type": "completed",
  • "isDone": true,
  • "amount": 0,
  • "commission": 0,
  • "comment": "string",
  • "originalDate": 0
}

Cancel transaction (2-Step)

Scopes [control.events:actors.management]

You can cancel transaction that was previously authorized (use its ID).

You cannot cancel an authorized transaction that has been already completed or expired.

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
accountId
required
string

Actor's account ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
parentId
required
number

The ID of authorized transaction to cancel

comment
string

A comment for the transaction

createdAt
integer

UNIX timestamp of the transaction (by default - current timestamp)

data
object

Some extra data of transaction

ref
string <= 255 characters

A string value for making transactions API requests by ref (must be unique within an account)

Responses

Request samples

Content type
application/json
{
  • "parentId": 0,
  • "comment": "string",
  • "createdAt": 0,
  • "data": { },
  • "ref": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "ref": "string",
  • "accountId": "string",
  • "parentId": "string",
  • "userId": 0,
  • "type": "canceled",
  • "isDone": true,
  • "amount": 0,
  • "commission": 0,
  • "comment": "string",
  • "originalDate": 0
}

transfers

Transfers API

Get transfer by id

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
transferId
required
string

Transfer ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/transfer/%7BtransferId%7D

Response samples

Content type
application/json
{
  • "id": "string",
  • "ref": "string",
  • "accId": "string",
  • "type": "string",
  • "userId": 0,
  • "comment": "string",
  • "declineReason": "string",
  • "createdAt": 0,
  • "transactions": [
    ],
  • "details": {
    }
}

Filter transfers

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
name
string

Link type name

from
object

Unixtime from which to receive items. If not specified, unixtime will be set to start of the month.

to
object

Unixtime to which to receive items. If not specified, unixtime will be set to the end of the month.

limit
number >= 1

The total number of transfers names to retrieve (used with offset)

offset
number >= 0

The number of rows to skip when fetching list

accountType
string

Account type

Array of objects

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "from": { },
  • "to": { },
  • "limit": 1,
  • "offset": 0,
  • "accountType": "string",
  • "accounts": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Create transfer

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
Array of objects

From

Array of objects

To

type
string
Default: "default"
Enum: "default" "finance"

For the finance type "from" should be a debit and all accounts "to" should be credit. Additionally, the amount should be positive for all accounts.

comment
string

Comment

Responses

Request samples

Content type
application/json
{
  • "from": [
    ],
  • "to": [
    ],
  • "type": "default",
  • "comment": "string"
}

Response samples

Content type
application/json
[
  • {
    }
]

account names

Accounts names API

Get account names

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace Id

query Parameters
withStats
boolean
Default: false

We strongly recommend including withStats=false in your requests, otherwise the performance of the method will be significantly reduced

limit
integer
Default: 20

The total number of account names to retrieve (used with offset)

offset
integer
Default: 0

The number of rows to skip when fetching list

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/account_names/%7BaccId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create account name

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
accId
required
string

Workspace Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
name
string
abbreviation
string <= 255 characters

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "abbreviation": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

currencies

Accounts currencies API

Get currencies

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace Id

query Parameters
withStats
boolean
Default: false

We strongly recommend including withStats=false in your requests, otherwise the performance of the method will be significantly reduced

limit
integer
Default: 20

The total number of currencies to retrieve (used with offset)

offset
integer
Default: 0

The number of rows to skip when fetching list

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/currencies/%7BaccId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create currency

Scopes [control.events:actors.management]

Authorizations:
OAuth2 (control.events:actors.management)
path Parameters
accId
required
string

Workspace Id

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
name
string

Currency name

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

access rules

Access rules API

Get access info

The scope depends on what object do you want to manage access to.

Object type Scope
formTemplate [control.events:forms.readonly]
actor [control.events:actors.readonly]
Authorizations:
OAuth2 (control.events:forms.readonlycontrol.events:actors.readonly)
path Parameters
objType
required
string
Enum: "formTemplate" "actor" "templateActors" "account"

Object type

objId
required
string

Object ID to get access info. For account use compound ID nameId_currencyId.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Responses

Request samples

curl --request GET \
  --url https://api.simulator.company/v/1.0/access_rules/%7BobjType%7D/%7BobjId%7D

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Manage access rules

The scope depends on what object do you want to manage access to.

Object type Scope
formTemplate [control.events:forms.management]
actor [control.events:actors.management]
Authorizations:
OAuth2 (control.events:actors.managementcontrol.events:actors.management)
path Parameters
objType
required
string
Enum: "formTemplate" "actor" "templateActors" "account"

Object type

objId
required
string

Object ID to share. For account use compound ID nameId_currencyId.

query Parameters
filterIncorrect
boolean
Default: false

If you pass true, the request will be successfully executed even if the user id in the user array contains a user id that is not in the workspace.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
Array ()
action
string
Enum: "create" "update" "delete"
object

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": [
    ]
}

counters

Create counters

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
Array ()
type
string
Enum: "counter" "uniqCounter"

Type

formId
number

Form ID

actorRef
string

Actor's ref

accountName
string

Account name

currency
string

Currency

incomeType
string
Enum: "debit" "credit"
amount
number

Amount

trsRef
string

Transfer ref

title
string

Actor title

data
object

Data for actor creation

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
[
  • {
    }
]

Get list of counters

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace ID

query Parameters
from
required
integer

Unixtime from which to receive items. If not specified, unixtime will be set to start of the month.

to
required
integer

Unixtime to which to receive items. If not specified, unixtime will be set to the end of the month.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
type
string
Enum: "counter" "uniqCounter"

Type

formId
number

Form ID

actorRef
string

Actor's ref

accountName
string

Account name

currency
string

Currency

incomeType
string
Enum: "debit" "credit"

Responses

Request samples

Content type
application/json
{
  • "type": "counter",
  • "formId": 0,
  • "actorRef": "string",
  • "accountName": "string",
  • "currency": "string",
  • "incomeType": "debit"
}

Response samples

Content type
application/json
[
  • {
    }
]

Get uniq counter value

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace ID

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
formId
number

Form ID

actorRef
string

Actor's ref

accountName
string

Account name

currency
string

Currency

incomeType
string
Enum: "debit" "credit"
trsRef
string

Transfer ref

Responses

Request samples

Content type
application/json
{
  • "formId": 0,
  • "actorRef": "string",
  • "accountName": "string",
  • "currency": "string",
  • "incomeType": "debit",
  • "trsRef": "string"
}

Response samples

Content type
application/json
[
  • {
    }
]

Get list of uniq counter values

Scopes [control.events:actors.readonly]

Authorizations:
OAuth2 (control.events:actors.readonly)
path Parameters
accId
required
string

Workspace ID

query Parameters
from
required
integer

Unixtime from which to receive items. If not specified, unixtime will be set to start of the month.

to
required
integer

Unixtime to which to receive items. If not specified, unixtime will be set to the end of the month.

header Parameters
Authorization
required
string

Authorization header. Bearer [AccessToken]

Request Body schema: application/json
formId
number

Form ID

actorRef
string

Actor's ref

accountName
string

Account name

currency
string

Currency

incomeType
string
Enum: "debit" "credit"

Responses

Request samples

Content type
application/json
{
  • "formId": 0,
  • "actorRef": "string",
  • "accountName": "string",
  • "currency": "string",
  • "incomeType": "debit"
}

Response samples

Content type
application/json
[
  • {
    }
]