---
updatedAt: 2026-05-14T14:32:15.000Z
agentTools:
  projectIndex: https://docs.oysterhr.com/v0.1/llms.txt
---

# Retrieve expenses rulesets

Retrieves the rulesets for expenses, which includes schemas and available sources.

- Use the `id` path parameter to fetch the specific ruleset (currently only EXPENSES_DEFAULT is supported).
- The rulesets include schemas for creating expenses and available sources like categories.

Typical use case:
- Retrieving rulesets when creating a new expense.


# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Endpoints",
    "version": "v0.1"
  },
  "components": {
    "securitySchemes": {
      "bearer_auth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/v0.1/expenses/rulesets/{id}": {
      "get": {
        "summary": "Retrieve expenses rulesets",
        "tags": [
          "Expenses"
        ],
        "description": "Retrieves the rulesets for expenses, which includes schemas and available sources.\n\n- Use the `id` path parameter to fetch the specific ruleset (currently only EXPENSES_DEFAULT is supported).\n- The rulesets include schemas for creating expenses and available sources like categories.\n\nTypical use case:\n- Retrieving rulesets when creating a new expense.\n",
        "security": [
          {
            "bearer_auth": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Ruleset ID (EXPENSES_DEFAULT)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful",
            "content": {
              "application/json": {
                "examples": {
                  "Successful": {
                    "value": {
                      "data": {
                        "rulesetId": "EXPENSES_DEFAULT",
                        "scope": {},
                        "schemas": {
                          "post": {
                            "type": "object",
                            "properties": {
                              "engagementId": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "^[\\w+\\-]{8,9}$"
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "description": {
                                "type": "string"
                              },
                              "incurredOn": {
                                "type": "string",
                                "format": "date",
                                "minLength": 1
                              },
                              "category": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "^[A-Z_]+$"
                              },
                              "receiptUrl": {
                                "type": "string",
                                "minLength": 1,
                                "pattern": "([a-zA-Z][\\-+.a-zA-Z\\d]*): (?# 1: scheme) (?: ((?:[\\-_.!~*'()a-zA-Z\\d;?:@&=+$,]|%[a-fA-F\\d]{2})(?:[\\-_.!~*'()a-zA-Z\\d;/?:@&=+$,\\[\\]]|%[a-fA-F\\d]{2})*) (?# 2: opaque) | (?:(?: //(?: (?:(?:((?:[\\-_.!~*'()a-zA-Z\\d;:&=+$,]|%[a-fA-F\\d]{2})*)@)? (?# 3: userinfo) (?:((?:(?:[a-zA-Z0-9\\-.]|%\\h\\h)+|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}|\\[(?:(?:[a-fA-F\\d]{1,4}:)*(?:[a-fA-F\\d]{1,4}|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})|(?:(?:[a-fA-F\\d]{1,4}:)*[a-fA-F\\d]{1,4})?::(?:(?:[a-fA-F\\d]{1,4}:)*(?:[a-fA-F\\d]{1,4}|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}))?)\\]))(?::(\\d*))?))? (?# 4: host, 5: port) | ((?:[\\-_.!~*'()a-zA-Z\\d$,;:@&=+]|%[a-fA-F\\d]{2})+) (?# 6: registry) ) | (?!//)) (?# XXX: '//' is the mark for hostport) (/(?:[\\-_.!~*'()a-zA-Z\\d:@&=+$,]|%[a-fA-F\\d]{2})*(?:;(?:[\\-_.!~*'()a-zA-Z\\d:@&=+$,]|%[a-fA-F\\d]{2})*)*(?:/(?:[\\-_.!~*'()a-zA-Z\\d:@&=+$,]|%[a-fA-F\\d]{2})*(?:;(?:[\\-_.!~*'()a-zA-Z\\d:@&=+$,]|%[a-fA-F\\d]{2})*)*)*)? (?# 7: path) )(?:\\?((?:[\\-_.!~*'()a-zA-Z\\d;/?:@&=+$,\\[\\]]|%[a-fA-F\\d]{2})*))? (?# 8: query) ) (?:\\#((?:[\\-_.!~*'()a-zA-Z\\d;/?:@&=+$,\\[\\]]|%[a-fA-F\\d]{2})*))? (?# 9: fragment)"
                              },
                              "pendingApproval": {
                                "type": "boolean"
                              },
                              "receiptAmount": {
                                "type": "object",
                                "properties": {
                                  "decimal": {
                                    "type": "string",
                                    "minLength": 1,
                                    "pattern": "^[0-9]+(\\.[0-9]{2,})?$"
                                  },
                                  "currencyCode": {
                                    "type": "string",
                                    "minLength": 1,
                                    "pattern": "^[A-Z]{3}$"
                                  }
                                },
                                "required": [
                                  "decimal",
                                  "currencyCode"
                                ]
                              }
                            },
                            "required": [
                              "engagementId",
                              "name",
                              "incurredOn",
                              "category",
                              "receiptUrl",
                              "receiptAmount"
                            ]
                          }
                        },
                        "sources": {
                          "categories": {
                            "params": {}
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.oysterhr.com",
      "description": "Production server"
    },
    {
      "url": "https://api-sandbox.oysterhr.com",
      "description": "Sandbox server"
    }
  ],
  "tags": [
    {
      "name": "Expenses",
      "description": "Expenses API allows you to remotely manage expenses of your team. \nApprove or decline a specific expense, get info about a specific expense or receive real-time information about all expenses."
    }
  ]
}
```