> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rebateright.com.au/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

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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /AoBPreAssignment:
    post:
      operationId: pre-assignment-pdf
      summary: Pre-assignment (PDF)
      description: >
        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. |
      tags:
        - >-
          subpackage_medicareClaiming.subpackage_medicareClaiming/bulkBillClaim.subpackage_medicareClaiming/bulkBillClaim/assignmentOfBenefit
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            PDF bytes, a **Medicare online** bulk bill pre-assignment Assignment
            of Benefit agreement, aligned with Services Australia BBSW
            expectations for the 1 July 2026 data set.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                serviceProviderName:
                  type: string
                  description: >
                    The servicing provider's name, printed under **Details of
                    the professional** alongside the

                    provider number.
                serviceStream:
                  $ref: >-
                    #/components/schemas/AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaServiceStream
                  description: >
                    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.
                serviceProvider:
                  $ref: >-
                    #/components/schemas/AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaServiceProvider
                assignments:
                  type: array
                  items:
                    $ref: >-
                      #/components/schemas/AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItems
                  description: >-
                    One entry per patient. Each renders as a complete, signable
                    agreement on its own page.
              required:
                - serviceProviderName
                - serviceStream
                - serviceProvider
                - assignments
servers:
  - url: https://api.rebateright.com.au
    description: Production
  - url: https://test-api.rebateright.com.au
    description: Test
components:
  schemas:
    AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaServiceStream:
      type: string
      enum:
        - general
        - pathology
        - diagnosticImaging
      description: >
        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.
      title: AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaServiceStream
    AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaServiceProvider:
      type: object
      properties:
        providerNumber:
          type: string
          description: >-
            The servicing provider's Medicare provider number, printed under
            **Details of the professional**.
      required:
        - providerNumber
      title: >-
        AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaServiceProvider
    AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsPatient:
      type: object
      properties:
        givenName:
          type: string
          description: >-
            The patient's given name. Printed as part of the patient (assignor)
            name.
        familyName:
          type: string
          description: The patient's family name.
      required:
        - givenName
        - familyName
      title: >-
        AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsPatient
    AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsServicesItems:
      type: object
      properties:
        serviceDate:
          type: string
          format: date
          description: >
            The expected service date, labelled date of service, specimen
            collection, or

            imaging procedure according to `serviceStream`.
        description:
          type: string
          description: >
            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.
      required:
        - serviceDate
        - description
      title: >-
        AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsServicesItems
    AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItems:
      type: object
      properties:
        dateOfAssignment:
          type: string
          format: date
          description: >-
            The date the patient enters into the agreement. Printed as the
            **assignment date**.
        assignorIsPatient:
          type: boolean
          description: >
            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.
        patient:
          $ref: >-
            #/components/schemas/AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsPatient
        services:
          type: array
          items:
            $ref: >-
              #/components/schemas/AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItemsServicesItems
          description: >-
            The services to be rendered under this assignment. Each prints as
            one row.
      required:
        - dateOfAssignment
        - patient
        - services
      title: >-
        AoBPreAssignmentPostRequestBodyContentApplicationJsonSchemaAssignmentsItems
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    minorId:
      type: apiKey
      in: header
      name: x-minor-id

```

## 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": "<apiKey>",
    "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': '<apiKey>', '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", "<apiKey>")
	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"] = '<apiKey>'
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<String> response = Unirest.post("https://api.rebateright.com.au/AoBPreAssignment")
  .header("x-api-key", "<apiKey>")
  .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
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->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' => '<apiKey>',
  ],
]);

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", "<apiKey>");
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": "<apiKey>",
  "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": "<apiKey>",
    "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': '<apiKey>', '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", "<apiKey>")
	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"] = '<apiKey>'
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<String> response = Unirest.post("https://api.rebateright.com.au/AoBPreAssignment")
  .header("x-api-key", "<apiKey>")
  .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
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->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' => '<apiKey>',
  ],
]);

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", "<apiKey>");
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": "<apiKey>",
  "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": "<apiKey>",
    "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': '<apiKey>', '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", "<apiKey>")
	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"] = '<apiKey>'
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<String> response = Unirest.post("https://api.rebateright.com.au/AoBPreAssignment")
  .header("x-api-key", "<apiKey>")
  .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
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->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' => '<apiKey>',
  ],
]);

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", "<apiKey>");
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": "<apiKey>",
  "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()
```