Discovery API - Test
Example - Place order for a product which has prerequisites
1. Use Orders API to list products for a property
Example request
curl --request GET \
--location 'https://test.api.servictoria.io/ddp/orders/v1/products?propertyPfi=125302241' \
--header 'customer-id: example123' \
--header 'Authorization: Bearer ******'
Example response (truncated)
Take note of the "prerequisites" field, the elements in this array indicate which prerequisites this product requires. In this example, the "prerequisites" section shows 2 RSS with different titleIds, this indicates that there are 2 titles associated with the provided property.
{
"products": [
...
{
"productCode": "VicRoads",
"productIds": {
"propertyPfi": "125302241",
"authorityId": 431
},
"productName": "Vicroads Certificate",
"productDescription": "Information on approved road proposals requiring any portion of the described property. This certificate only covers road proposals involving VicRoad. It does not cover road proposals under the control of Local Government authorities.",
"productAvailability": "AVAILABLE",
"authorityName": "VICROADS",
"price": 2222,
"gst": 202,
"turnaroundTime": 5,
"turnaroundTimeUnit": "DAY",
"prerequisites": [
{
"productCode": "RegisterSearchStatement",
"productIds": {
"titleId": "cYllw6nIgbPwfF8q/F3zPvtOTMR+8e5cCA=="
},
"productName": "Register Search Statement (Copy of Title)",
"productDescription": "PDF version of the copy of the Title, lists the current registered proprietors, any encumbrances, caveats or notices that apply to the land, but does not include a sketch of the plan.",
"productAvailability": "AVAILABLE",
"authorityName": "Land Registry",
"price": 640,
"gst": 0,
"turnaroundTime": 5,
"turnaroundTimeUnit": "MIN"
},
{
"productCode": "RegisterSearchStatement",
"productIds": {
"titleId": "buh0CO0tzybFTdBDoY61kG+j17oqMj95nQ=="
},
"productName": "Register Search Statement (Copy of Title)",
"productDescription": "PDF version of the copy of the Title, lists the current registered proprietors, any encumbrances, caveats or notices that apply to the land, but does not include a sketch of the plan.",
"productAvailability": "AVAILABLE",
"authorityName": "Land Registry",
"price": 640,
"gst": 0,
"turnaroundTime": 5,
"turnaroundTimeUnit": "MIN"
}
]
},
...
]
}
2. Submit order with prerequisites
To order this product, all 2 RSS will also need to be purchased within the same order (alternatively, a previous order which purchased the same RSS can be provided). The provided RSS titleIds must match the prerequisite RSS titleIds. The RSS for all 2 of the associated titles needs to be provided in order for the VicRoads Certificate to be purchased.
Example request
curl --request POST \
--location 'https://test.api.servictoria.io/ddp/orders/v1' \
--header 'customer-id: example123' \
--header 'customer-reference: Example customer reference' \
--header 'Authorization: Bearer ******' \
--data-raw '{
"products": [
{
"productCode": "VicRoads",
"productIds": {
"propertyPfi": "203487790",
"authorityId": 431
},
"prerequisites": [
{
"productCode": "RegisterSearchStatement",
"productIds": {
"titleId": "cYllw6nIgbPwfF8q/F3zPvtOTMR+8e5cCA=="
}
},
{
"productCode": "RegisterSearchStatement",
"productIds": {
"titleId": "buh0CO0tzybFTdBDoY61kG+j17oqMj95nQ=="
}
}
]
},
{
"productCode": "RegisterSearchStatement",
"productIds": {
"titleId": "cYllw6nIgbPwfF8q/F3zPvtOTMR+8e5cCA=="
}
},
{
"productCode": "RegisterSearchStatement",
"productIds": {
"titleId": "buh0CO0tzybFTdBDoY61kG+j17oqMj95nQ=="
}
}
],
"deliveryPreference": "EMAIL",
"email": "john.citizen@example.com",
"contactName": "John Citizen"
}'
Example response
{
"orderId": "11908226",
"totalPrice": 5090,
"totalGst": 346,
"fees": [
{
"type": "Land Index Search Charge",
"amount": 794,
"gst": 72,
"feeDetails": {
"titleId": {
"cYllw6nIgbPwfF8q/F3zPvtOTMR+8e5cCA==": "10820/137"
}
}
},
{
"type": "Land Index Search Charge",
"amount": 794,
"gst": 72,
"feeDetails": {
"titleId": {
"buh0CO0tzybFTdBDoY61kG+j17oqMj95nQ==": "11016/968"
}
}
}
],
"itemsOrdered": [
{
"orderItemNumber": 1,
"productCode": "VicRoads",
"productIds": {
"propertyPfi": "125302241",
"authorityId": 431
},
"productName": "Vicroads Certificate",
"authorityName": "VICROADS",
"price": 2222,
"gst": 202
},
{
"orderItemNumber": 2,
"productCode": "RegisterSearchStatement",
"productIds": {
"titleId": "cYllw6nIgbPwfF8q/F3zPvtOTMR+8e5cCA=="
},
"productName": "Register Search Statement (Copy of Title)",
"authorityName": "Land Registry",
"price": 640,
"gst": 0
},
{
"orderItemNumber": 3,
"productCode": "RegisterSearchStatement",
"productIds": {
"titleId": "buh0CO0tzybFTdBDoY61kG+j17oqMj95nQ=="
},
"productName": "Register Search Statement (Copy of Title)",
"authorityName": "Land Registry",
"price": 640,
"gst": 0
}
]
}