# AoB

POST https://AoB
Content-Type: application/json

Reference: https://developers.rebateright.com.au/rebate-right/advanced/claiming/bulk-bill-claim/printed-statements/ao-b

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /AoB:
    post:
      operationId: ao-b
      summary: AoB
      tags:
        - >-
          subpackage_advanced.subpackage_advanced/claiming.subpackage_advanced/claiming/bulkBillClaim.subpackage_advanced/claiming/bulkBillClaim/printedStatements
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Advanced_Claiming_Bulk Bill Claim_Printed
                  Statements_AoB_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                claim:
                  $ref: >-
                    #/components/schemas/AoBPostRequestBodyContentApplicationJsonSchemaClaim
              required:
                - claim
servers:
  - url: https:/
components:
  schemas:
    AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsPatientIdentity:
      type: object
      properties:
        givenName:
          type: string
        familyName:
          type: string
        dateOfBirth:
          type: string
          format: date
      required:
        - givenName
        - familyName
        - dateOfBirth
      title: >-
        AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsPatientIdentity
    AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsPatientMedicare:
      type: object
      properties:
        memberNumber:
          type: string
        memberRefNumber:
          type: string
      required:
        - memberNumber
        - memberRefNumber
      title: >-
        AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsPatientMedicare
    AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsPatient:
      type: object
      properties:
        identity:
          $ref: >-
            #/components/schemas/AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsPatientIdentity
        medicare:
          $ref: >-
            #/components/schemas/AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsPatientMedicare
      required:
        - identity
        - medicare
      title: >-
        AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsPatient
    AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsServiceItems:
      type: object
      properties:
        id:
          type: string
        itemNumber:
          type: string
        chargeAmount:
          type: string
        aftercareOverrideInd:
          type: string
      required:
        - id
        - itemNumber
        - chargeAmount
        - aftercareOverrideInd
      title: >-
        AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsServiceItems
    AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItems:
      type: object
      properties:
        id:
          type: string
        patient:
          $ref: >-
            #/components/schemas/AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsPatient
        service:
          type: array
          items:
            $ref: >-
              #/components/schemas/AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItemsServiceItems
        createDateTime:
          type: string
          format: date-time
        medicalEventDate:
          type: string
          format: date
        authorisationDate:
          type: string
          format: date
        submissionAuthorityInd:
          type: string
      required:
        - id
        - patient
        - service
        - createDateTime
        - medicalEventDate
        - authorisationDate
        - submissionAuthorityInd
      title: AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItems
    AoBPostRequestBodyContentApplicationJsonSchemaClaimServiceProvider:
      type: object
      properties:
        providerNumber:
          type: string
      required:
        - providerNumber
      title: AoBPostRequestBodyContentApplicationJsonSchemaClaimServiceProvider
    AoBPostRequestBodyContentApplicationJsonSchemaClaim:
      type: object
      properties:
        medicalEvent:
          type: array
          items:
            $ref: >-
              #/components/schemas/AoBPostRequestBodyContentApplicationJsonSchemaClaimMedicalEventItems
        serviceProvider:
          $ref: >-
            #/components/schemas/AoBPostRequestBodyContentApplicationJsonSchemaClaimServiceProvider
        serviceTypeCode:
          type: string
      required:
        - medicalEvent
        - serviceProvider
        - serviceTypeCode
      title: AoBPostRequestBodyContentApplicationJsonSchemaClaim
    Advanced_Claiming_Bulk Bill Claim_Printed Statements_AoB_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Advanced_Claiming_Bulk Bill Claim_Printed Statements_AoB_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

```

## SDK Code Examples

```python
import requests

url = "https://https/AoB"

