Creates or updates a GL code for the business (upsert by code).
- If a GL code with the given
codealready exists, itsnameis updated. - If a previously soft-deleted GL code with that
codeexists, it is restored. - Otherwise a new record is created.
Only available for businesses with a manual integration or no integration. If no integration exists, a manual integration is automatically created. Returns 400 if the business has a connected accounting provider (Xero, MYOB, NetSuite, QuickBooks, Business Central).
Security
BearerAuth
POST
curl -i -X POST \
https://public.letsweel.com/v1/businesses/123/accounting-codes \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"code": "4000",
"name": "Office Expenses"
}'OK (existing code updated or restored)
The unique identifier for this GL code.
Example:"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Response
{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "code": "4000", "name": "Office Expenses", "created": "2026-01-15T10:30:00Z", "updated": "2026-01-15T10:30:00Z" }