> For the complete documentation index, see [llms.txt](https://docs.b2b-sellers.com/b2b-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.b2b-sellers.com/b2b-platform/api-reference/store-api/employee-budgets.md).

# Employee Budgets

Employee Budgets addon

## POST /budget-period-types

> List budget period types

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"sw-context-token"}},"responses":{"BudgetPeriodTypeListResponse":{"openapi":"3.0.0","info":[],"paths":[],"components":{"responses":{"BudgetPeriodTypeListResponse":{"description":"Returns the list of budget period types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetPeriodTypeList"}}}}}}}},"schemas":{"BudgetPeriodTypeList":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"BudgetPeriodTypeList":{"properties":{"object":{"type":"array","items":{"$ref":"#/components/schemas/BudgetPeriodType"}}}}}}},"BudgetPeriodType":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"BudgetPeriodType":{"properties":{"name":{"type":"string"},"key":{"type":"string"}}}}}}}},"paths":{"/budget-period-types":{"post":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"List budget period types","responses":{"200":{"$ref":"#/components/responses/BudgetPeriodTypeListResponse"}}}}}}
```

## GET /b2b/employee-budget

> List employee budgets

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"paths":{"/b2b/employee-budget":{"get":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"List employee budgets","responses":{"200":{"$ref":"#/components/responses/BudgetListResponse"}}}}},"components":{"responses":{"BudgetListResponse":{"openapi":"3.0.0","info":[],"paths":[],"components":{"responses":{"BudgetListResponse":{"description":"Returns the list of budgets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetList"}}}}}}}},"schemas":{"BudgetList":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"BudgetList":{"properties":{"object":{"type":"array","items":{"$ref":"#/components/schemas/Budget"}}}}}}},"Budget":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"Budget":{"type":"object","properties":{"customerId":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"periodType":{"type":"string"},"sum":{"type":"number"},"periodUsed":{"type":"array"},"restrictedCategoryIds":{"type":"string"},"internalComment":{"type":"string"},"approvalEmployeeId":{"type":"string"},"notificationPercentage":{"type":"integer"},"creatorEmployeeId":{"type":"string"},"customer":{"$ref":"#/components/schemas/Customer"},"creatorEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"approvalEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"employees":{"$ref":"#/components/schemas/BudgetEmployeeList"},"budgetPeriodType":{"$ref":"#/components/schemas/BudgetPeriodType"},"isSufficient":{"type":"boolean"}}}}}},"BudgetPeriodType":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"BudgetPeriodType":{"properties":{"name":{"type":"string"},"key":{"type":"string"}}}}}}}}}
```

## GET /budget-approval-employees

> List employees

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"sw-context-token"}},"responses":{"ApprovalEmployeeListResponse":{"openapi":"3.0.0","info":[],"paths":[],"components":{"responses":{"ApprovalEmployeeListResponse":{"description":"Returns the list of budgets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySearchResult"}}}}}}}},"schemas":{}},"paths":{"/budget-approval-employees":{"get":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"List employees","responses":{"200":{"$ref":"#/components/responses/ApprovalEmployeeListResponse"}}}}}}
```

## Save a Budget

> This route is used to create a new Budget

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"paths":{"/budget":{"post":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"Save a Budget","description":"This route is used to create a new Budget","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}},"responses":{"200":{"description":"Returns a success response indicating a successful update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}}}}}},"components":{"schemas":{"Budget":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"Budget":{"type":"object","properties":{"customerId":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"periodType":{"type":"string"},"sum":{"type":"number"},"periodUsed":{"type":"array"},"restrictedCategoryIds":{"type":"string"},"internalComment":{"type":"string"},"approvalEmployeeId":{"type":"string"},"notificationPercentage":{"type":"integer"},"creatorEmployeeId":{"type":"string"},"customer":{"$ref":"#/components/schemas/Customer"},"creatorEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"approvalEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"employees":{"$ref":"#/components/schemas/BudgetEmployeeList"},"budgetPeriodType":{"$ref":"#/components/schemas/BudgetPeriodType"},"isSufficient":{"type":"boolean"}}}}}},"BudgetPeriodType":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"BudgetPeriodType":{"properties":{"name":{"type":"string"},"key":{"type":"string"}}}}}}}}}
```

## GET /budget/{id}

