openapi: 3.0.3 info: version: '1.0' title: Company authorization fiscal-years API description: The Bokio Company API containing all resources for company tenant. termsOfService: https://docs.bokio.se/page/terms/ contact: name: Bokio url: https://docs.bokio.se email: support@bokio.se servers: - url: https://api.bokio.se/v1 description: Bokio API x-bokio-api: true security: - tokenAuth: [] tags: - name: fiscal-years description: Operations for managing fiscal years paths: /companies/{companyId}/fiscal-years: parameters: - name: companyId in: path required: true description: The unique identifier for the company schema: type: string format: uuid example: 123e4567-e89b-12d3-a456-426614174000 get: tags: - fiscal-years summary: Get fiscal years description: 'Get all fiscal years for the company. Use the query parameters to filter and navigate through the results. **Scope:** `fiscal-years:read` ' operationId: get-fiscal-years parameters: - name: page in: query required: false description: Page number schema: type: integer format: int32 default: 1 - name: pageSize in: query required: false description: Number of items per page schema: type: integer format: int32 default: 25 maximum: 100 - name: query in: query required: false description: 'Optional query to filter the data set with supported fields listed below and [available operations](filtering). | Field | Type | | -------------------- | ----------- | | startDate | date | | endDate | date | | accountingMethod | string | | status | string | ' schema: type: string example: status==open responses: '200': description: Successful response with fiscal years content: application/json: schema: allOf: - $ref: '#/components/schemas/pagedResponse' - type: object properties: items: type: array items: oneOf: - $ref: '#/components/schemas/fiscalYear' security: - tokenAuth: [] /companies/{companyId}/fiscal-years/{fiscalYearId}: parameters: - name: companyId in: path required: true description: The unique identifier for the company schema: type: string format: uuid example: 123e4567-e89b-12d3-a456-426614174000 - name: fiscalYearId in: path required: true description: The unique identifier for the fiscal year schema: type: string format: uuid example: fd5cf0c4-d68f-48d7-b01d-ed478c268d9e get: tags: - fiscal-years summary: Get a fiscal year description: 'Retrieve the information of the fiscal year with the matching fiscalYearId **Scope:** `fiscal-years:read` ' operationId: get-fiscal-year-with-id responses: '200': description: Successful response with fiscal year information content: application/json: schema: type: object properties: fiscalYear: $ref: '#/components/schemas/fiscalYear' '404': description: Fiscal year not found content: application/json: schema: $ref: '#/components/schemas/apiError' example: code: not-found message: Fiscal year not found bokioErrorId: 9b408943-7a1e-47ac-85a7-ac52b2c210d3 security: - tokenAuth: [] components: schemas: apiError: type: object title: apiError properties: code: type: string message: type: string bokioErrorId: type: string format: uuid errors: type: array items: type: object properties: field: type: string message: type: string pagedResponse: type: object title: pagedResponse properties: totalItems: type: integer format: int32 example: 1 totalPages: type: integer format: int32 example: 1 currentPage: type: integer format: int32 example: 1 fiscalYear: title: Fiscal Year type: object required: - id - startDate - endDate - accountingMethod properties: id: type: string format: uuid description: Unique identifier for the fiscal year startDate: type: string format: date description: The start date of the fiscal year endDate: type: string format: date description: The end date of the fiscal year accountingMethod: type: string enum: - cash - accrual description: The accounting method used by the fiscal year status: type: string enum: - open - closed description: The status of the fiscal year example: id: 123e4567-e89b-12d3-a456-426614174000 startDate: 2023-01-01 endDate: 2023-12-31 accountingMethod: accrual status: open securitySchemes: tokenAuth: type: http scheme: bearer access_token: type: oauth2 flows: clientCredentials: tokenUrl: /token scopes: {} authorizationCode: authorizationUrl: /authorize tokenUrl: /token scopes: bank-payments:read-limited: Read access to bank payments created by the integration bank-payments:write: Write access to bank payments chart-of-accounts:read: Read access to chart of accounts company-information:read: Read access to company information credit-notes:read: Read access to credit notes credit-notes:write: Write access to credit notes customers:read: Read access to customers customers:write: Write access to customers fiscal-years:read: Read access to fiscal years invoices:read: Read access to invoices invoices:write: Write access to invoices items:read: Read access to items items:write: Write access to items journal-entries:read: Read access to journal entries journal-entries:write: Write access to journal entries sie:read: Read access to SIE files supplier-invoices:read: Read access to supplier invoices supplier-invoices:write: Write access to supplier invoices suppliers:read: Read access to suppliers suppliers:write: Write access to suppliers tags:read: Read access to tag groups and tags tags:write: Write access to tag groups and tags uploads:read: Read access to uploads uploads:write: Write access to uploads client_auth: type: http scheme: basic externalDocs: url: https://docs.bokio.se description: Read the API Documentation x-readme: explorer-enabled: true proxy-enabled: false samples-languages: - shell - http - node - csharp - java