---
title: "List categories that have a GL code mapping with a trade"
method: GET
path: "/categories/glcodes"
tags: ["Categories"]
---

# List categories that have a GL code mapping with a trade

`GET /categories/glcodes`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/categories/glcodes`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/categories/glcodes/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns categories that have GL codes associated with the specified trade. Learn more about [managing GL codes](https://servicechannel.atlassian.net/wiki/spaces/SCU/pages/557645834/Managing+GL+Codes) in ServiceChannel University.

## Query parameters

- `locationId` integer, required
- `trade` string, required

## Response `200`

Categories with GL codes for the specified trade and location are in the response.

- ServiceChannelApiModelProposalsCategoryGLCode[]
  - `CategoryId` integer
  - `CategoryName` string
  - `GLCode` string

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc.
- `401`: The request is not authorized. <br/>Error codes: <br/>504 — API call rejected by security permissions <br/>601 — Location is not found <br/>701 — Invalid trade

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
