# AccountingConfigs

AccountingConfigs

## List accounting configs entries

> Lists all accounting configs entries belonging to the supplied store

```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":[{"authToken":[]},{"accessToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"accountingConfigsListResponse":{"description":"Response containing a list of accounting configs entries","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AccountingConfigsResponseSchema"}},"paging":{"$ref":"#/components/schemas/Paging"}}}}}}},"schemas":{"AccountingConfigsResponseSchema":{"title":"AccountingConfigsResponseSchema","description":"Accounting configs model","type":"object","required":["accountingConfigsUid","configType","key","value","vatCodeUid","productGroupUid"],"properties":{"accountingConfigsUid":{"type":"string"},"configType":{"$ref":"#/components/schemas/AccountingConfigTypeENUM"},"key":{"$ref":"#/components/schemas/AccountingConfigKeyENUM"},"value":{"type":"string"},"vatCodeUid":{"$ref":"#/components/schemas/OptionalUID"},"productGroupUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AccountingConfigTypeENUM":{"enum":["ACCOUNTNUMBER","TREATCODE","VAT_TYPE_ID","PRODUCTGROUP"],"title":"AccountingConfigTypeENUM","type":"string"},"AccountingConfigKeyENUM":{"enum":["CUSTOMER","CUSTOMERDUMMY","ERROR","PARTLYPAIDINVOICE","CREDITLEDGER","GENERALLEDGER","LEDGER","BALANCE","VATCODE"],"title":"AccountingConfigsConfigKeyEnums","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"Paging":{"description":"totalCount The total number of items in the result set.\n\npageSize The number of items per page.\n\npageNumber The current page in the result set.","properties":{"pageNumber":{"type":"integer"},"pageSize":{"type":"integer"},"totalCount":{"type":"integer"}},"required":["totalCount","pageSize","pageNumber"],"title":"Paging","type":"object"},"SortDirectionENUM":{"description":"|ENUM      | Description |\n| ---------------- | ------------ |\n| ASC | Sort in ascending order|\n| DESC | Sort in descending order|\n","enum":["ASC","DESC"],"title":"SortDirectionENUM","type":"string"}},"parameters":{"pageNumberQuery":{"description":"Reference to a specific page in a result set.","in":"query","name":"pageNumber","required":false,"schema":{"type":"integer"}},"pageSizeQuery":{"description":"The number of items per page in a result set.","in":"query","name":"pageSize","required":false,"schema":{"type":"integer"}},"sortByQuery":{"description":"Defines which field the resource list is sorted by.","in":"query","name":"sortBy","required":false,"schema":{"type":"string"}},"sortDirectionQuery":{"description":"Reference to a sort direction","explode":false,"in":"query","name":"sortDirection","schema":{"$ref":"#/components/schemas/SortDirectionENUM"},"style":"form"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/accountingConfigs":{"get":{"description":"Lists all accounting configs entries belonging to the supplied store","operationId":"list-accountingConfigs","responses":{"200":{"$ref":"#/components/responses/accountingConfigsListResponse"}},"summary":"List accounting configs entries","parameters":[{"$ref":"#/components/parameters/pageNumberQuery"},{"$ref":"#/components/parameters/pageSizeQuery"},{"$ref":"#/components/parameters/sortByQuery"},{"$ref":"#/components/parameters/sortDirectionQuery"}],"tags":["AccountingConfigs"]}}}}
```

## Create a new accounting configs entry

