> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.rebateright.com.au/api-reference/medicare-claiming/bulk-bill-claim/assignment-of-benefit/pre-assignment-pdf/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rebateright.com.au/_mcp/server. # Pre-assignment (PDF) POST https://api.rebateright.com.au/AoBPreAssignment Content-Type: application/json This endpoint produces it: the pre-assignment Assignment of Benefit form as a PDF, one signable page for each assignment. Returns **`application/pdf`**: a printable Medicare bulk bill **pre-assignment** Assignment of Benefit agreement: the form a patient signs to assign their Medicare benefit **before** the service. For what pre-assignment is, when to use it instead of post-assignment, and the signing and retention obligations, see the [Pre-assignment guide](/assignment-of-benefit/pre-assignment). Supply the servicing provider, the `serviceStream`, and one or more `assignments`. Each renders as a complete, signable page, so one request can produce a batch. Because a pre-assignment precedes the claim, this request is **not** the bulk bill claim payload. This endpoint **renders** the document; it does not lodge a claim or call Services Australia. A pre-assignment cannot be used for Child Dental Benefits Schedule (CDBS) claims. ## How the form is chosen You set the **service stream** explicitly with `serviceStream` (`general`, `pathology`, or `diagnosticImaging`). It selects the assignor's statement and the date-column label for every page of the request. ## Response | Status | Content type | Meaning | | ------ | ----------------- | ------------------------------------------------------ | | `200` | `application/pdf` | The rendered pre-assignment agreement. | | `400` | `text/plain` | The request was malformed or missing a required field. | Reference: https://docs.rebateright.com.au/api-reference/medicare-claiming/bulk-bill-claim/assignment-of-benefit/pre-assignment-pdf ## Authentication - `x-api-key` header (required) — API Key authentication via header - `x-minor-id` header (required) — Your Minor ID is three uppercase letters followed by five digits, such as `MDE00001`. Send the Minor ID exactly as issued. A malformed value gets a 400 with "The Minor ID is not valid." on every endpoint. ## Servers - `https://api.rebateright.com.au` (Production, default) - `https://test-api.rebateright.com.au` (Test) ## Request ### Body (application/json) This endpoint expects an object. - `serviceProviderName` (string, required) — The servicing provider's name, printed under **Details of the professional** alongside the provider number. - `serviceStream` (enum, required) — The service stream. It selects the assignor's statement, the date-column label, and the description-column label printed on every page of this request. | Value | Statement (future tense) | Date column | Description column | |-------|--------------------------|-------------|--------------------| | `general` | …the health professional who will render the service(s). | Date of service | Basic service description | | `pathology` | …the approved pathology practitioner who will render the requested pathology service(s)… | Date of specimen collection | Description of service | | `diagnosticImaging` | …the diagnostic imaging provider who will render the requested diagnostic imaging service(s)… | Date of imaging procedure | Description of service | A specialist or allied-health attendance uses `general`. Pathology Group P9 (simple in-rooms tests) also uses `general`, the way Services Australia defines the streams. - Allowed values: `general`, `pathology`, `diagnosticImaging` - `serviceProvider` (AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaServiceProvider, required) - `assignments` (list of AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItems, required) — One entry per patient. Each renders as a complete, signable agreement on its own page. ## Response ### 200 PDF bytes, a **Medicare online** bulk bill pre-assignment Assignment of Benefit agreement, carrying the minimum data set Services Australia requires. - File download. ## Types ### AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaServiceProvider - `providerNumber` (string, required) — The servicing provider's Medicare provider number, printed under **Details of the professional**. ### AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItems - `dateOfAssignment` (date, required) — The date the patient enters into the agreement. Printed as the **assignment date**. - `patient` (AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsPatient, required) - `services` (list of AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsServicesItems, required) — The services to be rendered under this assignment. Each prints as one row. - `assignorIsPatient` (boolean, optional) — Whether the person assigning the benefit is the patient. Prints **Yes** or **No**. Omit it to print a **Yes / No** choice for completion by hand. ### AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsPatient - `givenName` (string, required) — The patient's given name. Printed as part of the patient (assignor) name. - `familyName` (string, required) — The patient's family name. ### AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsServicesItems - `serviceDate` (date, required) — The expected service date, labelled date of service, specimen collection, or imaging procedure according to `serviceStream`. - `description` (string, required) — Your plain-language description of the service to be rendered, the **basic service description**. Pre-assignment prints this in place of an MBS item number, because the exact item is often not known before the service. RebateRight prints it exactly as supplied; it is not validated against the MBS. ## Examples ### General **Request** ```json { "serviceProviderName": "Gwenda Hunter", "serviceStream": "general", "serviceProvider": { "providerNumber": "2447781L" }, "assignments": [ { "dateOfAssignment": "2026-07-01", "patient": { "givenName": "Rose", "familyName": "Riviera" }, "services": [ { "serviceDate": "2026-07-03", "description": "Standard general practitioner consultation, Level B (at least 20 minutes)" } ], "assignorIsPatient": true } ] } ``` **SDK Code** ```python General import requests url = "https://api.rebateright.com.au/AoBPreAssignment" payload = { "serviceProviderName": "Gwenda Hunter", "serviceStream": "general", "serviceProvider": { "providerNumber": "2447781L" }, "assignments": [ { "dateOfAssignment": "2026-07-01", "patient": { "givenName": "Rose", "familyName": "Riviera" }, "services": [ { "serviceDate": "2026-07-03", "description": "Standard general practitioner consultation, Level B (at least 20 minutes)" } ], "assignorIsPatient": True } ] } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript General const url = 'https://api.rebateright.com.au/AoBPreAssignment'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"serviceProviderName":"Gwenda Hunter","serviceStream":"general","serviceProvider":{"providerNumber":"2447781L"},"assignments":[{"dateOfAssignment":"2026-07-01","patient":{"givenName":"Rose","familyName":"Riviera"},"services":[{"serviceDate":"2026-07-03","description":"Standard general practitioner consultation, Level B (at least 20 minutes)"}],"assignorIsPatient":true}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go General package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/AoBPreAssignment" payload := strings.NewReader("{\n \"serviceProviderName\": \"Gwenda Hunter\",\n \"serviceStream\": \"general\",\n \"serviceProvider\": {\n \"providerNumber\": \"2447781L\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-03\",\n \"description\": \"Standard general practitioner consultation, Level B (at least 20 minutes)\"\n }\n ],\n \"assignorIsPatient\": true\n }\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") 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 General require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/AoBPreAssignment") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"serviceProviderName\": \"Gwenda Hunter\",\n \"serviceStream\": \"general\",\n \"serviceProvider\": {\n \"providerNumber\": \"2447781L\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-03\",\n \"description\": \"Standard general practitioner consultation, Level B (at least 20 minutes)\"\n }\n ],\n \"assignorIsPatient\": true\n }\n ]\n}" response = http.request(request) puts response.read_body ``` ```java General import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/AoBPreAssignment") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"serviceProviderName\": \"Gwenda Hunter\",\n \"serviceStream\": \"general\",\n \"serviceProvider\": {\n \"providerNumber\": \"2447781L\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-03\",\n \"description\": \"Standard general practitioner consultation, Level B (at least 20 minutes)\"\n }\n ],\n \"assignorIsPatient\": true\n }\n ]\n}") .asString(); ``` ```php General request('POST', 'https://api.rebateright.com.au/AoBPreAssignment', [ 'body' => '{ "serviceProviderName": "Gwenda Hunter", "serviceStream": "general", "serviceProvider": { "providerNumber": "2447781L" }, "assignments": [ { "dateOfAssignment": "2026-07-01", "patient": { "givenName": "Rose", "familyName": "Riviera" }, "services": [ { "serviceDate": "2026-07-03", "description": "Standard general practitioner consultation, Level B (at least 20 minutes)" } ], "assignorIsPatient": true } ] }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp General using RestSharp; var client = new RestClient("https://api.rebateright.com.au/AoBPreAssignment"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"serviceProviderName\": \"Gwenda Hunter\",\n \"serviceStream\": \"general\",\n \"serviceProvider\": {\n \"providerNumber\": \"2447781L\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-03\",\n \"description\": \"Standard general practitioner consultation, Level B (at least 20 minutes)\"\n }\n ],\n \"assignorIsPatient\": true\n }\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift General import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "serviceProviderName": "Gwenda Hunter", "serviceStream": "general", "serviceProvider": ["providerNumber": "2447781L"], "assignments": [ [ "dateOfAssignment": "2026-07-01", "patient": [ "givenName": "Rose", "familyName": "Riviera" ], "services": [ [ "serviceDate": "2026-07-03", "description": "Standard general practitioner consultation, Level B (at least 20 minutes)" ] ], "assignorIsPatient": true ] ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/AoBPreAssignment")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ``` ### Pathology **Request** ```json { "serviceProviderName": "Kelly Dyer", "serviceStream": "pathology", "serviceProvider": { "providerNumber": "2447791K" }, "assignments": [ { "dateOfAssignment": "2026-07-01", "patient": { "givenName": "Rose", "familyName": "Riviera" }, "services": [ { "serviceDate": "2026-07-02", "description": "Full blood examination and urea, electrolytes and creatinine" } ], "assignorIsPatient": true } ] } ``` **SDK Code** ```python Pathology import requests url = "https://api.rebateright.com.au/AoBPreAssignment" payload = { "serviceProviderName": "Kelly Dyer", "serviceStream": "pathology", "serviceProvider": { "providerNumber": "2447791K" }, "assignments": [ { "dateOfAssignment": "2026-07-01", "patient": { "givenName": "Rose", "familyName": "Riviera" }, "services": [ { "serviceDate": "2026-07-02", "description": "Full blood examination and urea, electrolytes and creatinine" } ], "assignorIsPatient": True } ] } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Pathology const url = 'https://api.rebateright.com.au/AoBPreAssignment'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"serviceProviderName":"Kelly Dyer","serviceStream":"pathology","serviceProvider":{"providerNumber":"2447791K"},"assignments":[{"dateOfAssignment":"2026-07-01","patient":{"givenName":"Rose","familyName":"Riviera"},"services":[{"serviceDate":"2026-07-02","description":"Full blood examination and urea, electrolytes and creatinine"}],"assignorIsPatient":true}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Pathology package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/AoBPreAssignment" payload := strings.NewReader("{\n \"serviceProviderName\": \"Kelly Dyer\",\n \"serviceStream\": \"pathology\",\n \"serviceProvider\": {\n \"providerNumber\": \"2447791K\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-02\",\n \"description\": \"Full blood examination and urea, electrolytes and creatinine\"\n }\n ],\n \"assignorIsPatient\": true\n }\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") 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 Pathology require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/AoBPreAssignment") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"serviceProviderName\": \"Kelly Dyer\",\n \"serviceStream\": \"pathology\",\n \"serviceProvider\": {\n \"providerNumber\": \"2447791K\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-02\",\n \"description\": \"Full blood examination and urea, electrolytes and creatinine\"\n }\n ],\n \"assignorIsPatient\": true\n }\n ]\n}" response = http.request(request) puts response.read_body ``` ```java Pathology import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/AoBPreAssignment") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"serviceProviderName\": \"Kelly Dyer\",\n \"serviceStream\": \"pathology\",\n \"serviceProvider\": {\n \"providerNumber\": \"2447791K\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-02\",\n \"description\": \"Full blood examination and urea, electrolytes and creatinine\"\n }\n ],\n \"assignorIsPatient\": true\n }\n ]\n}") .asString(); ``` ```php Pathology request('POST', 'https://api.rebateright.com.au/AoBPreAssignment', [ 'body' => '{ "serviceProviderName": "Kelly Dyer", "serviceStream": "pathology", "serviceProvider": { "providerNumber": "2447791K" }, "assignments": [ { "dateOfAssignment": "2026-07-01", "patient": { "givenName": "Rose", "familyName": "Riviera" }, "services": [ { "serviceDate": "2026-07-02", "description": "Full blood examination and urea, electrolytes and creatinine" } ], "assignorIsPatient": true } ] }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Pathology using RestSharp; var client = new RestClient("https://api.rebateright.com.au/AoBPreAssignment"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"serviceProviderName\": \"Kelly Dyer\",\n \"serviceStream\": \"pathology\",\n \"serviceProvider\": {\n \"providerNumber\": \"2447791K\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-02\",\n \"description\": \"Full blood examination and urea, electrolytes and creatinine\"\n }\n ],\n \"assignorIsPatient\": true\n }\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Pathology import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "serviceProviderName": "Kelly Dyer", "serviceStream": "pathology", "serviceProvider": ["providerNumber": "2447791K"], "assignments": [ [ "dateOfAssignment": "2026-07-01", "patient": [ "givenName": "Rose", "familyName": "Riviera" ], "services": [ [ "serviceDate": "2026-07-02", "description": "Full blood examination and urea, electrolytes and creatinine" ] ], "assignorIsPatient": true ] ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/AoBPreAssignment")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ``` ### Diagnostic Imaging **Request** ```json { "serviceProviderName": "Dr Brenda Reed", "serviceStream": "diagnosticImaging", "serviceProvider": { "providerNumber": "2054781W" }, "assignments": [ { "dateOfAssignment": "2026-07-01", "patient": { "givenName": "Rose", "familyName": "Riviera" }, "services": [ { "serviceDate": "2026-07-04", "description": "Ultrasound scan of the abdomen" } ], "assignorIsPatient": false } ] } ``` **SDK Code** ```python Diagnostic Imaging import requests url = "https://api.rebateright.com.au/AoBPreAssignment" payload = { "serviceProviderName": "Dr Brenda Reed", "serviceStream": "diagnosticImaging", "serviceProvider": { "providerNumber": "2054781W" }, "assignments": [ { "dateOfAssignment": "2026-07-01", "patient": { "givenName": "Rose", "familyName": "Riviera" }, "services": [ { "serviceDate": "2026-07-04", "description": "Ultrasound scan of the abdomen" } ], "assignorIsPatient": False } ] } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Diagnostic Imaging const url = 'https://api.rebateright.com.au/AoBPreAssignment'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"serviceProviderName":"Dr Brenda Reed","serviceStream":"diagnosticImaging","serviceProvider":{"providerNumber":"2054781W"},"assignments":[{"dateOfAssignment":"2026-07-01","patient":{"givenName":"Rose","familyName":"Riviera"},"services":[{"serviceDate":"2026-07-04","description":"Ultrasound scan of the abdomen"}],"assignorIsPatient":false}]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Diagnostic Imaging package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.rebateright.com.au/AoBPreAssignment" payload := strings.NewReader("{\n \"serviceProviderName\": \"Dr Brenda Reed\",\n \"serviceStream\": \"diagnosticImaging\",\n \"serviceProvider\": {\n \"providerNumber\": \"2054781W\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-04\",\n \"description\": \"Ultrasound scan of the abdomen\"\n }\n ],\n \"assignorIsPatient\": false\n }\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") 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 Diagnostic Imaging require 'uri' require 'net/http' url = URI("https://api.rebateright.com.au/AoBPreAssignment") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"serviceProviderName\": \"Dr Brenda Reed\",\n \"serviceStream\": \"diagnosticImaging\",\n \"serviceProvider\": {\n \"providerNumber\": \"2054781W\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-04\",\n \"description\": \"Ultrasound scan of the abdomen\"\n }\n ],\n \"assignorIsPatient\": false\n }\n ]\n}" response = http.request(request) puts response.read_body ``` ```java Diagnostic Imaging import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.rebateright.com.au/AoBPreAssignment") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"serviceProviderName\": \"Dr Brenda Reed\",\n \"serviceStream\": \"diagnosticImaging\",\n \"serviceProvider\": {\n \"providerNumber\": \"2054781W\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-04\",\n \"description\": \"Ultrasound scan of the abdomen\"\n }\n ],\n \"assignorIsPatient\": false\n }\n ]\n}") .asString(); ``` ```php Diagnostic Imaging request('POST', 'https://api.rebateright.com.au/AoBPreAssignment', [ 'body' => '{ "serviceProviderName": "Dr Brenda Reed", "serviceStream": "diagnosticImaging", "serviceProvider": { "providerNumber": "2054781W" }, "assignments": [ { "dateOfAssignment": "2026-07-01", "patient": { "givenName": "Rose", "familyName": "Riviera" }, "services": [ { "serviceDate": "2026-07-04", "description": "Ultrasound scan of the abdomen" } ], "assignorIsPatient": false } ] }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp Diagnostic Imaging using RestSharp; var client = new RestClient("https://api.rebateright.com.au/AoBPreAssignment"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"serviceProviderName\": \"Dr Brenda Reed\",\n \"serviceStream\": \"diagnosticImaging\",\n \"serviceProvider\": {\n \"providerNumber\": \"2054781W\"\n },\n \"assignments\": [\n {\n \"dateOfAssignment\": \"2026-07-01\",\n \"patient\": {\n \"givenName\": \"Rose\",\n \"familyName\": \"Riviera\"\n },\n \"services\": [\n {\n \"serviceDate\": \"2026-07-04\",\n \"description\": \"Ultrasound scan of the abdomen\"\n }\n ],\n \"assignorIsPatient\": false\n }\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Diagnostic Imaging import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [ "serviceProviderName": "Dr Brenda Reed", "serviceStream": "diagnosticImaging", "serviceProvider": ["providerNumber": "2054781W"], "assignments": [ [ "dateOfAssignment": "2026-07-01", "patient": [ "givenName": "Rose", "familyName": "Riviera" ], "services": [ [ "serviceDate": "2026-07-04", "description": "Ultrasound scan of the abdomen" ] ], "assignorIsPatient": false ] ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.rebateright.com.au/AoBPreAssignment")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ```