---
title: "Update a GL Code"
method: PUT
path: "/GlCodes/UpdateGlCode"
tags: ["GlCodes"]
---

# Update a GL Code

`PUT /GlCodes/UpdateGlCode`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/GlCodes/UpdateGlCode`
- 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/GlCodes/UpdateGlCode/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates a GL Code number leaving the trade, category, and/or location of the code unchanged. You need to specify all code parameters to update it.
            <br />Use the [POST /GlCodes/CreateGlCode](/swagger/ui/index?version=3#/GlCodes/POSTv3_GlCodes_CreateGlCode_glCode__glCode__trade__trade__category__category__location__location_) method to create a new GL Code.

## Query parameters

- `glCode` string, required
- `trade` string
- `category` string
- `location` string

## Response `200`

The updated GL Code ID is in the response.

- SystemObject

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc. <br/>Error codes: 401 — Invalid subsriber ID 606 — Location is not found 704 — Invalid trade value for the subscriber 705 — Invalid category value for the subscriber 707 — GL Code does not exist 708 — At least one field trade/category/location is required
- `401`: The request is not authorized. <br/>Error codes: 504 — API call rejected by security permissions
- `500`: The server was unable to complete the request due to an internal error.

---

[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)
