Skip to content

Accounting Codes

This group of endpoints allows you to manage GL codes (accounting codes) for your business.

GL codes are used to classify expenses for bookkeeping export. Businesses with a connected accounting integration (Xero, MYOB, NetSuite, QuickBooks, Business Central) cannot create or delete GL codes via the API — those are managed by the integration sync. Businesses with a manual integration or no integration can freely create, update, and delete GL codes. A manual integration is automatically created on the first POST if none exists.

List accounting codes

Request

Returns a paginated list of GL codes for the given business.

Security
BearerAuth
Path
client_idintegerrequired

The ID of the business.

Example:123
Query
offsetinteger

Offset to retrieve items from.

Default:0
Example:offset=50
limitinteger, <= 500

Number of items per page.

Default:50
Example:limit=50
GET
/v1/businesses/{client_id}/accounting-codes
curl -i -X GET \
  'https://public.letsweel.com/v1/businesses/123/accounting-codes?offset=50&limit=50' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
countinteger

Total number of GL codes.

Example:100
nextstring or null

Pagination cursor for the next page.

Example:"limit=50&offset=50"
previousstring or null

Pagination cursor for the previous page.

Example:null
resultsArray of objects(AccountingCode)
Response
{ "count": 100, "next": "limit=50&offset=50", "previous": null, "results": [ {} ] }