> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-unsw-v6.advance-uac.com/unsw-advance-institution-api/catalogue/partially-update-a-catalogue-program/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-unsw-v6.advance-uac.com/_mcp/server. # Partially update a catalogue program PATCH https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/programs/{code}/{year} Content-Type: application/json Partially updates a program, using JSON Merge Patch semantics (RFC 7386): - a field present with a value is set - a field present as `null` is CLEARED - a field you omit is left exactly as it was That last point is the difference from `PUT`, which replaces: there, omitting a field clears it. Use PATCH when a system that only knows, say, the name and its own `externalIds` needs to correct one of them without resending the other six fields correctly. An unknown field name is a 400 rather than being ignored. Under merge semantics a typo would otherwise do nothing at all, silently. `externalIds` still merges per system, and `null` is rejected there: omit it to leave existing ids alone. `code` and `year` identify the program and can't be patched. Reference: https://docs-unsw-v6.advance-uac.com/unsw-advance-institution-api/catalogue/partially-update-a-catalogue-program ## Authentication - `Authorization` header (bearer token, required) — Paste a Keycloak access token (no "Bearer " prefix) ## Servers - `https://unsw-v6-dev.advance-uac.com/institution-api` (Dev, default) - `https://unsw-v6-test.advance-uac.com/institution-api` (Test) ## Request ### Path parameters - `code` (string, required) - `year` (integer, required) ### Body (application/json) This endpoint expects a ProgramUpdateRequest. - `name` (string, optional) - `kind` (string, optional) — single | double_degree | research. Only single and double_degree can be promoted to an assessable program. - `creditPoints` (integer, optional) — Total credit points (UOC) for the program. - `level` (string, optional) - `fieldOfEducation` (string, optional) — Empty string and null both clear the stored value. - `facultyName` (string, optional) — The owning faculty's name as your system records it. The matching group on our side is resolved separately, so this is a label, not a link. - `schoolName` (string, optional) - `externalIds` (map from string to string, optional) — Your own identifiers for this program, keyed by system name, e.g. \{"handbook": "34ffd3cd93772210d45cb2ea6aba10b7"}. Merged per system: a system you omit keeps its existing id. An id already used for a different program is rejected. ## Response ### 200 The supplied fields were applied; everything else is unchanged. - `id` (string, optional) — Our stable id for the program, unchanged by an update. - `code` (string, optional) - `year` (integer, optional) - `status` (string, optional) — Always `updated` from this endpoint. ## Errors ### 400 Bad Request Error An unknown field name, a value of the wrong type, `externalIds: null`, or an id already registered against a different program. - `status` (integer, optional) — Repeats the HTTP status code. - `error` (string, optional) — What went wrong, in a form safe to show a developer. ### 404 Not Found Error No such resource for this institution. - `status` (integer, optional) — Repeats the HTTP status code. - `error` (string, optional) — What went wrong, in a form safe to show a developer. ## Examples **Request** ```json {} ``` **Response** ```json { "id": "string", "code": "string", "year": 1, "status": "string" } ``` **SDK Code** ```python import requests url = "https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/programs/code/1" payload = {} headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/programs/code/1'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/programs/code/1" payload := strings.NewReader("{}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/programs/code/1") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/programs/code/1") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('PATCH', 'https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/programs/code/1', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/programs/code/1"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://unsw-v6-dev.advance-uac.com/institution-api/institution/catalogue/programs/code/1")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```