> Creates a new accounting config entry for the supplied store\
> \
> For configType \`ACCOUNTNUMBER\` is the following keys valid:\
> Key | Description \
> \---------|----------\
> &#x20;CUSTOMER | Account for customer  \
> &#x20;CUSTOMERDUMMY | Dummy customer account\
> &#x20;ERROR | Error account, if no valid account is found\
> &#x20;PARTYLYPAIDINVOICE | Account for partyly paid invoices\
> &#x20;VATCODE | Account for a specific tax type\
> \
> For configType \`TREATCODE\` is the following keys valid:\
> Key | Description \
> \---------|----------\
> &#x20;CREDITLEDGER |  \
> &#x20;GENERALLEDGER | \
> &#x20;LEDGE | \
> \
> For configType \`VAT\_TYPE\_ID\` is the following keys valid:\
> Key | Description \
> \---------|----------\
> &#x20;BALANCE |  \
> &#x20;VATCODE | Should have a vatCodeUid filled together with the TypeID for the specific VAT code<br>

```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":[{"authToken":[]},{"accessToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"integrationToken":{"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"],"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":"Creates 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\nFor configType `TREATCODE` is the following keys valid:\nKey | Description \n---------|----------\n CREDITLEDGER |  \n GENERALLEDGER | \n LEDGE | \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","requestBody":{"$ref":"#/components/requestBodies/AccountingConfigsRequest"},"tags":["AccountingConfigs"]}}}}
```

## Get accounting configs entry

> Get accounting configs entry for the supplied accountingConfigsUid

```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":[{"authToken":[]},{"accessToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"AccountingConfigsResponse":{"description":"Response body containing a accounting config entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingConfigsResponseSchema"}},"application/xml":{"schema":{"type":"object","properties":{}}}}}},"schemas":{"AccountingConfigsResponseSchema":{"title":"AccountingConfigsResponseSchema","description":"Accounting configs model","type":"object","required":["accountingConfigsUid","configType","key","value","vatCodeUid","productGroupUid"],"properties":{"accountingConfigsUid":{"type":"string"},"configType":{"$ref":"#/components/schemas/AccountingConfigTypeENUM"},"key":{"$ref":"#/components/schemas/AccountingConfigKeyENUM"},"value":{"type":"string"},"vatCodeUid":{"$ref":"#/components/schemas/OptionalUID"},"productGroupUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AccountingConfigTypeENUM":{"enum":["ACCOUNTNUMBER","TREATCODE","VAT_TYPE_ID","PRODUCTGROUP"],"title":"AccountingConfigTypeENUM","type":"string"},"AccountingConfigKeyENUM":{"enum":["CUSTOMER","CUSTOMERDUMMY","ERROR","PARTLYPAIDINVOICE","CREDITLEDGER","GENERALLEDGER","LEDGER","BALANCE","VATCODE"],"title":"AccountingConfigsConfigKeyEnums","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/accountingConfigs/{accountingConfigUid}":{"get":{"description":"Get accounting configs entry for the supplied accountingConfigsUid","operationId":"get-accountingConfigs","responses":{"200":{"$ref":"#/components/responses/AccountingConfigsResponse"}},"summary":"Get accounting configs entry","parameters":[],"tags":["AccountingConfigs"]}}}}
```

## Update accounting config entry

> Updates the accounting configs entry belonging to the supplied accountingConfigsUid

```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":[{"authToken":[]},{"accessToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"requestBodies":{"AccountingConfigsUpdateRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingConfigsUpdateSchema"}}}}},"schemas":{"AccountingConfigsUpdateSchema":{"title":"AccountingConfigsUpdateSchema","description":"","type":"object","required":["value"],"properties":{"value":{"type":"string"}}},"AccountingConfigsResponseSchema":{"title":"AccountingConfigsResponseSchema","description":"Accounting configs model","type":"object","required":["accountingConfigsUid","configType","key","value","vatCodeUid","productGroupUid"],"properties":{"accountingConfigsUid":{"type":"string"},"configType":{"$ref":"#/components/schemas/AccountingConfigTypeENUM"},"key":{"$ref":"#/components/schemas/AccountingConfigKeyENUM"},"value":{"type":"string"},"vatCodeUid":{"$ref":"#/components/schemas/OptionalUID"},"productGroupUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AccountingConfigTypeENUM":{"enum":["ACCOUNTNUMBER","TREATCODE","VAT_TYPE_ID","PRODUCTGROUP"],"title":"AccountingConfigTypeENUM","type":"string"},"AccountingConfigKeyENUM":{"enum":["CUSTOMER","CUSTOMERDUMMY","ERROR","PARTLYPAIDINVOICE","CREDITLEDGER","GENERALLEDGER","LEDGER","BALANCE","VATCODE"],"title":"AccountingConfigsConfigKeyEnums","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"}},"responses":{"AccountingConfigsResponse":{"description":"Response body containing a accounting config entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingConfigsResponseSchema"}},"application/xml":{"schema":{"type":"object","properties":{}}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/accountingConfigs/{accountingConfigUid}":{"put":{"description":"Updates the accounting configs entry belonging to the supplied accountingConfigsUid","operationId":"put-accountingConfigs","requestBody":{"$ref":"#/components/requestBodies/AccountingConfigsUpdateRequest"},"responses":{"200":{"$ref":"#/components/responses/AccountingConfigsResponse"}},"summary":"Update accounting config entry","tags":["AccountingConfigs"]}}}}
```

## Delete accounting config entry

> Deletes the accounting configs entry belonging the supplied accountingConfigsUid

```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":[{"authToken":[]},{"accessToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/accountingConfigs/{accountingConfigUid}":{"delete":{"description":"Deletes the accounting configs entry belonging the supplied accountingConfigsUid","operationId":"delete-accountingConfigs","responses":{"204":{"description":""}},"summary":"Delete accounting config entry","parameters":[],"tags":["AccountingConfigs"]}}}}
```

## Create a new productgroup account mapping

> Add a account number to a specific product group.\
> This account number will be used for all products with the specified vatcode in the specific product group and all children

```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":[]},{"authToken":[]},{"integrationToken":[]}],"components":{"securitySchemes":{"accessToken":{"description":"Accesstoken recevied after user login with a deviceToken","scheme":"bearer","type":"http"},"authToken":{"description":"Token received from the auth service","scheme":"bearer","type":"http"},"integrationToken":{"scheme":"bearer","type":"http"}},"responses":{"AccountingConfigsResponse":{"description":"Response body containing a accounting config entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingConfigsResponseSchema"}},"application/xml":{"schema":{"type":"object","properties":{}}}}}},"schemas":{"AccountingConfigsResponseSchema":{"title":"AccountingConfigsResponseSchema","description":"Accounting configs model","type":"object","required":["accountingConfigsUid","configType","key","value","vatCodeUid","productGroupUid"],"properties":{"accountingConfigsUid":{"type":"string"},"configType":{"$ref":"#/components/schemas/AccountingConfigTypeENUM"},"key":{"$ref":"#/components/schemas/AccountingConfigKeyENUM"},"value":{"type":"string"},"vatCodeUid":{"$ref":"#/components/schemas/OptionalUID"},"productGroupUid":{"$ref":"#/components/schemas/OptionalUID"}}},"AccountingConfigTypeENUM":{"enum":["ACCOUNTNUMBER","TREATCODE","VAT_TYPE_ID","PRODUCTGROUP"],"title":"AccountingConfigTypeENUM","type":"string"},"AccountingConfigKeyENUM":{"enum":["CUSTOMER","CUSTOMERDUMMY","ERROR","PARTLYPAIDINVOICE","CREDITLEDGER","GENERALLEDGER","LEDGER","BALANCE","VATCODE"],"title":"AccountingConfigsConfigKeyEnums","type":"string"},"OptionalUID":{"title":"OptionalUID","type":"string","pattern":"^[A-Za-z0-9-_]*"},"AccountingConfigsProductGroupRequestSchema":{"title":"AccountingConfigsProductGroupRequestSchema","description":"Create a new account mapping to a product group","type":"object","required":["value","vatCodeUid","productGroupUid"],"properties":{"accountingConfigUid":{"$ref":"#/components/schemas/UID"},"value":{"type":"string","description":"accountNumber"},"vatCodeUid":{"$ref":"#/components/schemas/UID"},"productGroupUid":{"$ref":"#/components/schemas/UID"}}},"UID":{"title":"UID","type":"string","pattern":"^[A-Za-z0-9-_]+"}},"requestBodies":{"AccountingConfigsProductGroupRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingConfigsProductGroupRequestSchema"}}}}}},"paths":{"/tenants/{tenantUid}/stores/{storeUid}/accountingConfigs/productGroup":{"post":{"summary":"Create a new productgroup account mapping","tags":["AccountingConfigs"],"responses":{"201":{"$ref":"#/components/responses/AccountingConfigsResponse"}},"operationId":"post-accountingConfigs-productGroup","description":"Add a account number to a specific product group.\nThis account number will be used for all products with the specified vatcode in the specific product group and all children","requestBody":{"$ref":"#/components/requestBodies/AccountingConfigsProductGroupRequest"}}}}}
```
