openapi: 3.2.0 info: title: Weel Open Roles API version: v1 termsOfService: https://letsweel.com/terms/ contact: name: Contact our support email: help@letsweel.com url: https://help.letsweel.com description: 'The Weel OpenAPI empowers businesses with seamless expense management and real-time insights. Our platform makes it easy to integrate and automate expense workflows, manage receipts, and keep track of spending across your organization. ' servers: - url: https://public.letsweel.com security: - BearerAuth: [] tags: - name: Roles description: This group of endpoints allows you to retrieve the roles available within a business and the permissions assigned to each role. paths: /v1/businesses/{client_id}/roles: get: operationId: listRoles description: Returns the available roles that can be assigned to users within a business. tags: - Roles summary: List roles parameters: - $ref: '#/components/parameters/ClientId' - $ref: '#/components/parameters/PaginationOffset' - $ref: '#/components/parameters/PaginationLimit' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/RoleListResponse' '401': description: Unauthorized '403': description: Forbidden security: - BearerAuth: [] components: schemas: Permission: type: object required: - resource - action properties: resource: type: string description: The resource the action applies to. example: transactions action: type: string description: The action permitted on the resource. enum: - create - read - update - delete example: read RoleListResponse: type: object properties: count: type: integer description: The total number of roles for the business. example: 5 next: type: string description: The URL to the next page of roles. example: offset=50&limit=50 previous: type: string description: The URL to the previous page of roles. example: offset=0&limit=50 results: type: array items: $ref: '#/components/schemas/Role' Role: type: object required: - id - name - is_deletable - permissions properties: id: type: string format: uuid description: The ID of the role. example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 name: type: string description: The name of the role. example: Team Member is_deletable: type: boolean description: Whether the role can be deleted. example: false permissions: type: array items: $ref: '#/components/schemas/Permission' parameters: PaginationOffset: name: offset in: query description: Offset to retrieve items from. schema: type: integer default: 0 example: 50 ClientId: name: client_id in: path description: The ID of the business. required: true schema: type: integer example: 123 PaginationLimit: name: limit in: query description: Number of items per page. schema: type: integer default: 50 maximum: 500 example: 50 securitySchemes: BearerAuth: type: http scheme: bearer x-tagGroups: - name: Users tags: - Invites - Users - Roles - name: Transactions tags: - Transactions - name: Budgets tags: - Budgets - Budget Members - Budget Owners - Budget Topups - name: Statements tags: - Statements - name: Custom Fields tags: - Custom Fields - Custom Field Options - Custom Field Budgets - name: Chart of Accounts tags: - Accounting Codes - Categories