> Fetch a Budget

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"paths":{"/budget/{id}":{"get":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"Fetch a Budget","description":"","parameters":[{"in":"path","name":"BudgetId","description":"ID of a Budget","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/BudgetResponse"}}}}},"components":{"responses":{"BudgetResponse":{"openapi":"3.0.0","info":[],"paths":[],"components":{"responses":{"BudgetResponse":{"description":"Returns a budget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}}}}}},"schemas":{"Budget":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"Budget":{"type":"object","properties":{"customerId":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"periodType":{"type":"string"},"sum":{"type":"number"},"periodUsed":{"type":"array"},"restrictedCategoryIds":{"type":"string"},"internalComment":{"type":"string"},"approvalEmployeeId":{"type":"string"},"notificationPercentage":{"type":"integer"},"creatorEmployeeId":{"type":"string"},"customer":{"$ref":"#/components/schemas/Customer"},"creatorEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"approvalEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"employees":{"$ref":"#/components/schemas/BudgetEmployeeList"},"budgetPeriodType":{"$ref":"#/components/schemas/BudgetPeriodType"},"isSufficient":{"type":"boolean"}}}}}},"BudgetPeriodType":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"BudgetPeriodType":{"properties":{"name":{"type":"string"},"key":{"type":"string"}}}}}}}}}
```

## PUT /budget/{id}

> Update a Budget

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"paths":{"/budget/{id}":{"put":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"Update a Budget","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}},"parameters":[{"in":"path","name":"BudgetId","description":"ID of Budget","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a success response indicating a successful update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}}}}}},"components":{"schemas":{"Budget":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"Budget":{"type":"object","properties":{"customerId":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"periodType":{"type":"string"},"sum":{"type":"number"},"periodUsed":{"type":"array"},"restrictedCategoryIds":{"type":"string"},"internalComment":{"type":"string"},"approvalEmployeeId":{"type":"string"},"notificationPercentage":{"type":"integer"},"creatorEmployeeId":{"type":"string"},"customer":{"$ref":"#/components/schemas/Customer"},"creatorEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"approvalEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"employees":{"$ref":"#/components/schemas/BudgetEmployeeList"},"budgetPeriodType":{"$ref":"#/components/schemas/BudgetPeriodType"},"isSufficient":{"type":"boolean"}}}}}},"BudgetPeriodType":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"BudgetPeriodType":{"properties":{"name":{"type":"string"},"key":{"type":"string"}}}}}}}}}
```

## DELETE /budget/{id}

> Delete a Budget

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"paths":{"/budget/{id}":{"delete":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"Delete a Budget","parameters":[{"in":"path","name":"BudgetId","description":"ID of Budget","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a success response indicating a successful update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}}}}}},"components":{"schemas":{}}}
```

## PATCH /budget/{id}

> Update a Budget

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"paths":{"/budget/{id}":{"patch":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"Update a Budget","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Budget"}}}},"parameters":[{"in":"path","name":"BudgetId","description":"ID of Budget","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a success response indicating a successful update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessResponse"}}}}}}}},"components":{"schemas":{"Budget":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"Budget":{"type":"object","properties":{"customerId":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"periodType":{"type":"string"},"sum":{"type":"number"},"periodUsed":{"type":"array"},"restrictedCategoryIds":{"type":"string"},"internalComment":{"type":"string"},"approvalEmployeeId":{"type":"string"},"notificationPercentage":{"type":"integer"},"creatorEmployeeId":{"type":"string"},"customer":{"$ref":"#/components/schemas/Customer"},"creatorEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"approvalEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"employees":{"$ref":"#/components/schemas/BudgetEmployeeList"},"budgetPeriodType":{"$ref":"#/components/schemas/BudgetPeriodType"},"isSufficient":{"type":"boolean"}}}}}},"BudgetPeriodType":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"BudgetPeriodType":{"properties":{"name":{"type":"string"},"key":{"type":"string"}}}}}}}}}
```

## POST /budget/list

> List Budgets

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"sw-context-token"}},"schemas":{"BudgetList":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"BudgetList":{"properties":{"object":{"type":"array","items":{"$ref":"#/components/schemas/Budget"}}}}}}},"Budget":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"Budget":{"type":"object","properties":{"customerId":{"type":"string"},"name":{"type":"string"},"active":{"type":"boolean"},"periodType":{"type":"string"},"sum":{"type":"number"},"periodUsed":{"type":"array"},"restrictedCategoryIds":{"type":"string"},"internalComment":{"type":"string"},"approvalEmployeeId":{"type":"string"},"notificationPercentage":{"type":"integer"},"creatorEmployeeId":{"type":"string"},"customer":{"$ref":"#/components/schemas/Customer"},"creatorEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"approvalEmployee":{"$ref":"#/components/schemas/B2bSellersEmployee"},"employees":{"$ref":"#/components/schemas/BudgetEmployeeList"},"budgetPeriodType":{"$ref":"#/components/schemas/BudgetPeriodType"},"isSufficient":{"type":"boolean"}}}}}},"BudgetPeriodType":{"openapi":"3.0.0","info":[],"paths":[],"components":{"schemas":{"BudgetPeriodType":{"properties":{"name":{"type":"string"},"key":{"type":"string"}}}}}}},"responses":{"BudgetListResponse":{"openapi":"3.0.0","info":[],"paths":[],"components":{"responses":{"BudgetListResponse":{"description":"Returns the list of budgets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetList"}}}}}}}}},"paths":{"/budget/list":{"post":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"List Budgets","operationId":"EmployeeBudget","requestBody":{"required":false,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Criteria"}]}}}},"responses":{"200":{"$ref":"#/components/responses/BudgetListResponse"}}}}}}
```

## List Budget Orders

> Get all orders that use the specified budget

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"sw-context-token"}},"schemas":{"BudgetOrdersResponse":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/BudgetOrder"}},"total":{"type":"integer","description":"Total number of orders"}},"required":["orders","total"]},"BudgetOrder":{"type":"object","properties":{"id":{"type":"string","description":"Order ID"},"orderNumber":{"type":"string","description":"Order number"},"orderDate":{"type":"string","format":"date-time","description":"Order date"},"stateMachineState":{"$ref":"#/components/schemas/StateMachineState"},"currency":{"$ref":"#/components/schemas/Currency"},"totalPrice":{"type":"number","description":"Total order price"},"netPrice":{"type":"number","description":"Net order price"},"taxAmount":{"type":"number","description":"Tax amount"},"billingAddress":{"$ref":"#/components/schemas/OrderAddress"},"orderCustomer":{"$ref":"#/components/schemas/OrderCustomer"},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/OrderDelivery"}},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/OrderTransaction"}},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineItem"}},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"budgetData":{"$ref":"#/components/schemas/BudgetOrderData"}},"required":["id","orderNumber","orderDate","totalPrice","budgetData"]},"BudgetOrderData":{"type":"object","properties":{"budgetId":{"type":"string","description":"ID of the budget used"},"budgetLineItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineItem"},"description":"Line items that use this budget"},"budgetProductCount":{"type":"integer","description":"Number of products using this budget"},"totalProductCount":{"type":"integer","description":"Total number of products in the order"},"budgetValue":{"type":"number","description":"Total value of products using this budget"},"totalOrderValue":{"type":"number","description":"Total value of the entire order"},"budgetUsagePercentage":{"type":"number","description":"Percentage of order value that uses this budget"},"budgetProductRatio":{"type":"string","description":"Ratio of budget products to total products (e.g., '2/4')"}},"required":["budgetId","budgetProductCount","totalProductCount","budgetValue","totalOrderValue","budgetUsagePercentage","budgetProductRatio"]}}},"paths":{"/budget/{budgetId}/orders":{"get":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"List Budget Orders","description":"Get all orders that use the specified budget","parameters":[{"in":"path","name":"budgetId","description":"ID of the Budget","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a list of orders that use the specified budget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetOrdersResponse"}}}}}}}}}
```

## List Budget Orders with Criteria

> Get all orders that use the specified budget with search criteria

```json
{"openapi":"3.0.0","info":{"title":"B2Bsellers Suite API","version":"1.0.0"},"tags":[{"name":"StoreApi-B2bEmployeeBudgets","description":"Employee Budgets addon"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"sw-context-token"}},"schemas":{"BudgetOrdersResponse":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/BudgetOrder"}},"total":{"type":"integer","description":"Total number of orders"}},"required":["orders","total"]},"BudgetOrder":{"type":"object","properties":{"id":{"type":"string","description":"Order ID"},"orderNumber":{"type":"string","description":"Order number"},"orderDate":{"type":"string","format":"date-time","description":"Order date"},"stateMachineState":{"$ref":"#/components/schemas/StateMachineState"},"currency":{"$ref":"#/components/schemas/Currency"},"totalPrice":{"type":"number","description":"Total order price"},"netPrice":{"type":"number","description":"Net order price"},"taxAmount":{"type":"number","description":"Tax amount"},"billingAddress":{"$ref":"#/components/schemas/OrderAddress"},"orderCustomer":{"$ref":"#/components/schemas/OrderCustomer"},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/OrderDelivery"}},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/OrderTransaction"}},"lineItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineItem"}},"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"budgetData":{"$ref":"#/components/schemas/BudgetOrderData"}},"required":["id","orderNumber","orderDate","totalPrice","budgetData"]},"BudgetOrderData":{"type":"object","properties":{"budgetId":{"type":"string","description":"ID of the budget used"},"budgetLineItems":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineItem"},"description":"Line items that use this budget"},"budgetProductCount":{"type":"integer","description":"Number of products using this budget"},"totalProductCount":{"type":"integer","description":"Total number of products in the order"},"budgetValue":{"type":"number","description":"Total value of products using this budget"},"totalOrderValue":{"type":"number","description":"Total value of the entire order"},"budgetUsagePercentage":{"type":"number","description":"Percentage of order value that uses this budget"},"budgetProductRatio":{"type":"string","description":"Ratio of budget products to total products (e.g., '2/4')"}},"required":["budgetId","budgetProductCount","totalProductCount","budgetValue","totalOrderValue","budgetUsagePercentage","budgetProductRatio"]}}},"paths":{"/budget/{budgetId}/orders":{"post":{"tags":["StoreApi-B2bEmployeeBudgets"],"summary":"List Budget Orders with Criteria","description":"Get all orders that use the specified budget with search criteria","parameters":[{"in":"path","name":"budgetId","description":"ID of the Budget","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Criteria"}]}}}},"responses":{"200":{"description":"Returns a list of orders that use the specified budget","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetOrdersResponse"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.b2b-sellers.com/b2b-platform/api-reference/store-api/employee-budgets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
