{
	"openapi": "3.0.0",
	"components": {
		"examples": {},
		"headers": {},
		"parameters": {},
		"requestBodies": {},
		"responses": {},
		"schemas": {
			"User": {
				"properties": {
					"emailVerified": {
						"type": "boolean"
					},
					"createdTimestamp": {
						"type": "number",
						"format": "double"
					},
					"email": {
						"type": "string"
					},
					"lastName": {
						"type": "string"
					},
					"firstName": {
						"type": "string"
					},
					"username": {
						"type": "string"
					},
					"id": {
						"type": "string"
					}
				},
				"required": [
					"email",
					"lastName",
					"firstName",
					"username",
					"id"
				],
				"type": "object"
			},
			"Group": {
				"properties": {
					"name": {
						"type": "string"
					},
					"id": {
						"type": "string"
					}
				},
				"required": [
					"name",
					"id"
				],
				"type": "object"
			},
			"UserResponse": {
				"properties": {
					"id": {
						"type": "string"
					},
					"firstName": {
						"type": "string"
					},
					"lastName": {
						"type": "string"
					},
					"email": {
						"type": "string"
					},
					"initials": {
						"type": "string"
					},
					"userRole": {
						"type": "string",
						"enum": [
							"certifiedAccountant",
							"auditResponsible",
							"auditEmployee",
							"accountingConsultant",
							"other"
						]
					},
					"createdTimestamp": {
						"type": "number",
						"format": "double",
						"description": "Format: double"
					},
					"isActive": {
						"type": "boolean"
					},
					"source": {
						"type": "string",
						"enum": [
							"USER",
							"GROUP",
							"ALL"
						]
					}
				},
				"required": [
					"id",
					"firstName",
					"lastName",
					"email",
					"createdTimestamp",
					"isActive",
					"source"
				],
				"type": "object"
			},
			"Module": {
				"enum": [
					"AUDIT",
					"ANALYTICS"
				],
				"type": "string"
			},
			"InviteUserData": {
				"properties": {
					"emails": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "list of user email addresses to invite"
					},
					"groupIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "optional list of groupIds to add invited user(s) to"
					},
					"modules": {
						"items": {
							"$ref": "#/components/schemas/Module"
						},
						"type": "array",
						"description": "optional list of modules to add to invited user(s)"
					}
				},
				"required": [
					"emails"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ClientCredentials": {
				"description": "FinancialYear objects describes a financial year",
				"properties": {
					"client_secret": {
						"type": "string"
					},
					"client_id": {
						"type": "string"
					}
				},
				"required": [
					"client_secret",
					"client_id"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateGroup": {
				"properties": {
					"name": {
						"type": "string"
					}
				},
				"required": [
					"name"
				],
				"type": "object"
			},
			"Company": {
				"properties": {
					"annualReportFramework": {
						"type": "string",
						"enum": [
							"K1",
							"K2",
							"K3",
							"RedR"
						]
					},
					"legalForm": {
						"type": "string",
						"enum": [
							"LIMITED_LIABILITY_COMPANY",
							"LIMITED_LIABILITY_BANK",
							"LIMITED_LIABILITY_INSURANCE",
							"SOLE_TRADER",
							"TRADING_PARTNERSHIP",
							"LIMITED_PARTNERSHIP",
							"ECONOMIC_ASSOCIATION",
							"CONDOMINIUM_ASSOCIATIONS",
							"COOPERATIVE_RENTED_APARTMENT_ASSOCIATION",
							"JOINED_OWNED_FIRM",
							"NON_PROFIT_ASSOCIATION",
							"COMMUNITY_ASSOCIATION",
							"REGISTERED_RELIGIOUS_COMMUNITY",
							"FOUNDATION",
							"MUNICIPALITY",
							"MUNICIPALITIES_FEDERATION",
							"COUNTY_COUNCIL",
							"SAVINGS_BANK",
							"FOREIGN_JURIDICAL_PERSON"
						]
					},
					"country": {
						"type": "string"
					},
					"defaultAccountPlan": {
						"type": "string"
					},
					"address": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"organizationNumber": {
						"type": "string"
					},
					"durableKey": {
						"type": "string"
					}
				},
				"required": [
					"defaultAccountPlan",
					"name",
					"organizationNumber",
					"durableKey"
				],
				"type": "object",
				"description": "Company objects describe a company"
			},
			"UUIDmd5": {
				"type": "string",
				"format": "uuid",
				"description": "Stringified UUID-like-MD5 hash",
				"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
			},
			"CompanyDurableKey": {
				"$ref": "#/components/schemas/UUIDmd5"
			},
			"CompanyCreateData": {
				"properties": {
					"annualReportFramework": {
						"type": "string",
						"enum": [
							"K1",
							"K2",
							"K3",
							"RedR"
						]
					},
					"legalForm": {
						"type": "string",
						"enum": [
							"LIMITED_LIABILITY_COMPANY",
							"LIMITED_LIABILITY_BANK",
							"LIMITED_LIABILITY_INSURANCE",
							"SOLE_TRADER",
							"TRADING_PARTNERSHIP",
							"LIMITED_PARTNERSHIP",
							"ECONOMIC_ASSOCIATION",
							"CONDOMINIUM_ASSOCIATIONS",
							"COOPERATIVE_RENTED_APARTMENT_ASSOCIATION",
							"JOINED_OWNED_FIRM",
							"NON_PROFIT_ASSOCIATION",
							"COMMUNITY_ASSOCIATION",
							"REGISTERED_RELIGIOUS_COMMUNITY",
							"FOUNDATION",
							"MUNICIPALITY",
							"MUNICIPALITIES_FEDERATION",
							"COUNTY_COUNCIL",
							"SAVINGS_BANK",
							"FOREIGN_JURIDICAL_PERSON"
						]
					},
					"country": {
						"type": "string",
						"enum": [
							"OTHER",
							"SWEDEN"
						]
					},
					"organizationNumber": {
						"type": "string"
					},
					"address": {
						"type": "string"
					},
					"name": {
						"type": "string"
					}
				},
				"required": [
					"annualReportFramework",
					"organizationNumber",
					"name"
				],
				"type": "object"
			},
			"CompanyCreate": {
				"properties": {
					"authorization": {
						"properties": {
							"groupIds": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"userIds": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"type": {
								"type": "number",
								"enum": [
									1,
									2,
									3,
									4
								]
							}
						},
						"required": [
							"groupIds",
							"userIds",
							"type"
						],
						"type": "object"
					},
					"data": {
						"$ref": "#/components/schemas/CompanyCreateData"
					}
				},
				"required": [
					"authorization",
					"data"
				],
				"type": "object"
			},
			"Pick_components-at-schemas_91_CompanyUpdateData_93_.Exclude_keyofcomponents-at-schemas_91_CompanyUpdateData_93_.isManual-or-industryId-or-externalSystemId-or-trusteeId-or-distributionType__": {
				"properties": {
					"name": {
						"type": "string"
					},
					"address": {
						"type": "string"
					},
					"organizationNumber": {
						"type": "string"
					},
					"country": {
						"type": "string",
						"enum": [
							"OTHER",
							"SWEDEN"
						]
					},
					"legalForm": {
						"type": "string",
						"enum": [
							"LIMITED_LIABILITY_COMPANY",
							"LIMITED_LIABILITY_BANK",
							"LIMITED_LIABILITY_INSURANCE",
							"SOLE_TRADER",
							"TRADING_PARTNERSHIP",
							"LIMITED_PARTNERSHIP",
							"ECONOMIC_ASSOCIATION",
							"CONDOMINIUM_ASSOCIATIONS",
							"COOPERATIVE_RENTED_APARTMENT_ASSOCIATION",
							"JOINED_OWNED_FIRM",
							"NON_PROFIT_ASSOCIATION",
							"COMMUNITY_ASSOCIATION",
							"REGISTERED_RELIGIOUS_COMMUNITY",
							"FOUNDATION",
							"MUNICIPALITY",
							"MUNICIPALITIES_FEDERATION",
							"COUNTY_COUNCIL",
							"SAVINGS_BANK",
							"FOREIGN_JURIDICAL_PERSON"
						]
					},
					"annualReportFramework": {
						"type": "string",
						"enum": [
							"K1",
							"K2",
							"K3",
							"RedR"
						]
					}
				},
				"type": "object",
				"description": "From T, pick a set of properties whose keys are in the union K"
			},
			"Omit_components-at-schemas_91_CompanyUpdateData_93_.isManual-or-industryId-or-externalSystemId-or-trusteeId-or-distributionType_": {
				"$ref": "#/components/schemas/Pick_components-at-schemas_91_CompanyUpdateData_93_.Exclude_keyofcomponents-at-schemas_91_CompanyUpdateData_93_.isManual-or-industryId-or-externalSystemId-or-trusteeId-or-distributionType__",
				"description": "Construct a type with the properties of T except for those in type K."
			},
			"CompanyUpdate": {
				"$ref": "#/components/schemas/Omit_components-at-schemas_91_CompanyUpdateData_93_.isManual-or-industryId-or-externalSystemId-or-trusteeId-or-distributionType_"
			},
			"CompanyExtendedAttributeResponse": {
				"properties": {
					"value": {
						"type": "string"
					},
					"attribute": {
						"type": "string"
					}
				},
				"required": [
					"value",
					"attribute"
				],
				"type": "object"
			},
			"CompanyExtendedAttributeChoice": {
				"enum": [
					"snicode",
					"workmateriality"
				],
				"type": "string"
			},
			"UpdateCompanyExtendedAttributes": {
				"properties": {
					"value": {
						"type": "integer",
						"format": "int32"
					}
				},
				"required": [
					"value"
				],
				"type": "object"
			},
			"GroupsAndUsers": {
				"properties": {
					"users": {
						"items": {
							"$ref": "#/components/schemas/User"
						},
						"type": "array"
					},
					"groups": {
						"items": {
							"$ref": "#/components/schemas/Group"
						},
						"type": "array"
					}
				},
				"required": [
					"users",
					"groups"
				],
				"type": "object"
			},
			"FinancialYear": {
				"description": "FinancialYear objects describes a financial year",
				"properties": {
					"id": {
						"type": "string"
					},
					"companyDurableKey": {
						"type": "string"
					},
					"startDate": {
						"type": "string",
						"example": "2022-01-01",
						"format": "date"
					},
					"endDate": {
						"type": "string",
						"example": "2022-12-31",
						"format": "date"
					}
				},
				"required": [
					"id",
					"companyDurableKey",
					"startDate",
					"endDate"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateFinancialYearResponse": {
				"properties": {
					"id": {
						"type": "string"
					},
					"startDate": {
						"type": "string",
						"example": "2022-01-01",
						"format": "date"
					},
					"endDate": {
						"type": "string",
						"example": "2022-12-31",
						"format": "date"
					}
				},
				"required": [
					"id",
					"startDate",
					"endDate"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateFinancialYear": {
				"properties": {
					"startDate": {
						"type": "string",
						"example": "2022-01-01",
						"format": "date"
					},
					"endDate": {
						"type": "string",
						"example": "2022-12-31",
						"format": "date"
					}
				},
				"required": [
					"startDate",
					"endDate"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FinancialYearId": {
				"$ref": "#/components/schemas/UUIDmd5"
			},
			"FileStatus": {
				"enum": [
					"uploaded",
					"pending",
					"parsed",
					"verified",
					"corrupt"
				],
				"type": "string"
			},
			"File": {
				"description": "File objects describes a file",
				"properties": {
					"id": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"uploadedByUserId": {
						"type": "string",
						"nullable": true
					},
					"status": {
						"$ref": "#/components/schemas/FileStatus"
					},
					"uploadedDate": {
						"type": "string",
						"format": "date-time"
					},
					"parsedDate": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					}
				},
				"required": [
					"id",
					"name",
					"uploadedByUserId",
					"status",
					"uploadedDate",
					"parsedDate"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AssignmentType": {
				"type": "string",
				"enum": [
					"AE",
					"ANALYSIS",
					"GN"
				]
			},
			"AssignmentStatus": {
				"type": "string",
				"enum": [
					"OPEN",
					"LOCKED",
					"ARCHIVED"
				]
			},
			"AssignmentSummary": {
				"properties": {
					"status": {
						"$ref": "#/components/schemas/AssignmentStatus"
					},
					"financialYearId": {
						"type": "string"
					},
					"subType": {
						"type": "string"
					},
					"type": {
						"$ref": "#/components/schemas/AssignmentType"
					},
					"id": {
						"type": "string"
					}
				},
				"required": [
					"status",
					"financialYearId",
					"subType",
					"type",
					"id"
				],
				"type": "object"
			},
			"AuditAssignmentWorkMateriality": {
				"properties": {
					"workMateriality": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "Format: double"
					},
					"workMaterialityPercentage": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "Format: double"
					}
				},
				"required": [
					"workMateriality",
					"workMaterialityPercentage"
				],
				"type": "object"
			},
			"UUIDv4": {
				"type": "string",
				"format": "uuid",
				"description": "Stringified UUIDv4\nSee [RFC 4122](https://tools.ietf.org/html/rfc4122)",
				"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
			},
			"AuditAssignmentId": {
				"$ref": "#/components/schemas/UUIDv4"
			}
		},
		"securitySchemes": {
			"access_token": {
				"type": "apiKey",
				"name": "access_token",
				"in": "query"
			}
		}
	},
	"info": {
		"title": "Senseworks-API",
		"version": "v1",
		"x-logo": {
			"url": "https://cdn.prod.website-files.com/652053ce99309414b4371553/67d3f80b311995427a0831f0_Api_Black.png",
			"altText": "S-API logo"
		}
	},
	"paths": {
		"/users": {
			"get": {
				"operationId": "GetUsers",
				"responses": {
					"200": {
						"description": "A list of users",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/User"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"id": "1",
												"username": "alexander@company.com",
												"firstName": "Alexander",
												"lastName": "Ögren",
												"email": "alexander@company.com",
												"emailVerified": true
											},
											{
												"id": "2",
												"username": "ida@company.com",
												"firstName": "Ida",
												"lastName": "Bohlin",
												"email": "ida@company.com",
												"emailVerified": true
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Retrieves all users in an organization",
				"summary": "Retrieve all users",
				"tags": [
					"Users"
				],
				"security": [],
				"parameters": [
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/users/{userId}": {
			"get": {
				"operationId": "GetUser",
				"responses": {
					"200": {
						"description": "A user.",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/User"
								},
								"examples": {
									"Example 1": {
										"value": {
											"id": "1",
											"username": "alexander@company.com",
											"firstName": "Alexander",
											"lastName": "Ögren",
											"email": "alexander@company.com",
											"emailVerified": true
										}
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a users details",
				"summary": "Retrieve user",
				"tags": [
					"Users"
				],
				"security": [],
				"parameters": [
					{
						"description": "the ID of the user",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "DeleteUser",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Deletes a user",
				"summary": "Delete user",
				"tags": [
					"Users"
				],
				"security": [],
				"parameters": [
					{
						"description": "the ID of the user",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/users/{userId}/groups": {
			"get": {
				"operationId": "GetUserGroups",
				"responses": {
					"200": {
						"description": "A user.",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/Group"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"id": "1",
												"name": "Umeåkontoret"
											},
											{
												"id": "2",
												"name": "Stockholmskontoret"
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a users group memberships",
				"summary": "Get users groups",
				"tags": [
					"Users"
				],
				"security": [],
				"parameters": [
					{
						"description": "the ID of the user",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/invitations": {
			"get": {
				"operationId": "RetrievePendingUserInvitations",
				"responses": {
					"200": {
						"description": "A list of user invited users",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/User"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Retrieves pending user invitations in an organization",
				"summary": "Retrieve pending users",
				"tags": [
					"Users"
				],
				"security": [],
				"parameters": [
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateUserInvitation",
				"responses": {
					"200": {
						"description": "A list of created users",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/UserResponse"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": {
											"emails": [
												"alexander@senseworks.io",
												"ida@senseworks.io"
											],
											"groupIds": [
												"group-1",
												"group-2"
											]
										}
									}
								}
							}
						}
					}
				},
				"description": "Creates users, sends invitation mails and optionally adds them to groups",
				"summary": "Create user invitations",
				"tags": [
					"Users"
				],
				"security": [],
				"parameters": [
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/InviteUserData"
							}
						}
					}
				}
			}
		},
		"/invitations/{userId}": {
			"delete": {
				"operationId": "DeleteUserInvitation",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Deletes a pending user in an organization",
				"summary": "Delete pending user",
				"tags": [
					"Users"
				],
				"security": [],
				"parameters": [
					{
						"description": "the ID of the user",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/invitations/{userId}/resend": {
			"post": {
				"operationId": "ResendUserInvitationMail",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Re-sends invitation mail to a user",
				"summary": "Re-send invitation mail",
				"tags": [
					"Users"
				],
				"security": [],
				"parameters": [
					{
						"description": "the ID of the user",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/token": {
			"post": {
				"operationId": "PostToken",
				"responses": {
					"200": {
						"description": "An access token",
						"content": {
							"application/json": {
								"schema": {
									"type": "string"
								}
							}
						}
					}
				},
				"description": "Acquires an access token using Client Credentials flow",
				"summary": "Acquire access token",
				"tags": [
					"Tokens"
				],
				"security": [],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ClientCredentials"
							}
						}
					}
				}
			}
		},
		"/groups": {
			"get": {
				"operationId": "GetGroups",
				"responses": {
					"200": {
						"description": "groups under the current tenant",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"$ref": "#/components/schemas/Group"
										},
										{
											"items": {
												"$ref": "#/components/schemas/Group"
											},
											"type": "array"
										}
									]
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"id": "1",
												"name": "Umeåkontoret"
											},
											{
												"id": "2",
												"name": "Stockholmskontoret"
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "List all groups in an organization",
				"summary": "List groups",
				"tags": [
					"Groups"
				],
				"security": [],
				"parameters": [
					{
						"description": "optional; search other tenants than your default",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateGroup",
				"responses": {
					"200": {
						"description": "the created group",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Group"
								},
								"examples": {
									"Example 1": {
										"value": {
											"id": "1",
											"name": "Umeåkontoret"
										}
									}
								}
							}
						}
					}
				},
				"description": "Creates a group",
				"summary": "Create group",
				"tags": [
					"Groups"
				],
				"security": [],
				"parameters": [
					{
						"description": "Optional; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateGroup"
							}
						}
					}
				}
			}
		},
		"/groups/{name}": {
			"get": {
				"operationId": "GetGroup",
				"responses": {
					"200": {
						"description": "a group",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Group"
								},
								"examples": {
									"Example 1": {
										"value": {
											"id": "1",
											"name": "Umeåkontoret"
										}
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a groups details",
				"summary": "Retrieve group",
				"tags": [
					"Groups"
				],
				"security": [],
				"parameters": [
					{
						"description": "the exact name of the group",
						"in": "path",
						"name": "name",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/groups/{groupId}": {
			"delete": {
				"operationId": "DeleteGroup",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Deletes a group",
				"summary": "Delete group",
				"tags": [
					"Groups"
				],
				"security": [],
				"parameters": [
					{
						"description": "the ID of the group",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/groups/{groupId}/members": {
			"get": {
				"operationId": "GetGroupMembers",
				"responses": {
					"200": {
						"description": "a list of group members",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/User"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"id": "1",
												"username": "alexander@company.com",
												"firstName": "Alexander",
												"lastName": "Ögren",
												"email": "alexander@company.com",
												"emailVerified": true
											},
											{
												"id": "2",
												"username": "ida@company.com",
												"firstName": "Ida",
												"lastName": "Bohlin",
												"email": "ida@company.com",
												"emailVerified": true
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Lists members of a group",
				"summary": "List group members",
				"tags": [
					"Groups"
				],
				"security": [],
				"parameters": [
					{
						"description": "the ID of the group",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/groups/{groupId}/members/{userId}": {
			"put": {
				"operationId": "AddGroupMembers",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Adds a member to a group",
				"summary": "Add group member",
				"tags": [
					"Groups"
				],
				"security": [],
				"parameters": [
					{
						"description": "the ID of the group",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "the ID of the user",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "RemoveGroupMembers",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Removes a member from a group",
				"summary": "Remove group member",
				"tags": [
					"Groups"
				],
				"security": [],
				"parameters": [
					{
						"description": "the ID of the group",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "the ID of the user",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies": {
			"get": {
				"operationId": "GetCompanies",
				"responses": {
					"200": {
						"description": "A list of companies",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/Company"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"durableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"organizationNumber": "123456-7890",
												"name": "Restaurant XY",
												"country": "SWEDEN",
												"legalForm": "LIMITED_LIABILITY_COMPANY",
												"annualReportFramework": "K2",
												"defaultAccountPlan": "e72841a7-22c3-4c92-a0c2-394332562dcb"
											},
											{
												"durableKey": "8f270588-82ab-47fa-886b-3930ef3d9d2e",
												"organizationNumber": "123456-7891",
												"name": "Consultancy ZW",
												"country": "SWEDEN",
												"legalForm": "LIMITED_LIABILITY_COMPANY",
												"annualReportFramework": "K2",
												"defaultAccountPlan": "e72841a7-22c3-4c92-a0c2-394332562dcb"
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a list of all companies",
				"summary": "Retrieve all companies",
				"tags": [
					"Companies"
				],
				"security": [],
				"parameters": [
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "PostCompany",
				"responses": {
					"200": {
						"description": "The created company",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Company"
								},
								"examples": {
									"Example 1": {
										"value": {
											"durableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
											"organizationNumber": "123456-7890",
											"name": "Restaurant XY",
											"country": "SWEDEN",
											"legalForm": "LIMITED_LIABILITY_COMPANY",
											"annualReportFramework": "K2",
											"defaultAccountPlan": "e72841a7-22c3-4c92-a0c2-394332562dcb"
										}
									}
								}
							}
						}
					}
				},
				"description": "Creates a company",
				"summary": "Create company",
				"tags": [
					"Companies"
				],
				"security": [],
				"parameters": [
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CompanyCreate"
							}
						}
					}
				}
			}
		},
		"/companies/{companyDurableKey}": {
			"get": {
				"operationId": "GetCompany",
				"responses": {
					"200": {
						"description": "A company",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Company"
								},
								"examples": {
									"Example 1": {
										"value": {
											"durableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
											"organizationNumber": "123456-7890",
											"name": "Restaurant XY",
											"country": "SWEDEN",
											"legalForm": "LIMITED_LIABILITY_COMPANY",
											"annualReportFramework": "K2",
											"defaultAccountPlan": "e72841a7-22c3-4c92-a0c2-394332562dcb",
											"extendedAttributes": {
												"SNI": "1",
												"workMateriality": "2"
											}
										}
									}
								}
							}
						}
					},
					"404": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"message": {
											"type": "string"
										}
									},
									"required": [
										"message"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Retrieves a company based on durable key",
				"summary": "Retrieve company",
				"tags": [
					"Companies"
				],
				"security": [],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "PutCompany",
				"responses": {
					"200": {
						"description": "The updated company",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Company"
								},
								"examples": {
									"Example 1": {
										"value": {
											"durableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
											"organizationNumber": "123456-7890",
											"name": "Restaurant XY",
											"country": "SWEDEN",
											"legalForm": "LIMITED_LIABILITY_COMPANY",
											"annualReportFramework": "K2",
											"defaultAccountPlan": "e72841a7-22c3-4c92-a0c2-394332562dcb"
										}
									}
								}
							}
						}
					}
				},
				"description": "Updates a company",
				"summary": "Update company",
				"tags": [
					"Companies"
				],
				"security": [],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CompanyUpdate"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteCompany",
				"responses": {
					"200": {
						"description": "The deleted company",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/Company"
								},
								"examples": {
									"Example 1": {
										"value": {
											"durableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
											"organizationNumber": "123456-7890",
											"name": "Restaurant XY",
											"country": "SWEDEN",
											"legalForm": "LIMITED_LIABILITY_COMPANY",
											"annualReportFramework": "K2",
											"defaultAccountPlan": "e72841a7-22c3-4c92-a0c2-394332562dcb"
										}
									}
								}
							}
						}
					}
				},
				"description": "Deletes a company",
				"summary": "Delete company",
				"tags": [
					"Companies"
				],
				"security": [],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/{companyExtendedAttribute}": {
			"put": {
				"operationId": "CompanySettings",
				"responses": {
					"200": {
						"description": "The updated company extended attribute",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/CompanyExtendedAttributeResponse"
								}
							}
						}
					},
					"404": {
						"description": "",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"message": {
											"type": "string"
										}
									},
									"required": [
										"message"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Updates a company extended attribute",
				"summary": "Updates extended attribute",
				"tags": [
					"Companies"
				],
				"security": [],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"in": "path",
						"name": "companyExtendedAttribute",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyExtendedAttributeChoice"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateCompanyExtendedAttributes"
							}
						}
					}
				}
			}
		},
		"/companies/{companyDurableKey}/permissions": {
			"get": {
				"operationId": "GetCompanyAccess",
				"responses": {
					"200": {
						"description": "The list of users that has access to the company",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/GroupsAndUsers"
								},
								"examples": {
									"Example 1": {
										"value": {
											"groups": [
												{
													"id": "1",
													"name": "Umeåkontoret"
												},
												{
													"id": "2",
													"name": "Stockholmskontoret"
												}
											],
											"users": [
												{
													"id": "1",
													"username": "alexander@company.com",
													"firstName": "Alexander",
													"lastName": "Ögren",
													"email": "alexander@company.com",
													"emailVerified": true
												},
												{
													"id": "2",
													"username": "ida@company.com",
													"firstName": "Ida",
													"lastName": "Bohlin",
													"email": "ida@company.com",
													"emailVerified": true
												}
											]
										}
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a list of users and groups that has access to a company",
				"summary": "Get company access list",
				"tags": [
					"Permissions"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company to retrieve permissions from",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/permissions/users/{userId}": {
			"put": {
				"operationId": "AddUserCompanyAccess",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Grants user acess to a company",
				"summary": "Grant access for user",
				"tags": [
					"Permissions"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company to retrieve permissions from",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The ID of the user",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "RemoveUserCompanyAccess",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Revokes user access from a company",
				"summary": "Revoke access for user",
				"tags": [
					"Permissions"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company to retrieve permissions from",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The ID of the user",
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/{companyDurableKey}/permissions/groups/{groupId}": {
			"put": {
				"operationId": "AddGroupCompanyAccess",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Grants group access to a company",
				"summary": "Grant access for group",
				"tags": [
					"Permissions"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company to retrieve permissions from",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The ID of the group",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "RemoveGroupCompanyAccess",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Revokes group access from a company.",
				"summary": "Revoke access for group",
				"tags": [
					"Permissions"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company to retrieve permissions from",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The ID of the group",
						"in": "path",
						"name": "groupId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/financialyears/{companyDurableKey}": {
			"get": {
				"operationId": "GetFinancialYears",
				"responses": {
					"200": {
						"description": "A list of financial years",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/FinancialYear"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"id": "a5c2e4ed-8765-4f9b-bb4a-74da77ebe6dd",
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"startDate": "2022-01-01",
												"endDate": "2022-12-31"
											},
											{
												"id": "7f8362e6-9cbf-4a55-8480-823a0f8d7d6e",
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"startDate": "2023-01-01",
												"endDate": "2023-12-31"
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a list of financial years for a company (Deprecated)",
				"summary": "Retrieve company financial years",
				"tags": [
					"FinancialYears"
				],
				"deprecated": true,
				"security": [],
				"parameters": [
					{
						"description": "The durable key for the company to retrieve financial years from",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/company/{companyDurableKey}/financialyears": {
			"get": {
				"operationId": "GetFinancialYears",
				"responses": {
					"200": {
						"description": "A list of financial years",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/FinancialYear"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"id": "a5c2e4ed-8765-4f9b-bb4a-74da77ebe6dd",
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"startDate": "2022-01-01",
												"endDate": "2022-12-31"
											},
											{
												"id": "7f8362e6-9cbf-4a55-8480-823a0f8d7d6e",
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"startDate": "2023-01-01",
												"endDate": "2023-12-31"
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a list of financial years for a company",
				"summary": "Retrieve company financial years",
				"tags": [
					"FinancialYears"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key for the company to retrieve financial years from",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "PostFinancialYear",
				"responses": {
					"200": {
						"description": "The created financial year",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/CreateFinancialYearResponse"
								},
								"examples": {
									"Example 1": {
										"value": {
											"startDate": "2022-01-01",
											"endDate": "2022-12-31"
										}
									}
								}
							}
						}
					}
				},
				"description": "Creates a financial year",
				"summary": "Create company financial year",
				"tags": [
					"FinancialYears"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key for the company where to create a financial year",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateFinancialYear"
							}
						}
					}
				}
			}
		},
		"/company/{companyDurableKey}/financialyears/{financialYearId}": {
			"delete": {
				"operationId": "DeleteFinancialYear",
				"responses": {
					"200": {
						"description": "The deleted financial year",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/FinancialYear"
								},
								"examples": {
									"Example 1": {}
								}
							}
						}
					}
				},
				"description": "Deletes a financial year",
				"summary": "Delete company financial year",
				"tags": [
					"FinancialYears"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key for the company where the financial year exists",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The ID of the financial year to delete",
						"in": "path",
						"name": "financialYearId",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/FinancialYearId"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/company/{companyDurableKey}/files/upload": {
			"post": {
				"operationId": "PostFile",
				"responses": {
					"200": {
						"description": "File information",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/File"
								},
								"examples": {
									"Example 1": {
										"value": {
											"id": "2683c647-51e1-454a-9c48-84b719274be3",
											"name": "file.txt",
											"uploadedByUserId": "alexander@company.com",
											"status": "pending",
											"uploadedDate": "2023-01-01T00:00:00.000Z",
											"parsedDate": "2023-01-01T00:00:00.000Z"
										}
									}
								}
							}
						}
					}
				},
				"description": "Uploads a file",
				"summary": "Upload file",
				"tags": [
					"Files"
				],
				"security": [],
				"parameters": [
					{
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"in": "query",
						"name": "startDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "endDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "financialYearId",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/FinancialYearId"
						}
					},
					{
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"multipart/form-data": {
							"schema": {
								"type": "object",
								"properties": {
									"file": {
										"type": "string",
										"format": "binary"
									}
								},
								"required": [
									"file"
								]
							}
						}
					}
				}
			}
		},
		"/company/{companyDurableKey}/assignments": {
			"get": {
				"operationId": "GetAuditAssignments",
				"responses": {
					"200": {
						"description": "A list of audit assignments for the specified financial year, or all assignments for the company if no financial year is provided",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/AssignmentSummary"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"id": "1f2a4c7e-3b6b-4d0a-9a9b-1b2c3d4e5f6a",
												"type": "AE",
												"subType": "SA",
												"financialYearId": "a5c2e4ed-8765-4f9b-bb4a-74da77ebe6dd",
												"status": "OPEN"
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Retrieves audit assignments for a financial year and company, or all assignments for the company when no financial year is specified.",
				"summary": "Retrieve audit assignments for a company",
				"tags": [
					"Assignments"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "Optional ID of the financial year; when omitted, all assignments for the company are returned",
						"in": "query",
						"name": "financialYearId",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/FinancialYearId"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/company/{companyDurableKey}/assignments/{auditAssignmentId}/work-materiality": {
			"get": {
				"operationId": "GetAuditAssignmentWorkMateriality",
				"responses": {
					"200": {
						"description": "Work materiality for the audit assignment",
						"content": {
							"application/json": {
								"schema": {
									"allOf": [
										{
											"$ref": "#/components/schemas/AuditAssignmentWorkMateriality"
										}
									],
									"nullable": true
								},
								"examples": {
									"Example 1": {
										"value": {
											"workMaterialityPercentage": 85,
											"workMateriality": 12500
										}
									}
								}
							}
						}
					}
				},
				"description": "Retrieves work materiality for an audit assignment.",
				"summary": "Retrieve audit assignment work materiality",
				"tags": [
					"Assignments"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The ID of the audit assignment",
						"in": "path",
						"name": "auditAssignmentId",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/AuditAssignmentId"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/generalledger/balances/{companyDurableKey}/calculated/month": {
			"get": {
				"operationId": "GetMonthly",
				"responses": {
					"200": {
						"description": "A list of calculated monthly balances based on the relevant openening balances and transactions",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"properties": {
											"amounts": {
												"items": {
													"properties": {
														"balance": {
															"type": "number",
															"format": "double",
															"description": "Format: double"
														},
														"amount": {
															"type": "number",
															"format": "double",
															"description": "Format: double"
														},
														"month": {
															"type": "string"
														},
														"financialYearId": {
															"type": "string"
														}
													},
													"required": [
														"balance",
														"amount",
														"month",
														"financialYearId"
													],
													"type": "object"
												},
												"type": "array"
											},
											"accountName": {
												"type": "string"
											},
											"accountNumber": {
												"type": "string"
											},
											"accountType": {
												"type": "string"
											},
											"companyDurableKey": {
												"type": "string"
											}
										},
										"required": [
											"amounts",
											"accountName",
											"accountNumber",
											"accountType",
											"companyDurableKey"
										],
										"type": "object"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"accountType": "Result Account",
												"accountNumber": "1930",
												"accountName": "Sales in Sweden, 25% VA",
												"amounts": [
													{
														"financialYearId": "1",
														"month": "2019-01",
														"amount": 1545.45,
														"balance": 1532.67
													},
													{
														"financialYearId": "1",
														"month": "2019-02",
														"amount": 10,
														"balance": 1542.67
													}
												]
											},
											{
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"accountType": "Balance Account",
												"accountNumber": "3001",
												"accountName": "Sales outside the EU",
												"amounts": [
													{
														"financialYearId": "1",
														"month": "2019-01",
														"amount": 1545.45,
														"balance": 1532.67
													},
													{
														"financialYearId": "1",
														"month": "2019-02",
														"amount": 10,
														"balance": 1542.67
													}
												]
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a list of monthly balances for a company based on startDate and endDate.\nCalculated based on the transactions in the SIE files for a all financial years between startDate and endDate.\nE.g. if FY2019: 20190101-20191231 and FY2021: 20210101-20211231: startDate=20190601 and endDate=20210901\nwill return the full set of monthly balances from 2019-01 to 2021-12 and startDate=19990101 and endDate=20200901\nwill return the monthly balances from 2019-01 to 2020-12.",
				"summary": "Retrieve calculated, monthly account balances based dates",
				"tags": [
					"Balances"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "A date within, before or after an financial year. Will be used to determine the starting financial year of the list",
						"in": "query",
						"name": "startDate",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A date within, before or after an financial year. Will be used to determine the last financial year of the list",
						"in": "query",
						"name": "endDate",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/generalledger/balances/{companyDurableKey}/fy/{financialYearId}/calculated/month": {
			"get": {
				"operationId": "GetMonthlyPerFinancialYear",
				"responses": {
					"200": {
						"description": "A list of calculated monthly balances based on the relevant openening balances and transactions.",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"properties": {
											"amounts": {
												"items": {
													"properties": {
														"balance": {
															"type": "number",
															"format": "double",
															"description": "Format: double"
														},
														"amount": {
															"type": "number",
															"format": "double",
															"description": "Format: double"
														},
														"month": {
															"type": "string"
														},
														"financialYearId": {
															"type": "string"
														}
													},
													"required": [
														"balance",
														"amount",
														"month",
														"financialYearId"
													],
													"type": "object"
												},
												"type": "array"
											},
											"accountName": {
												"type": "string"
											},
											"accountNumber": {
												"type": "string"
											},
											"accountType": {
												"type": "string"
											},
											"companyDurableKey": {
												"type": "string"
											}
										},
										"required": [
											"amounts",
											"accountName",
											"accountNumber",
											"accountType",
											"companyDurableKey"
										],
										"type": "object"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"accountType": "Result Account",
												"accountNumber": "1930",
												"accountName": "Sales in Sweden, 25% VA",
												"amounts": [
													{
														"financialYearId": "1",
														"month": "2019-01",
														"amount": 1545.45,
														"balance": 1532.67
													},
													{
														"financialYearId": "1",
														"month": "2019-02",
														"amount": 10,
														"balance": 1542.67
													}
												]
											},
											{
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"accountType": "Balance Account",
												"accountNumber": "3001",
												"accountName": "Sales outside the EU",
												"amounts": [
													{
														"financialYearId": "1",
														"month": "2019-01",
														"amount": 1545.45,
														"balance": 1532.67
													},
													{
														"financialYearId": "1",
														"month": "2019-02",
														"amount": 10,
														"balance": 1542.67
													}
												]
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a list of monthly balances for a specific financial year and company, calculated from the opening balances and monthly transactions specified in the SIE file for each financial year",
				"summary": "Retrieve calculated, monthly account balances for financial year",
				"tags": [
					"Balances"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The ID of the financial year",
						"in": "path",
						"name": "financialYearId",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/FinancialYearId"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/generalledger/balances/{companyDurableKey}/openclosing/year": {
			"get": {
				"operationId": "GetYearly",
				"responses": {
					"200": {
						"description": "A list of open and closing balances for all accounts.",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"properties": {
											"closingBalancePreviousYear": {
												"type": "number",
												"format": "double",
												"description": "Format: double"
											},
											"openingBalancePreviousYear": {
												"type": "number",
												"format": "double",
												"description": "Format: double"
											},
											"closingBalanceCurrentYear": {
												"type": "number",
												"format": "double",
												"description": "Format: double"
											},
											"openingBalanceCurrentYear": {
												"type": "number",
												"format": "double",
												"description": "Format: double"
											},
											"accountName": {
												"type": "string"
											},
											"accountNumber": {
												"type": "string"
											},
											"accountType": {
												"type": "string"
											},
											"endDate": {
												"type": "string",
												"description": "Format: date-time"
											},
											"startDate": {
												"type": "string",
												"description": "Format: date-time"
											},
											"financialYearId": {
												"type": "string"
											},
											"companyDurableKey": {
												"type": "string"
											}
										},
										"required": [
											"closingBalancePreviousYear",
											"openingBalancePreviousYear",
											"closingBalanceCurrentYear",
											"openingBalanceCurrentYear",
											"accountName",
											"accountNumber",
											"accountType",
											"endDate",
											"startDate",
											"financialYearId",
											"companyDurableKey"
										],
										"type": "object"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"financialYearId": "1",
												"startDate": "2019-01-01",
												"endDate": "2019-01-31",
												"accountType": "Result Account",
												"accountNumber": "1930",
												"accountName": "Sales in Sweden, 25% VAT",
												"openingBalanceCurrentYear": 0,
												"closingBalanceCurrentYear": 3900,
												"openingBalancePreviousYear": 0,
												"closingBalancePreviousYear": 45838.79
											},
											{
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"financialYearId": "1",
												"startDate": "2019-01-01",
												"endDate": "2019-01-31",
												"accountType": "Balance Account",
												"accountNumber": "3001",
												"accountName": "Sales outside the EU",
												"openingBalanceCurrentYear": 0,
												"closingBalanceCurrentYear": 0,
												"openingBalancePreviousYear": 0,
												"closingBalancePreviousYear": 0
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a list of open and closing balances for a company based on startDate and endDate.\nCalculated based on the opening and closing balances specified in the SIE files for all financial years between startDate and endDate.\nE.g. if FY2019: 20190101-20191231 and FY2021: 20210101-20211231: startDate=20190601 and endDate=20210901\nwill return the full set of open and closing balances from 2019-01 to 2021-12 and startDate=19990101 and endDate=20200901\nwill return the open and closing balances from 2019-01 to 2020-12.",
				"summary": "Retrieve Open/Closing balances based on dates",
				"tags": [
					"Balances"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company.",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "A date within, before or after an financial year. Will be used to determine the starting financial year of the list.",
						"in": "query",
						"name": "startDate",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "A date within, before or after an financial year. Will be used to determine the last financial year of the list.",
						"in": "query",
						"name": "endDate",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/generalledger/balances/{companyDurableKey}/fy/{financialYearId}/openclosing/year": {
			"get": {
				"operationId": "GetYearlyPerFinancialYear",
				"responses": {
					"200": {
						"description": "A list of open and closing balances for all accounts.",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"properties": {
											"closingBalancePreviousYear": {
												"type": "number",
												"format": "double",
												"description": "Format: double"
											},
											"openingBalancePreviousYear": {
												"type": "number",
												"format": "double",
												"description": "Format: double"
											},
											"closingBalanceCurrentYear": {
												"type": "number",
												"format": "double",
												"description": "Format: double"
											},
											"openingBalanceCurrentYear": {
												"type": "number",
												"format": "double",
												"description": "Format: double"
											},
											"accountName": {
												"type": "string"
											},
											"accountNumber": {
												"type": "string"
											},
											"accountType": {
												"type": "string"
											},
											"endDate": {
												"type": "string",
												"description": "Format: date-time"
											},
											"startDate": {
												"type": "string",
												"description": "Format: date-time"
											},
											"financialYearId": {
												"type": "string"
											},
											"companyDurableKey": {
												"type": "string"
											}
										},
										"required": [
											"closingBalancePreviousYear",
											"openingBalancePreviousYear",
											"closingBalanceCurrentYear",
											"openingBalanceCurrentYear",
											"accountName",
											"accountNumber",
											"accountType",
											"endDate",
											"startDate",
											"financialYearId",
											"companyDurableKey"
										],
										"type": "object"
									},
									"type": "array"
								},
								"examples": {
									"Example 1": {
										"value": [
											{
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"financialYearId": "1",
												"startDate": "2019-01-01",
												"endDate": "2019-01-31",
												"accountType": "Result Account",
												"accountNumber": "1930",
												"accountName": "Sales in Sweden, 25% VAT",
												"openingBalanceCurrentYear": 0,
												"closingBalanceCurrentYear": 3900,
												"openingBalancePreviousYear": 0,
												"closingBalancePreviousYear": 45838.79
											},
											{
												"companyDurableKey": "9e2a5409-1dbb-4eba-90fd-8d47d8d7f950",
												"financialYearId": "1",
												"startDate": "2019-01-01",
												"endDate": "2019-01-31",
												"accountType": "Balance Account",
												"accountNumber": "3001",
												"accountName": "Sales outside the EU",
												"openingBalanceCurrentYear": 0,
												"closingBalanceCurrentYear": 0,
												"openingBalancePreviousYear": 0,
												"closingBalancePreviousYear": 0
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Retrieves a list of open and closing balances for a company based on the opening and closing balances specified in the SIE file for each financial year.",
				"summary": "Retrieve Open/Closing balances for financial year",
				"tags": [
					"Balances"
				],
				"security": [],
				"parameters": [
					{
						"description": "The durable key of the company.",
						"in": "path",
						"name": "companyDurableKey",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/CompanyDurableKey"
						}
					},
					{
						"description": "The ID of the financial year.",
						"in": "path",
						"name": "financialYearId",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/FinancialYearId"
						}
					},
					{
						"description": "optional tenantId; defaults to current tenant",
						"in": "query",
						"name": "tenantId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		}
	},
	"servers": [
		{
			"url": "https://api.senseworks.app/v1"
		}
	],
	"tags": [
		{
			"name": "Documentation",
			"description": "Senseworks API is organized around REST. This means that we've designed it to have resource-oriented URLs and to be as predictable as possible for you as a developer.<H3>Rate limiter</H3>The rate limit is 750 requests per IP address per 15-minute window, per API instance. Requests exceeding the limit receive HTTP 429.<H3>Authenticating</H3>To access the API you need to use the ClientID and ClientSecret credentials supplied to you from Senseworks. With these credentials you can obtain an access token through our token endpoint."
		}
	],
	"x-tagGroups": [
		{
			"name": "Documentation",
			"tags": [
				"Documentation"
			]
		},
		{
			"name": "API",
			"tags": [
				"Tokens",
				"Companies",
				"Users",
				"Groups",
				"Permissions",
				"FinancialYears",
				"Assignments",
				"Balances",
				"Files"
			]
		}
	]
}