> For the complete documentation index, see [llms.txt](https://docs.flowretail.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flowretail.com/docs/developers/api-documentation/accounting-configs/create-a-new-accounting-configs-entry.md).

# Create a new accounting configs entry

**This endpoint is mostly legacy, and for internal use. We recommend to use the other endpoints to manage accounting information**

Creates a new accounting config entry for the supplied store

For configType `ACCOUNTNUMBER` is the following keys valid:

| Key                            | Description                                          |
| ------------------------------ | ---------------------------------------------------- |
| CUSTOMER                       | Account for customer                                 |
| CUSTOMERDUMMY                  | Dummy customer account                               |
| ERROR                          | Error account, if no valid account is found          |
| PARTYLYPAIDINVOICE             | Account for partyly paid invoices                    |
| VATCODE                        | Account for a specific tax type                      |
| CASHFLOAT\_DEPOSIT             | Deposit cash float into the cash register            |
| CASHFLOAT\_WITHDRAWAL          | Withdraw cash float from the cash register           |
| CASHFLOAT\_TO\_BANK            | Withdraw cash float and transfer it to the bank      |
| CASHFLOAT\_EXPENSE\_WITHDRAWAL | Withdraw cash float for expenses throughout the day. |
| CASHFLOAT\_DIFF                | Account for cash register till count discrepancies   |

For configType `TREATCODE` is the following keys valid:

| Key           | Description                        |
| ------------- | ---------------------------------- |
| CREDITLEDGER  | Used to credit notes               |
| GENERALLEDGER | Used for general ledger            |
| LEDGE         | Used for invoices and other ledger |
| PAYMENT       | Used for payment of invoices       |

For configType `VAT_TYPE_ID` is the following keys valid:

| Key     | Description                                                                        |
| ------- | ---------------------------------------------------------------------------------- |
| BALANCE |                                                                                    |
| VATCODE | Should have a vatCodeUid filled together with the TypeID for the specific VAT code |
| "       |                                                                                    |

Required permissions: ACCOUNTING\_CONFIG

```json
{"openapi":"3.0.2","info":{"title":"Flow Retail API version 2","version":"2.0.0"},"tags":[{"name":"AccountingConfigs","description":"AccountingConfigs"}],"servers":[{"description":"Flow Retail Production","url":"https://api.flowretail.com/v2"},{"description":"Flow Retail Stage","url":"https://api.stage.flowretail.com/v2"}],"security":[{"accessToken":[]},{"integrationToken":[]},{"authToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Access token recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"}},"schemas":{"AccountingConfigsSchema":{"title":"AccountingConfigsSchema","description":"Accounting configs model","type":"object","properties":{"accountingConfigsUid":{"type":"string"},"configType":{"$ref":"#/components/schemas/AccountingConfigTypeENUM"},"key":{"$ref":"#/components/schemas/AccountingConfigKeyENUM"},"vatCodeUid":{"type":"string"},"value":{"type":"string"}}},"AccountingConfigTypeENUM":{"enum":["ACCOUNTNUMBER","TREATCODE","VAT_TYPE_ID","PRODUCTGROUP"],"title":"AccountingConfigTypeENUM","type":"string"},"AccountingConfigKeyENUM":{"enum":["CUSTOMER","CUSTOMERDUMMY","ERROR","PARTLYPAIDINVOICE","CREDITLEDGER","GENERALLEDGER","LEDGER","BALANCE","VATCODE","PAYMENT","CASHFLOAT_DEPOSIT","CASHFLOAT_WITHDRAWAL","CASHFLOAT_TO_BANK","CASHFLOAT_EXPENSE_WITHDRAWAL","CASHFLOAT_DIFF","MARGIN_VAT_SALES","MARGIN_VAT"],"title":"AccountingConfigsConfigKeyEnums","type":"string"},"AccountingConfigsRequestSchema":{"title":"AccountingConfigsRequestSchema","description":"Accounting configs model\n\nvatCodeUid should always be filled when `key` is of type `VATCODE`","type":"object","properties":{"accountingConfigUid":{"$ref":"#/components/schemas/UID"},"configType":{"$ref":"#/components/schemas/AccountingConfigTypeENUM"},"key":{"$ref":"#/components/schemas/AccountingConfigKeyENUM"},"value":{"type":"string"},"vatCodeUid":{"$ref":"#/components/schemas/UID"}},"required":["configType","key","value"]},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"}},"requestBodies":{"AccountingConfigsRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingConfigsRequestSchema"}}},"description":"Request body for Accounting Configs"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/accountingConfigs":{"post":{"summary":"Create a new accounting configs entry","operationId":"post-accountingConfigs","responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingConfigsSchema"}}}}},"description":"**This endpoint is mostly legacy, and for internal use. We recommend to use the other endpoints to manage accounting information**\n\nCreates a new accounting config entry for the supplied store\n\nFor configType `ACCOUNTNUMBER` is the following keys valid:\nKey | Description \n---------|----------\n CUSTOMER | Account for customer  \n CUSTOMERDUMMY | Dummy customer account\n ERROR | Error account, if no valid account is found\n PARTYLYPAIDINVOICE | Account for partyly paid invoices\n VATCODE |Account for a specific tax type\n CASHFLOAT_DEPOSIT| Deposit cash float into the cash register\n CASHFLOAT_WITHDRAWAL | Withdraw cash float from the cash register\n CASHFLOAT_TO_BANK | Withdraw cash float and transfer it to the bank\n CASHFLOAT_EXPENSE_WITHDRAWAL | Withdraw cash float for expenses throughout the day.\n CASHFLOAT_DIFF | Account for cash register till count discrepancies\n\nFor configType `TREATCODE` is the following keys valid:\nKey | Description \n---------|----------\n CREDITLEDGER |  Used to credit notes\n GENERALLEDGER | Used for general ledger\n LEDGE | Used for invoices and other ledger\n PAYMENT | Used for payment of invoices\n\nFor configType `VAT_TYPE_ID` is the following keys valid:\nKey | Description \n---------|----------\n BALANCE |  \n VATCODE | Should have a vatCodeUid filled together with the TypeID for the specific VAT code\n\"\n\nRequired permissions: ACCOUNTING_CONFIG","requestBody":{"$ref":"#/components/requestBodies/AccountingConfigsRequest"},"tags":["AccountingConfigs"]}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flowretail.com/docs/developers/api-documentation/accounting-configs/create-a-new-accounting-configs-entry.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