payload = { "claim": {
        "medicalEvent": [
            {
                "id": "01",
                "patient": {
                    "identity": {
                        "givenName": "Edmond",
                        "familyName": "FLETCHER",
                        "dateOfBirth": "1986-12-18"
                    },
                    "medicare": {
                        "memberNumber": "4951525561",
                        "memberRefNumber": "2"
                    }
                },
                "service": [
                    {
                        "id": "0001",
                        "itemNumber": "23",
                        "chargeAmount": "15000",
                        "aftercareOverrideInd": "Y"
                    }
                ],
                "createDateTime": "2026-03-18T10:30:00+10:00",
                "medicalEventDate": "2026-03-18",
                "authorisationDate": "2026-03-18",
                "submissionAuthorityInd": "Y"
            }
        ],
        "serviceProvider": { "providerNumber": "2447781L" },
        "serviceTypeCode": "O"
    } }
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://https/AoB';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"claim":{"medicalEvent":[{"id":"01","patient":{"identity":{"givenName":"Edmond","familyName":"FLETCHER","dateOfBirth":"1986-12-18"},"medicare":{"memberNumber":"4951525561","memberRefNumber":"2"}},"service":[{"id":"0001","itemNumber":"23","chargeAmount":"15000","aftercareOverrideInd":"Y"}],"createDateTime":"2026-03-18T10:30:00+10:00","medicalEventDate":"2026-03-18","authorisationDate":"2026-03-18","submissionAuthorityInd":"Y"}],"serviceProvider":{"providerNumber":"2447781L"},"serviceTypeCode":"O"}}'
};

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://https/AoB"

	payload := strings.NewReader("{\n  \"claim\": {\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"patient\": {\n          \"identity\": {\n            \"givenName\": \"Edmond\",\n            \"familyName\": \"FLETCHER\",\n            \"dateOfBirth\": \"1986-12-18\"\n          },\n          \"medicare\": {\n            \"memberNumber\": \"4951525561\",\n            \"memberRefNumber\": \"2\"\n          }\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"itemNumber\": \"23\",\n            \"chargeAmount\": \"15000\",\n            \"aftercareOverrideInd\": \"Y\"\n          }\n        ],\n        \"createDateTime\": \"2026-03-18T10:30:00+10:00\",\n        \"medicalEventDate\": \"2026-03-18\",\n        \"authorisationDate\": \"2026-03-18\",\n        \"submissionAuthorityInd\": \"Y\"\n      }\n    ],\n    \"serviceProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"serviceTypeCode\": \"O\"\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
require 'uri'
require 'net/http'

url = URI("https://https/AoB")

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  \"claim\": {\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"patient\": {\n          \"identity\": {\n            \"givenName\": \"Edmond\",\n            \"familyName\": \"FLETCHER\",\n            \"dateOfBirth\": \"1986-12-18\"\n          },\n          \"medicare\": {\n            \"memberNumber\": \"4951525561\",\n            \"memberRefNumber\": \"2\"\n          }\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"itemNumber\": \"23\",\n            \"chargeAmount\": \"15000\",\n            \"aftercareOverrideInd\": \"Y\"\n          }\n        ],\n        \"createDateTime\": \"2026-03-18T10:30:00+10:00\",\n        \"medicalEventDate\": \"2026-03-18\",\n        \"authorisationDate\": \"2026-03-18\",\n        \"submissionAuthorityInd\": \"Y\"\n      }\n    ],\n    \"serviceProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"serviceTypeCode\": \"O\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/AoB")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"claim\": {\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"patient\": {\n          \"identity\": {\n            \"givenName\": \"Edmond\",\n            \"familyName\": \"FLETCHER\",\n            \"dateOfBirth\": \"1986-12-18\"\n          },\n          \"medicare\": {\n            \"memberNumber\": \"4951525561\",\n            \"memberRefNumber\": \"2\"\n          }\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"itemNumber\": \"23\",\n            \"chargeAmount\": \"15000\",\n            \"aftercareOverrideInd\": \"Y\"\n          }\n        ],\n        \"createDateTime\": \"2026-03-18T10:30:00+10:00\",\n        \"medicalEventDate\": \"2026-03-18\",\n        \"authorisationDate\": \"2026-03-18\",\n        \"submissionAuthorityInd\": \"Y\"\n      }\n    ],\n    \"serviceProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"serviceTypeCode\": \"O\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/AoB', [
  'body' => '{
  "claim": {
    "medicalEvent": [
      {
        "id": "01",
        "patient": {
          "identity": {
            "givenName": "Edmond",
            "familyName": "FLETCHER",
            "dateOfBirth": "1986-12-18"
          },
          "medicare": {
            "memberNumber": "4951525561",
            "memberRefNumber": "2"
          }
        },
        "service": [
          {
            "id": "0001",
            "itemNumber": "23",
            "chargeAmount": "15000",
            "aftercareOverrideInd": "Y"
          }
        ],
        "createDateTime": "2026-03-18T10:30:00+10:00",
        "medicalEventDate": "2026-03-18",
        "authorisationDate": "2026-03-18",
        "submissionAuthorityInd": "Y"
      }
    ],
    "serviceProvider": {
      "providerNumber": "2447781L"
    },
    "serviceTypeCode": "O"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://https/AoB");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"claim\": {\n    \"medicalEvent\": [\n      {\n        \"id\": \"01\",\n        \"patient\": {\n          \"identity\": {\n            \"givenName\": \"Edmond\",\n            \"familyName\": \"FLETCHER\",\n            \"dateOfBirth\": \"1986-12-18\"\n          },\n          \"medicare\": {\n            \"memberNumber\": \"4951525561\",\n            \"memberRefNumber\": \"2\"\n          }\n        },\n        \"service\": [\n          {\n            \"id\": \"0001\",\n            \"itemNumber\": \"23\",\n            \"chargeAmount\": \"15000\",\n            \"aftercareOverrideInd\": \"Y\"\n          }\n        ],\n        \"createDateTime\": \"2026-03-18T10:30:00+10:00\",\n        \"medicalEventDate\": \"2026-03-18\",\n        \"authorisationDate\": \"2026-03-18\",\n        \"submissionAuthorityInd\": \"Y\"\n      }\n    ],\n    \"serviceProvider\": {\n      \"providerNumber\": \"2447781L\"\n    },\n    \"serviceTypeCode\": \"O\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["claim": [
    "medicalEvent": [
      [
        "id": "01",
        "patient": [
          "identity": [
            "givenName": "Edmond",
            "familyName": "FLETCHER",
            "dateOfBirth": "1986-12-18"
          ],
          "medicare": [
            "memberNumber": "4951525561",
            "memberRefNumber": "2"
          ]
        ],
        "service": [
          [
            "id": "0001",
            "itemNumber": "23",
            "chargeAmount": "15000",
            "aftercareOverrideInd": "Y"
          ]
        ],
        "createDateTime": "2026-03-18T10:30:00+10:00",
        "medicalEventDate": "2026-03-18",
        "authorisationDate": "2026-03-18",
        "submissionAuthorityInd": "Y"
      ]
    ],
    "serviceProvider": ["providerNumber": "2447781L"],
    "serviceTypeCode": "O"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://https/AoB")! 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()
```