### GET /websites/portal_api_business_govt_nz Source: https://portal.api.business.govt.nz/content/radio_spectrum_management_0.9.3 Retrieves spectrum reference data based on query parameters. ```APIDOC ## GET /websites/portal_api_business_govt_nz ### Description Retrieves spectrum reference data based on query parameters such as channel, frequency, and frequency range. ### Method GET ### Endpoint /websites/portal_api_business_govt_nz ### Parameters #### Query Parameters - **channel** (string) - Optional - Channel search element - **frequency** (number) - Optional - Only one of 'Frequency' or 'Frequency range' parameter may be supplied, not both. - **exactMatchFreq** (boolean) - Optional - 1 = Yes 0 = No (This is a conditional field, only if a value has been entered on the 'Frequency (MHz)') - **frequencyRangeFrom** (string) - Optional - The Frequency range to search from - **frequencyRangeTo** (string) - Optional - The Frequency range to search to ### Response #### Success Response (200) - **SpectrumSearchResults** (object) - Reference Data Spectrum Search results #### Error Response (400) - **ErrorResponse** (object) - Request failed validation. Appropriate headers not provided or request did not validate or is not supported #### Error Response (401) - **ErrorResponse** (object) - Permission Denied, need to be authenticated to access or modify this resource #### Error Response (403) - **ErrorResponse** (object) - Permission Denied, need to be authorised to access or modify this resource ``` -------------------------------- ### GET /equipment Source: https://portal.api.business.govt.nz/api/radiospectrum-management Retrieves information about equipment. The response includes new attributes for equipment identification and sorting. ```APIDOC ## GET /equipment ### Description Retrieves information about equipment. The response includes new attributes for equipment identification and sorting. ### Method GET ### Endpoint /equipment ### Response #### Success Response (200) - **equipmentList** (array) - A list of equipment objects. - **id** (string) - The unique identifier for the equipment within EquipmentSearchResult. - **equipmentName** (string) - The name of the equipment. - **equipmentType** (string) - The type of equipment. - **manufacturer** (string) - The manufacturer of the equipment. #### Response Example { "equipmentList": [ { "id": "eq-abc-123", "equipmentName": "Transmitter Model X", "equipmentType": "Transmitter", "manufacturer": "TechCorp" } ] } ``` -------------------------------- ### GET /licences Source: https://portal.api.business.govt.nz/content/radio_spectrum_management_0.9.3 Searches for a list of radio and spectrum licenses matching the specified criteria. Supports pagination and sorting. ```APIDOC ## GET /licences ### Description This endpoint searches the Register of Radio Frequencies and returns a list of matching radio and spectrum licenses. It supports pagination and sorting by various fields. ### Method GET ### Endpoint /licences ### Parameters #### Query Parameters - **page** (integer) - Optional - The page in the collection to return. Defaults to 1. Maximum value is 399. - **page-size** (integer) - Optional - The requested number of items to include in each page returned. Minimum value is 1, maximum value is 1000. - **sort-by** (LicenceSortBy) - Optional - Name of the field to sort the response by. - **sort-order** (string) - Optional - Whether to sort the response in ascending or descending order. ### Response #### Success Response (200) - **LicenceResponse[]** - An array of Licence objects matching the search criteria. #### Error Response - **ErrorResponse** - Schema reference for various error scenarios (e.g., 400, 401, 403, 404, 405, 406, 412, 500, 503). #### Response Example { "example": "[ { \"licenceId\": 12345, \"status\": \"Active\", \"holderName\": \"Example Corp\" }, { \"licenceId\": 67890, \"status\": \"Expired\", \"holderName\": \"Another Ltd\" } ]" } ``` -------------------------------- ### STIX Indicator Bundle Example Source: https://portal.api.business.govt.nz/api/phishing-disruption-service A STIX bundle containing a single indicator. Bundles group multiple STIX objects, such as indicators, into a single payload. This example shows a basic indicator for a malicious domain. ```json { "id": "bundle--", "objects": [ { "created": "2022-11-24T20:59:04.274Z", "created_by_ref": "identity--", "id": "indicator--", "labels": [ "malicious-activity" ], "modified": "2022-11-24T20:59:04.274Z", "object_marking_refs": [ "marking-definition--" ], "pattern": "[domain-name:value = 'test45.example.bad.com']", "type": "indicator", "valid_from": "2022-11-24T20:59:04.213Z", "valid_until": "2022-12-07T20:59:04.213Z" } ], "spec_version": "2.0", "type": "bundle" } ``` -------------------------------- ### GET /licences/{licenceId} Source: https://portal.api.business.govt.nz/api/radiospectrum-management Retrieves detailed information for a specific radio or spectrum license by its ID. ```APIDOC ## GET /licences/{licenceId} ### Description Retrieves detailed information for a specific radio or spectrum license by its ID. ### Method GET ### Endpoint /licences/{licenceId} ### Parameters #### Path Parameters - **licenceId** (string) - Required - The unique identifier of the licence. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the licence. - **licenceNumber** (string) - The licence number. - **licenceType** (string) - The type of licence (e.g., 'Spectrum', 'Radio'). - **registrationDate** (string) - The date the licence was registered. - **expiryDate** (string) - The date the licence expires. - **cancellationDate** (string) - The date the licence was cancelled. - **transmitLocations** (array) - List of transmit locations for the licence. - **locationAltitude** (number) - The altitude of the location. - **locationAltitudeUOM** (string) - The unit of measure for the altitude. - **receiveLocations** (array) - List of receive locations for the licence. - **locationAltitude** (number) - The altitude of the location. - **locationAltitudeUOM** (string) - The unit of measure for the altitude. #### Response Example { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "licenceNumber": "SPEC12345", "licenceType": "Spectrum", "registrationDate": "2023-01-15T00:00:00Z", "expiryDate": "2028-01-15T00:00:00Z", "cancellationDate": null, "transmitLocations": [ { "locationAltitude": 100, "locationAltitudeUOM": "Meters" } ], "receiveLocations": [] } ``` -------------------------------- ### Example CERT NZ API Bundle (JSON) Source: https://portal.api.business.govt.nz/api/phishing-disruption-service This JSON object represents an example bundle from the CERT NZ API. It contains multiple STIX objects, including sightings, indicators, and an identity object. The bundle structure includes a 'type' set to 'bundle' and a 'spec_version'. ```json { "id": "bundle--9edec020-5b5b-4353-9871-ff9cd40ce92f", "objects": [ { "count": 91, "created": "2022-04-16T03:51:42.585Z", "created_by_ref": "identity--a0c520bc-6c4f-4c55-898d-fb7100740b64", "external_references": [ { "description": "OpenPhish is a fully automated self-contained platform for phishing intelligence.", "source_name": "openphish.com" } ], "first_seen": "2022-03-19T04:29:04.521Z", "id": "sighting--0b402f30-9f3c-4fd7-9877-beed7fdaa38d", "last_seen": "2022-03-19T04:29:04.521Z", "modified": "2022-04-16T03:51:42.585Z", "sighting_of_ref": "indicator--d7e4007e-7bd2-4fbe-a24d-97b08f7831d2", "summary": true, "type": "sighting" }, { "created": "2022-04-16T03:51:42.585Z", "created_by_ref": "identity--a0c520bc-6c4f-4c55-898d-fb7100740b64", "id": "indicator--d7e4007e-7bd2-4fbe-a24d-97b08f7831d2", "labels": [ "malicious-activity", "compromised" ], "modified": "2022-04-16T03:51:42.585Z", "object_marking_refs": [ "marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da" ], "pattern": "[url:value = 'http://evil.example.com']", "type": "indicator", "valid_from": "2022-03-19T04:29:04.521Z", "valid_until": "2022-06-17T04:29:04.521Z" }, { "count": 1, "created": "2022-04-16T11:06:51.676Z", "created_by_ref": "identity--a0c520bc-6c4f-4c55-898d-fb7100740b64", "first_seen": "2022-01-25T14:19:53.995Z", "id": "sighting--50219cdb-d10b-42a3-bba4-d27a1466bfa0", "last_seen": "2022-01-25T14:19:53.995Z", "modified": "2022-04-16T11:06:51.676Z", "sighting_of_ref": "indicator--3a4c13e6-e9a5-433f-b04f-b69b11588bee", "summary": true, "type": "sighting" }, { "created": "2022-04-16T11:06:51.676Z", "created_by_ref": "identity--a0c520bc-6c4f-4c55-898d-fb7100740b64", "id": "indicator--3a4c13e6-e9a5-433f-b04f-b69b11588bee", "labels": [ "malicious-activity", "compromised" ], "modified": "2022-04-16T11:06:51.676Z", "object_marking_refs": [ "marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da" ], "pattern": "[domain-name:value = 'evildomain.example.nz']", "type": "indicator", "valid_from": "2022-01-25T14:19:53.995Z", "valid_until": "2022-04-25T14:19:53.995Z" }, { "created": "2022-04-16T15:50:21.103Z", "description": "New Zealand's national cert. CERT NZ works to support businesses, organisations and individuals who are affected (or may be affected) by cyber security incidents. We provide trusted and authoritative information and advice, while also collating a profile of the threat landscape in New Zealand.", "id": "identity--a0c520bc-6c4f-4c55-898d-fb7100740b64", "identity_class": "organization", "modified": "2022-04-16T15:50:21.103Z", "name": "certnz", "type": "identity" } ], "spec_version": "2.0", "type": "bundle" } ``` -------------------------------- ### Tenancy Bond API - v1 Source: https://portal.api.business.govt.nz/apis Allows users to register as a landlord, lodge bonds, check the status of a lodgement, and get details of bonds. ```APIDOC ## Tenancy Bond API - v1 ### Description The Tenancy Bond API allows users to register as a landlord, lodge bonds, check the status of a lodgement, and get details of bonds. ### Method POST ### Endpoint /v1/tenancybond ### Parameters #### Request Body - **landlord_details** (object) - Required - Details of the landlord. - **name** (string) - Required - Landlord's full name. - **email** (string) - Required - Landlord's email address. - **bond_details** (object) - Required - Details of the tenancy bond. - **property_address** (string) - Required - Address of the rental property. - **bond_amount** (number) - Required - The amount of the bond. - **tenant_names** (array) - Required - Array of tenant names. ### Request Example ```json { "landlord_details": { "name": "Jane Doe", "email": "jane.doe@example.com" }, "bond_details": { "property_address": "456 Oak Ave, Wellington", "bond_amount": 2000, "tenant_names": ["Peter Pan", "Wendy Darling"] } } ``` ### Response #### Success Response (201) - **lodgement_id** (string) - Unique identifier for the bond lodgement. - **status** (string) - The current status of the lodgement. #### Response Example ```json { "lodgement_id": "TB-2023-1001", "status": "Pending" } ``` ``` -------------------------------- ### Tenancy Bond API - v2 Source: https://portal.api.business.govt.nz/apis Allows users to register as a landlord, lodge bonds, check the status of a lodgement, and get details of bonds. ```APIDOC ## Tenancy Bond API - v2 ### Description The Tenancy Bond API allows users to register as a landlord, lodge bonds, check the status of a lodgement, and get details of bonds. ### Method POST ### Endpoint /v2/tenancybond ### Parameters #### Request Body - **landlord_details** (object) - Required - Details of the landlord. - **name** (string) - Required - Landlord's full name. - **email** (string) - Required - Landlord's email address. - **bond_details** (object) - Required - Details of the tenancy bond. - **property_address** (string) - Required - Address of the rental property. - **bond_amount** (number) - Required - The amount of the bond. - **tenant_names** (array) - Required - Array of tenant names. ### Request Example ```json { "landlord_details": { "name": "Jane Doe", "email": "jane.doe@example.com" }, "bond_details": { "property_address": "456 Oak Ave, Wellington", "bond_amount": 2000, "tenant_names": ["Peter Pan", "Wendy Darling"] } } ``` ### Response #### Success Response (201) - **lodgement_id** (string) - Unique identifier for the bond lodgement. - **status** (string) - The current status of the lodgement. #### Response Example ```json { "lodgement_id": "TB-2023-1001", "status": "Pending" } ``` ``` -------------------------------- ### GET /licences Source: https://portal.api.business.govt.nz/api/radiospectrum-management Retrieves a list of radio and spectrum licenses. The page size can be adjusted, with a maximum of 1000 records per page. ```APIDOC ## GET /licences ### Description Retrieves a list of radio and spectrum licenses. The page size can be adjusted, with a maximum of 1000 records per page. ### Method GET ### Endpoint /licences ### Query Parameters - **pageSize** (integer) - Optional - The number of results to return per page (maximum 1000). ### Response #### Success Response (200) - **licences** (array) - A list of licence objects. - **id** (string) - The unique identifier for the licence. - **licenceNumber** (string) - The licence number. - **licenceType** (string) - The type of licence (e.g., 'Spectrum', 'Radio'). - **registrationDate** (string) - The date the licence was registered. - **expiryDate** (string) - The date the licence expires. - **cancellationDate** (string) - The date the licence was cancelled. - **transmitLocations** (array) - List of transmit locations for the licence. - **locationAltitude** (number) - The altitude of the location. - **locationAltitudeUOM** (string) - The unit of measure for the altitude. - **receiveLocations** (array) - List of receive locations for the licence. - **locationAltitude** (number) - The altitude of the location. - **locationAltitudeUOM** (string) - The unit of measure for the altitude. #### Response Example { "licences": [ { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "licenceNumber": "SPEC12345", "licenceType": "Spectrum", "registrationDate": "2023-01-15T00:00:00Z", "expiryDate": "2028-01-15T00:00:00Z", "cancellationDate": null, "transmitLocations": [ { "locationAltitude": 100, "locationAltitudeUOM": "Meters" } ], "receiveLocations": [] } ] } ``` -------------------------------- ### GET /equipment Source: https://portal.api.business.govt.nz/content/radio_spectrum_management_0.9.3 Searches the Register of Radio Frequencies for equipment records. The retrieved data can be used in the UploadLicences API. ```APIDOC ## GET /equipment ### Description Search the Register of Radio Frequencies and return matching equipment. ### Method GET ### Endpoint /equipment ### Parameters #### Query Parameters - **page** (Page) - Optional - The page in the collection to return. - **pageSize** (PageSize) - Optional - The requested number of items to include in each page returned. - **sortOrder** (SortOrder) - Optional - The sort order. - **sortBy** (EquipmentSortBy) - Optional - The field to sort by. - **search** (string) - Required - The text string to search for. Free-text search across Make, Model, Band or Identifier. ### Response #### Success Response (200) - **EquipmentSearchResults** - Reference Data Equipment Search results #### Error Responses - **400** - Request failed validation. Appropriate headers not provided or request did not validate or is not supported. - **401** - Permission Denied, need to be authenticated to access or modify this resource. - **403** - Permission Denied, need to be authorised to access or modify this resource. - **404** - Specified resource was not found. - **405** - This method is not supported by the target resource. - **406** - Content-type must be application/json. - **412** - RealMe Federated Login Token must be provided. - **429** - The rate limit has been exceeded. - **500** - An internal error has occurred. - **503** - The server is currently unable to handle this request. #### Response Example (200) { "example": "EquipmentSearchResults" } ``` -------------------------------- ### GET /statistics Source: https://portal.api.business.govt.nz/api/market-rent Retrieves market rent statistics based on specified parameters. Supports CSV download. ```APIDOC ## GET /statistics ### Description Retrieves market rent statistics for a specified period and area definition. The response can be downloaded as a CSV file. ### Method GET ### Endpoint /gateway/tenancy-services/market-rent/v2/statistics ### Parameters #### Query Parameters - **period-ending** (string) - Required - The period end date in 'yyyy-mm' format. Must be earlier than the month prior to the current date. - **num-months** (integer) - Required - The number of months of data to include. Must be between 1 and 24. - **area-definition** (string) - Required - Specifies the granularity of the areas. Examples: 'regional-council-2019', 'territorial-authority-2019', 'SAU2019'. - **area-codes** (string) - Optional - Comma-separated list of area codes to filter results. - **area-labels** (string) - Optional - Comma-separated list of area labels to filter results. - **dwelling-type** (string) - Optional - Filters statistics by dwelling type. Allowed values: 'Apartment', 'Boarding House', 'Flat', 'House', 'Room', 'ALL'. - **num-bedrooms** (string) - Optional - Filters statistics by number of bedrooms. Allowed values: '1', '2', '3', '4', '5+', 'NA'. - **include-aggregates** (boolean) - Optional - If true, includes aggregate statistics across all combinations of report factors. ### Request Example ``` https://api.business.govt.nz/gateway/tenancy-services/market-rent/v2/statistics?period-ending=2020-10&num-months=1&area-definition=regional-council-2019&dwelling-type=Apartment&include-aggregates=true ``` ### Response #### Success Response (200) - **nLodged** (integer) - Number of bonds lodged in the period (randomly rounded). - **nClosed** (integer) - Number of bonds closed in the period (randomly rounded). - **nCurr** (integer) - Total number of active bonds at the end of the period (randomly rounded). - **mean** (float) - Mean weekly rent of bonds lodged within the period. - **lq** (float) - Lower Quartile weekly rent of bonds lodged within the period. - **med** (float) - Median weekly rent of bonds lodged within the period. - **uq** (float) - Upper Quartile weekly rent of bonds lodged within the period. - **sd** (float) - Sample Standard Deviation of weekly rent. - **brr** (float) - Mean Bond/Rent Ratio. - **lmean** (float) - Mean of the natural logarithm of weekly rent. - **lsd** (float) - Sample standard deviation of the natural logarithm of weekly rent. - **slq** (float) - Synthetic Lower Quartile Weekly Rent. - **suq** (float) - Synthetic Upper Quartile Weekly Rent. #### Response Example (CSV format) ```csv period-ending,area-definition,area-label,dwelling-type,num-bedrooms,nLodged,nClosed,nCurr,mean,lq,med,uq,sd,brr,lmean,lsd,slq,suq 2020-10,regional-council-2019,Auckland,Apartment,1,150,140,160,500.00,450.00,500.00,550.00,50.00,0.20,6.21,0.10,495.00,545.00 ``` ``` -------------------------------- ### MBIE Echo API - v2 Source: https://portal.api.business.govt.nz/apis Demonstrates the process for subscribing to and calling an API on MBIE's cloud API platform. ```APIDOC ## MBIE Echo API - v2 ### Description This API demonstrates the process for subscribing to and calling an API on MBIE's cloud API platform. It can be used during development to test the use of API subscriber keys, and optionally OAuth2 tokens. ### Method GET ### Endpoint /v2/echo ### Parameters #### Query Parameters - **message** (string) - Optional - A message to be echoed back. ### Request Example ``` GET /v2/echo?message=Hello MBIE ``` ### Response #### Success Response (200) - **echo** (string) - The message echoed back from the API. #### Response Example ```json { "echo": "Hello MBIE" } ``` ``` -------------------------------- ### Get Discoverable/History Sub-resource Links Source: https://portal.api.business.govt.nz/api/nzbn The 'Get discoverable' and 'Get history' endpoints will always return links to all sub-resources, even if no related data exists for the entity. ```APIDOC ## Get Discoverable/History Sub-resource Links ### Description The endpoints `GET /entities/{nzbn}/discoverable` and `GET /entities/{nzbn}/history` are designed to always return links to all sub-resources, even if no related data exists for the entity. This is the intended behavior. ### Method GET ### Endpoint /entities/{nzbn}/discoverable /entities/{nzbn}/history ### Parameters #### Path Parameters - **nzbn** (string) - Required - The New Zealand Business Number of the entity. ### Request Example ```json { "nzbn": "1234567890" } ``` ### Response #### Success Response (200) - **links** (array) - An array containing links to all possible sub-resources. #### Response Example ```json { "links": [ { "rel": "addresses", "href": "/entities/1234567890/addresses" }, { "rel": "history", "href": "/entities/1234567890/history" } ] } ``` ### Notes This is the designed behavior for these endpoints. ``` -------------------------------- ### Get Entity Addresses Limitations Source: https://portal.api.business.govt.nz/api/nzbn The 'Get entity addresses' endpoints will always return links for all address types, even if no data exists for that entity. ```APIDOC ## Get Entity Addresses Limitations ### Description The endpoints `GET /entities/{nzbn}/addresses` and `GET /entities/{nzbn}/history/addresses` are designed to always return links for all available address types, irrespective of whether related data exists for the specified entity. This is the intended behavior. ### Method GET ### Endpoint /entities/{nzbn}/addresses /entities/{nzbn}/history/addresses ### Parameters #### Path Parameters - **nzbn** (string) - Required - The New Zealand Business Number of the entity. ### Request Example ```json { "nzbn": "1234567890" } ``` ### Response #### Success Response (200) - **links** (array) - An array containing links to all possible address types. #### Response Example ```json { "links": [ { "rel": "physical", "href": "/entities/1234567890/addresses/physical" }, { "rel": "postal", "href": "/entities/1234567890/addresses/postal" } ] } ``` ### Notes This is the designed behavior for these endpoints. ``` -------------------------------- ### POST /websites/portal_api_business_govt_nz/equipment Source: https://portal.api.business.govt.nz/content/radio_spectrum_management_0.9.3 Creates an Equipment reference data entity record. This endpoint allows for the creation of new equipment entries within the reference data system. ```APIDOC ## POST /websites/portal_api_business_govt_nz/equipment ### Description This creates an Equipment reference data entity record. ### Method POST ### Endpoint /websites/portal_api_business_govt_nz/equipment ### Parameters #### Request Body - **equipment** (object) - Required - Details of the equipment to be created. ### Request Example ```json { "equipment": { "equipmentName": "Example Equipment", "equipmentDescription": "This is an example equipment" } } ``` ### Response #### Success Response (201) - **Content-Location** (string) - Header containing the URI of the newly created resource. - **equipment** (object) - Details of the created reference data equipment. #### Response Example ```json { "equipment": { "equipmentId": "123e4567-e89b-12d3-a456-426614174000", "equipmentName": "Example Equipment", "equipmentDescription": "This is an example equipment" } } ``` #### Error Responses - **400**: Request failed validation. Appropriate headers not provided or request did not validate or is not supported. - **401**: Permission Denied, need to be authenticated to access or modify this resource. - **403**: Permission Denied, need to be authorised to access or modify this resource. - **404**: Specified resource was not found. - **405**: This method is not supported by the target resource. - **406**: Content-type must be application/json. - **412**: RealMe Federated Login Token must be provided. - **429**: The rate limit has been exceeded. - **500**: An internal error has occurred. - **503**: The server is currently unable to handle this request. ``` -------------------------------- ### Get Entity Data Limitations Source: https://portal.api.business.govt.nz/api/nzbn The 'Get entity data' operation has limitations regarding the 'lastUpdateDate' field for certain entity types and the 'shareholder.shareholderAddress' field for specific shareholder types. ```APIDOC ## Get Entity Data Limitations ### Description This endpoint has two known limitations: 1. The `lastUpdateDate` field returns `null` for Limited Partnerships, Incorporated Societies, and Charitable Trusts. It functions correctly for Companies, Sole Traders, Partnerships, Trusts, and Public Sector Entities. 2. The `shareholder.shareholderAddress` field returns `null` when the `shareholder.type` is 'other'. This has been partially fixed, with `uniqueIdentifier` and date fields also returning null. ### Method GET ### Endpoint /entities/{nzbn} ### Parameters #### Path Parameters - **nzbn** (string) - Required - The New Zealand Business Number of the entity. ### Request Example ```json { "nzbn": "1234567890" } ``` ### Response #### Success Response (200) - **lastUpdateDate** (string) - The date the entity data was last updated (may be null for specific types). - **shareholder** (object) - Information about the entity's shareholders. - **shareholderAddress** (object) - The address of the shareholder (may be null for specific types). #### Response Example ```json { "lastUpdateDate": "2023-10-27T10:00:00Z", "shareholder": { "type": "individual", "shareholderAddress": { "streetAddress": "123 Main St", "suburb": "Auckland", "city": "Auckland", "postalCode": "1010", "country": "New Zealand" } } } ``` ### Notes These limitations are planned to be fixed in future releases. ``` -------------------------------- ### Tenancy Bond API v2 Sandbox Testing Source: https://portal.api.business.govt.nz/api/tenancy-bond This section details the sandbox testing environment for the Tenancy Bond API v2. It includes the base path for sandbox requests and outlines the currently supported operations. ```APIDOC ## Tenancy Bond API v2 Sandbox Testing ### Description This section provides details for testing the Tenancy Bond API v2 in a sandbox environment. It outlines the base URL for sandbox requests and lists the operations currently available for testing. ### Base Path for Sandbox Testing `https://api.business.govt.nz/sandbox/tenancy-services/tenancy-bond/v2/` ### Supported Operations in Sandbox * **POST /bond-lodgement** (including Pet Bonds) * **POST /bond-top-up** (including Pet Bonds) ### Request Example (POST Bond Lodgement) ```json { "example": "{\n \"landlord_name\": \"John Doe\",\n \"tenant_names\": [\"Jane Smith\", \"Peter Jones\"],\n \"bond_amount\": 1200.00,\n \"pet_bond\": true\n}" } ``` ### Response Example (Success - 201 Created) ```json { "example": "{\n \"lodgement_id\": \"BOND12345\",\n \"status\": \"Lodged\",\n \"message\": \"Bond lodgement successful.\"\n}" } ``` ### Error Handling * **400 Bad Request**: Invalid input data. * **401 Unauthorized**: Authentication failed. * **404 Not Found**: Resource not found. * **500 Internal Server Error**: Server error. ``` -------------------------------- ### Get CERT NZ Collections API Request Source: https://portal.api.business.govt.nz/api/phishing-disruption-service This HTTP GET request retrieves a list of available collections from the CERT NZ Threat Feed API. It requires an environment parameter (sandbox or gateway) and specific subscription key headers. ```http GET https://api.business.govt.nz/{environment}/certnz/phishing-disruption/v2/partners/collections/ Accept: application/vnd.oasis.stix+json; version=2.0 Content-Type: application/vnd.oasis.stix+json; version=2.0 Ocp-Apim-Subscription-Key: {{subscriber-key}} ``` -------------------------------- ### Retrieve Entity Data with ETag Check (HTTP) Source: https://portal.api.business.govt.nz/api/nzbn This example demonstrates how to retrieve entity data using the NZBN API, specifically utilizing ETags for conditional requests. It shows the request headers, including 'Accept', 'If-None-Match', and 'Ocp-Apim-Subscription-Key', and the expected '304 Not Modified' response if the data has not changed. If the data has been updated, a '200 OK' response with the data in the body would be returned. ```http GET {host}/gateway/nzbn/v5/entities/9429000106078 Headers Accept: application/json If-None-Match: 7f898a5b-904b-3b48-9cf9-fddb6bb4c5e6 Ocp-Apim-Subscription-Key: {subscription-key} Response HTTP/1.1 304 Not Modified ``` -------------------------------- ### GET /antennas Source: https://portal.api.business.govt.nz/api/radiospectrum-management Retrieves information about antennas. The response includes new attributes for detailed antenna specifications. ```APIDOC ## GET /antennas ### Description Retrieves information about antennas. The response includes new attributes for detailed antenna specifications. ### Method GET ### Endpoint /antennas ### Response #### Success Response (200) - **antennas** (array) - A list of antenna objects. - **id** (string) - The unique identifier for the antenna. - **lowFrequency** (number) - The lower frequency bound of the antenna. - **highFrequency** (number) - The upper frequency bound of the antenna. - **gainLow** (number) - The gain at the lower frequency. - **gainMid** (number) - The gain at the mid-frequency. - **gainHigh** (number) - The gain at the higher frequency. - **beamWidth** (number) - The beam width of the antenna. - **diameter** (number) - The diameter of the antenna. - **frontBackRatio** (number) - The front-to-back ratio of the antenna. - **xpol** (number) - The cross-polarization discrimination. #### Response Example { "antennas": [ { "id": "antenna-123", "lowFrequency": 100000000, "highFrequency": 200000000, "gainLow": 10, "gainMid": 12, "gainHigh": 11, "beamWidth": 30, "diameter": 1.5, "frontBackRatio": 20, "xpol": 25 } ] } ``` -------------------------------- ### Licence and Spectrum Data Structures Source: https://portal.api.business.govt.nz/content/radio_spectrum_management_0.9.3 This section details the data structures used for Licence and Spectrum records within the API. ```APIDOC ## Data Structures ### Spectrum Record Details This object contains details related to a Spectrum record. **Properties:** - **spectrumId** (`string`): Identifier for the spectrum record. - **channel** (`string`): Channel description. - **spectrumLow** (`string`): Lower bound of the spectrum frequency. - **spectrumHigh** (`string`): Upper bound of the spectrum frequency. - **spectrumStatus** (`string`): Status of the Spectrum Record. - **serviceType** (`string`): Type of service. - **polarisation** (`string`): Polarization of the spectrum. - **accessCode** (`string`): Access code for the spectrum. - **remarks** (`string`): Remarks related to the spectrum record. - **startDate** (`string`): Start date for the spectrum record (format: date). - **endDate** (`string`): End date for the spectrum record (format: date). - **referenceFrequencies** (`array` of `string`): List of reference frequencies. - **unwantedEmissionLimits** (`array` of `string`): List of unwanted emission limits. ### Associated Licence or Record This object represents an association between a licence and another record. **Properties:** - **licenceId** (`string`): Identifier for the associated licence. - **licenceNumber** (`string`): Number of the associated licence. - **associationType** (`string`): Type of association (e.g., 'Licence', 'Record'). - **primary** (`boolean`): Indicates if this is the primary associated licence. ### Related Licence This object represents a related licence. **Properties:** - **licenceId** (`string`): Identifier for the related licence. - **licenceNumber** (`string`): Number of the related licence. - **remarks** (`string`): Remarks related to the licence. ### Common Licence Response Fields This object includes common fields found in licence-related responses. **Required Properties:** - **licenceDiscriminator** (`string`): Discriminator for the licence type. **Properties:** - **summary** (`string`): Summary of the licence. - **licenceID** (`string`): Identifier for the licence. - **licenceNumber** (`string`): Number of the licence. - **systemId** (`string`): System Identifier for the Licence. - **lastUpdated** (`string`): Date Timestamp when the entity was last updated (format: date-time). - **clientDetails** (`object`): Details of the client associated with the licence. - **licenceStatus** (`string`): Status of the licence. - **licenceReference** (`string`): Reference for the licence. - **licenceType** (`string`): Type of the licence. - **licenceClassification** (`string`): Classification of the licence. - **baseCallsign** (`string`): Base Callsign associated with the licence. - **mobileCallsign** (`string`): Mobile Callsign associated with the licence. - **engineer** (`string`): Engineer associated with the licence. - **fixedTerm** (`boolean`): Indicates if the licence is fixed term. - **commencementDate** (`string`): Date the licence commenced (format: date). - **expiryDate** (`string`): Date the licence expires (format: date). - **cancellationDate** (`string`): Date the licence was cancelled (format: date). - **grantedDate** (`string`): Date the licence was granted (format: date). - **anniversaryMonth** (`integer`): Anniversary month of the licence. - **annualLicenceFees** (`number`): Annual fees for the licence. - **feesPaidOn** (`string`): Date the fees were paid (format: date). - **paidUpUntil** (`string`): Date until which fees are paid (format: date). - **additionalInformation** (`string`): Additional information about the licence. ### Enumerated Values - **AssociationType**: 'Licence', 'Record' - **TXRX**: 'TX', 'RX' - **TransferLicenceAuthority**: 'Rightholder Only', 'Rightholder and Manager' - **LicenceAuthority**: 'Rightholder Only', 'Rightholder and Manager', 'Rightholder or Manager', 'Manager Only' ``` -------------------------------- ### Get CERT NZ Phishing Indicators API Request Source: https://portal.api.business.govt.nz/api/phishing-disruption-service This HTTP GET request retrieves a list of phishing indicators from a specific CERT NZ collection. It uses query parameters to filter by date and type, and a Range header to limit results. The response may be partial (206 Partial Content). ```http GET https://api.business.govt.nz/{environment}/certnz/phishing-disruption/v2/partners/collections/7605c355-ff43-4dc5-8f21-86f4b909bbf1/objects/?added_after=2023-01-09T00:00:00Z&match[type]=indicator Accept: application/vnd.oasis.stix+json; version=2.0 Content-Type: application/vnd.oasis.stix+json; version=2.0 Range: items 0-19 Ocp-Apim-Subscription-Key: {{subscriber-key}} ``` -------------------------------- ### GET /spectrummasks Source: https://portal.api.business.govt.nz/content/radio_spectrum_management_0.9.3 Searches the Register of Radio Frequencies for SpectrumMask records. The retrieved data can be used in the UploadLicences API. ```APIDOC ## GET /spectrummasks ### Description This is a REST API to search for SpectrumMask records used in the Register of Radio Frequencies. The data retrieved can then be used in the UploadLicences API. ### Method GET ### Endpoint /spectrummasks ### Parameters #### Query Parameters - **page** (integer) - Optional - The page in the collection to return. Defaults to 1. Maximum value is 399. - **pageSize** (integer) - Optional - The requested number of items to include in each page returned. Minimum value is 1, maximum is 200. - **search** (string) - Required - The text string to search for. Free-text search across Identifier or Description. - **sortOrder** (SortOrder) - Optional - The sort order. - **sortBy** (SpectrumMasksSortBy) - Optional - The field to sort by. ### Response #### Success Response (200) - **SpectrumMaskSearchResults** (object) - Reference Data SpectrumMask Search results #### Response Example ```json { "example": "SpectrumMaskSearchResults object" } ``` #### Error Responses - **400**: Request failed validation. Appropriate headers not provided or request did not validate or is not supported. - **401**: Permission Denied, need to be authenticated to access or modify this resource. - **403**: Permission Denied, need to be authorized to access or modify this resource. - **404**: Specified resource was not found. - **405**: This method is not supported by the target resource. - **406**: Content-type must be application/json. - **412**: RealMe Federated Login Token must be provided. - **429**: The rate limit has been exceeded. - **500**: An internal error has occurred. - **503**: The server is currently unable to handle this request. ``` -------------------------------- ### POST /licences Source: https://portal.api.business.govt.nz/api/radiospectrum-management Creates a new radio or spectrum license. Includes validation to ensure required fields and data are present, mirroring the online register's validation. ```APIDOC ## POST /licences ### Description Creates a new radio or spectrum license. Includes validation to ensure required fields and data are present, mirroring the online register's validation. ### Method POST ### Endpoint /licences ### Request Body - **newSpectrumRecords** (object) - Required - Details for the new spectrum record. - **polarisation** (string) - Required - The polarisation of the spectrum record. - **referenceFrequencies** (array) - Required - List of reference frequencies. - **frequency** (number) - Required - The frequency value. - **frequencyType** (string) - Required - The type of frequency (e.g., 'Nominal', 'Maximum'). - **powerType** (string) - Required - The type of power. - **horizontalRadiationPatterns** (array) - Required - Horizontal radiation patterns. - **verticalRadiationPatterns** (array) - Required - Vertical radiation patterns. ### Request Example { "newSpectrumRecords": { "polarisation": "Vertical" }, "referenceFrequencies": [ { "frequency": 100000000, "frequencyType": "Nominal", "powerType": "EIRP" } ], "horizontalRadiationPatterns": [], "verticalRadiationPatterns": [] } ### Response #### Success Response (200) - **id** (string) - The unique identifier for the newly created licence. - **licenceNumber** (string) - The licence number assigned. #### Response Example { "id": "f0e9d8c7-b6a5-4321-fedc-ba9876543210", "licenceNumber": "SPEC67890" } ```