openapi: 3.2.0 info: version: 0.48.24 termsOfService: https://www.decisiv.com/terms-of-use contact: name: Decisiv Support email: support@decisiv.com url: https://www.decisiv.com title: Service Management Departments API description: The **Decisiv SRM Gateway** `Service Management` module provides the API functionality for managing an asset's case lifecycle from a Service Providers perspective. license: name: Proprietary identifier: proprietary url: https://www.decisiv.com/terms-of-use/ servers: - url: https://srm-api.staging.decisivapps.com - url: https://srm-api.decisivapps.com security: - OAuth2AuthorizationCode: [] AccessToken: [] - OAuth2Password: [] AccessToken: [] tags: - name: Departments paths: /service_management/{srm_account_id}/v1/departments: get: operationId: listDepartments summary: List all departments for the requested account description: Departments are dealer-defined categories identified by a dealer-scoped string code. Requires the `service_management:ReadDepartments` permission and is only available when the `Departments` feature is enabled for the account. Results are ordered by the department's configured position. tags: - Departments parameters: - name: srm_account_id in: path description: The account ID for SRM required: true schema: type: string - name: page[number] in: query required: false schema: type: integer default: 1 minimum: 1 description: Sets the desired `page` when encountering larger result sets - name: page[size] in: query required: false schema: type: integer default: 25 minimum: 1 description: Sets the desired maximum number of results per page responses: '200': description: Returns list of departments content: application/vnd.api+json: example: data: - id: SERVICE type: departments attributes: name: Service - id: BODY_SHOP type: departments attributes: name: Body Shop meta: record-count: 2 schema: $ref: '#/components/schemas/departments' '401': description: This response may occur when the access token provided within the Authorization token has expired. content: application/vnd.api+json: example: errors: - title: Access unauthorized detail: Access unauthorized code: decisiv::access_token:001 status: '401' schema: $ref: '#/components/schemas/errors_response' '403': description: The authenticated user does not have permission to access the requested resource or the feature is not enabled for the account. content: application/vnd.api+json: schema: $ref: '#/components/schemas/errors_response' examples: Forbidden: value: errors: - title: Forbidden detail: User does not have permission to perform this action on the requested resource(s) code: decisiv:access:001 status: '403' Feature unavailable: value: errors: - title: Feature unavailable detail: This feature is not enabled for the requested account code: decisiv:account:002 status: '403' '404': description: This response may occur when the requested resource is not found. content: application/vnd.api+json: example: errors: - title: Record not found detail: The requested record or one of its relationships could not be found code: '404' status: '404' schema: $ref: '#/components/schemas/errors_response' '504': description: This response may occur when there is an unexpected system timeout. content: application/vnd.api+json: example: errors: - code: '504' detail: Gateway timeout error status: '504' title: Gateway timeout error schema: $ref: '#/components/schemas/errors_response' components: schemas: department_properties-data: type: object properties: id: type: string description: 'The department code. Note: this is a dealer-scoped string code (e.g. "SERVICE"), not a UUID.' type: type: string enum: - departments attributes: type: object properties: name: type: string description: Name of the Department required: - attributes - type - id errors_response: type: object properties: errors: type: array items: $ref: '#/components/schemas/error_response' required: - errors error_response: type: object properties: status: type: string title: type: string detail: type: - string - 'null' code: type: - string - 'null' source: type: object properties: parameter: type: - string - 'null' pointer: type: - string - 'null' links: type: object description: Links related to this error (e.g. documentation reference). additionalProperties: type: string format: uri required: - status - title departments: type: object required: - data properties: data: type: array items: $ref: '#/components/schemas/department_properties-data' meta: type: object properties: record-count: type: integer description: Total count across all pages securitySchemes: AccessToken: type: http scheme: bearer bearerFormat: JWT OAuth2AuthorizationCode: type: oauth2 description: OAuth 2.0 Authorization Code flow. This is the required flow for new integrations. See https://api-docs.decisiv.net/docs/api/oauth/ flows: authorizationCode: authorizationUrl: https://login.decisiv.net/auth/api_gateway tokenUrl: https://login.decisiv.net/oauth/token refreshUrl: https://login.decisiv.net/oauth/token scopes: {} OAuth2Password: type: oauth2 description: '**Deprecated.** OAuth 2.0 Password flow. New integrations must use the Authorization Code flow (`OAuth2AuthorizationCode`); this flow remains available only during the migration window and will be removed in a future release. See https://api-docs.decisiv.net/docs/api/oauth/' flows: password: tokenUrl: https://login.decisiv.net/oauth/token scopes: {}