## Reorder the transaction types (tenant:settings:write)

`PATCH /api/trade/v1/sales/transaction-types`

Module: Trade · operationId: `reorderTransactionTypes` · Tag: Transaction types · Auth: access token (`Authorization: Bearer <accessToken>`)

`order` must name every type code of the tenant exactly once; the types get sort orders 10, 20, … in that order. Otherwise nothing is written and the answer is `409`.

### Request body

`application/json` (required)

- `order` (array of string, required)

Example:

```json
{
  "order": [
    "OFFER",
    "ORDER",
    "DELIVERY_NOTE",
    "INVOICE",
    "CREDIT_NOTE",
    "PURCHASE_ORDER",
    "GOODS_RECEIPT",
    "INBOUND_INVOICE",
    "INBOUND_CREDIT_NOTE"
  ]
}
```

### Responses

- **204** Reordered
- **400** Error (`application/json`)
- **401** No valid session or bearer token (no body).
- **403** Missing permission, no active tenant in the token, or a missing CSRF token on a cookie write. (`application/json`)
- **409** The catalogue changed meanwhile; reload. (`application/json`)

### Example request

```bash
curl -X PATCH 'https://api.mbcom.cloud/api/trade/v1/sales/transaction-types' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"order":["OFFER","ORDER","DELIVERY_NOTE","INVOICE","CREDIT_NOTE","PURCHASE_ORDER","GOODS_RECEIPT","INBOUND_INVOICE","INBOUND_CREDIT_NOTE"]}'
```
