Server Information
- Testing Env: https://staging.greendeal.com.au/rapi/v1
- Production: https://www.greendeal.com.au/rapi/v1
- Account: Please send an email to supportATgreendeal.com.au to request an clientid and secret_id for your retailer portal integration.
Request Parameter
For every web service call, following parameters must be present in the request.
Parameter | Type | Is Required? | Description |
client_id | String | Yes | assign client_id to app |
timestamp | String | Yes |
1.Format is yyyy-MM-ddTHH:mm:ss:z,for example:2016-01-01T12:00:00+11:00. 2.The maximum time error that the API server allowed is 10 minutes. |
signature | String | Yes |
Please see Signature Algorithm section for working out the value of the signature. |
Signature
Signature Algorithm
For every request, we will need to have a 'signature' parameter in it for the authentication. Server will reject the request if the signature value failed in the validation.
- Append client id, timestamp, client_secret in the string, with the appendix of"GD:" eg. signature_string = "GD:"+ client_id+timestamp+client_secret
- Encrypt the signature_string that we have in the above step. eg. md5(signature_string).
-
MD5 uses a 128-bit length digest algorithm, which is expressed in hexadecimal.
A hexadecimal character can represent 4 bits, so the signed character length is fixed to 32 hexadecimal characters.
Signature Example:
client = 'uid7' timestamp = '2018-11-04T22:49:36+11:00' client_secret = 'secret7' signature string: signature_string = "GD:uid72018-11-04T22:49:36+11:00secret7" response from MD5: signature = b1dd868452f87473b91131e7a58e044a
Restful Services
Get STC Job
Path: /pvds/:id.json
Example: https://www.greendeal.com.au/rapi/v1/pvds/GWT00000.json
id means gwtid
HTTP Method:GET
Request Parameter
Parameter | Type | Is Required? | Example |
gwtid | String | Yes | "GWT12234" |
Response
Parameter | Type | Example | Description |
code | Integer | 200 |
status code: 200: success 400: parameters error 401: authorization failure |
message | String | an error message will be returned here if the request is incorrect | |
response | JSON | ||
response["body"] | JSON | stc_job_detail_data |
Stc Job Detail parameter info
Parameter | Type | Description |
gwtid | String | The gwtid assigned to the pvd |
pvd_num | String | the government will assign a id to the submitted job |
trade_mode | String |
Has to be one of the following options:
Credit
Cash
|
claimed_quantity | Integer | System -> RECs Quantity |
price | Decimal | The sold price for this STC Job. |
gst | Boolean |
1. gst=true :this is a commercial building 2. gst=false :it is a residential building |
submit_date | Date | The date that GreenDeal submits the job to Clean Energy Regulator. |
paid_date | Date | The date that the job paid. |
credit_memo | String | Credit Memo Reference / Payment Remittance Reference |
unqualified_reasons | Text | the unqualified reason for this STC job. |
failed_reasons | Text | The reason why the government rejects this pvd. |
received_date | Datetime | Retailer's Lodged Date. |
reference | String | Order reference of this Job (e.g: your purchase order number) |
amount | Decimal | STC amount for the current Job |
install_detail | JSON | install_detail_data |
owner_detail | JSON | owner_detail_data |
system_detail | JSON | system_detail_data |
serial_numbers | Array | Panel's serial number |
serial_numbers_photo | Array | the url of photos |
stc_documents | Array | a document about information of the job |
coc_documents | Array | certificate of compliance |
invoice_documents | Array | electronic invoices provided by retailers |
other_documents | Array | other files can be uploaded |
Owner detail parameters
Parameter | Type | Description |
first_name | String | owner first name |
last_name | String | owner last name |
state | String | One of followings: 'ACT','NSW','NT','QLD','SA','TAS','VIC' and 'WA' |
phone | String | telephone number |
delivery_type | String | delivery type of postal:pobox |
delivery_number | String | delivery number of postal:766 |
suburb | String | for example:'ALLOWAY','ABBOTSFORD' and so on |
post_code | String | the region zip code |
type | String |
owner type: 1.Individual 2.Corporate body 3.Government body 4.Trustee |
type_name | String | name for owner type |
address_type | String |
address type: 1.Physical 2.Postal |
address | String | owner address |
Install detail parameter info
Parameter | Type | Description |
property_type | String |
property type: Residential School Commercial |
latitude | String | latitude of Installation Address,between -90 and 90 |
longitude | String | longitude of Installation Address,between -180 and 180 |
special_address | String | Needs some notes if the installation address is special.(e.g:Fosters Dam Pump Site) |
installation_address | String | the detailed installation address |
single_or_multi_story | String | A selection of the installation address is single story or multi story. |
System detail parameter info
Parameter | Type | Description |
deemed_years | Integer | the shelf life for the system |
installation_date | Date | the scheduled time when the installer will start the job |
type_of_connection | String |
so far there are three types: 1.Connected to an electricity grid with battery storage 2.Connected to an electricity grid without battery storage 3.Stand-alone (not connected to an electricity grid) |
system_mounting_type | String |
system mounting type: 1.Building or structure 2.Ground mounted or free standing |
rated_output | Float | rated output of each solar system |
complete_unit | String | Whether it is an additional capacity/panels to an existing system |
additional_upgrade_system_details | String | Some necessary notes needed if it is not the first time to install system |
panel_brand | String | panel brand |
panel_model | String | panel model |
number_panels | Integer | quantity of panels |
number_inverters | String | quantity of inverters |
watts_per_panel | Integer | Power per panel |
inverter_manufacture | String | Manufacturer of inverter |
inverter_series | String | inverter series |
inverter_model | String | inverter model |
Installer parameter info
Parameter | Type | Description |
first_name | String | |
last_name | String | |
accreditation | String | |
unit_type | String | |
unit_number | String | |
street_number | String | |
street_name | String | |
street_type | String | |
suburb | String | |
state | String | |
address_type | String | |
delivery_type | String | |
delivery_number | String | |
postcode | String | |
phone | String |
Designer parameter info
Parameter | Type | Description |
first_name | String | |
last_name | String | |
accreditation | String | |
unit_type | String | |
unit_number | String | |
street_number | String | |
street_name | String | |
street_type | String | |
suburb | String | |
state | String | |
address_type | String | |
delivery_type | String | |
delivery_number | String | |
postcode | String | |
phone | String |
Electrician parameter info
Parameter | Type | Description |
first_name | String | |
last_name | String | |
license | String | |
unit_type | String | |
unit_number | String | |
street_number | String | |
street_name | String | |
street_type | String | |
suburb | String | |
state | String | |
address_type | String | |
delivery_type | String | |
delivery_number | String | |
postcode | String | |
phone | String |
Request Example
{
"client_id": "23565656e63f33016ad7f4f338a6f70be78c136addbbb9c803d09756c6ee93f1",
"signature": "5faff972b3b67ca249cf4fee9e175a6d",
"timestamp": "2019-08-01T16:05:01+11:00",
"id": "GWT413858"
}
Response Example
{
"message": "success",
"code": 200,
"response": {
"body": {
"gwtid": "GWT413858",
"pvd_num": null,
"trade_mode": "Credit",
"claimed_quantity": null,
"price": null,
"gst":true,
"status": "Scheduled",
"payment_status": "Open",
"submit_date": null,
"credit_memo": null,
"unqualified_reasons": null,
"failed_reasons": null,
"created_via": "GWT",
"note": null,
"received_date": null,
"reference": "",
"amount": 0,
"created_at": "2018-06-07T11:01:55.000+10:00",
"finished_at": null,
"finished_location": null,
"install_detail": {
"property_type": "Commercial",
"latitude": null,
"longitude": null,
"special_address": "",
"installation_address": "72 Tuohey Road ARNOLD , VIC , 3551",
"single_or_multi_story": "Single story",
"same_as_postal_address":true
},
"owner_detail": {
"first_name": "",
"last_name": "",
"state": "VIC",
"phone": "0409926001",
"delivery_type": "",
"delivery_number": "",
"suburb": "ARNOLD",
"post_code": "3551",
"type": "Corporate body",
"type_name": "JT \u0026 KM \u0026 A Tuohey ",
"address_type": "Physical",
"address": "72 Tuohey Road ARNOLD , VIC , 3551"
},
"system_detail": {
"deemed_years": 13,
"installation_date": "2018-06-07",
"type_of_connection": "Connected to an electricity grid without battery storage",
"system_mounting_type": "Building or structure",
"rated_output": 6.5,
"complete_unit": "YES",
"additional_upgrade_system_details": "Please note: this is the first installation at this address",
"panel_brand": "GCL System Integration Technology Co Ltd",
"panel_model": "GCL-P6/72325",
"number_panels": 20,
"number_inverters": "1",
"watts_per_panel": 325,
"inverter_manufacture": "Jiangsu GoodWe Power Supply Technology Co Ltd",
"inverter_series": "DNS",
"inverter_model": "GW5000D-NS"
},
"serial_numbers": [
"311801102551347",
"311801102551419",
"311801102551423",
"311801102551440"
],
"serial_numbers_photo": [
"https://s3-ap-southeast-2.amazonaws.com/greendeals3-test/uploads/pvd_serial_number/photo/1144855/ea284d78-8ab2-4f43-ab52-3bd0bcb769f2.png",
"https://s3-ap-southeast-2.amazonaws.com/greendeals3-test/uploads/pvd_serial_number/photo/1144856/71ef30bf-c609-4be3-a59a-6afdbb18a5f3.png"
],
"installer": {
"first_name": "Lily",
"last_name": "Jackson",
"accreditation": "A0000001",
"unit_type": "Apt. 155",
"unit_number": "3499",
"street_number": "47 Ava Run",
"street_name": "Bruen Trail",
"street_type": "Street",
"suburb": "East Ivystad",
"state": "TAS",
"address_type": "physical",
"delivery_type": "",
"delivery_number": "",
"postcode": "3191",
"phone": "0483404356"
},
"designer": {
"first_name": "Adam",
"last_name": "Collier",
"accreditation": "A0000002",
"unit_type": "Apt. 243",
"unit_number": "765",
"street_number": "473 Henry Meadow",
"street_name": "Bode Boulevard",
"street_type": "Street",
"suburb": "Lake Mayaborough",
"state": "WA",
"address_type": "physical",
"delivery_type": "",
"delivery_number": "",
"postcode": "3329",
"phone": "0413340599"
},
"electrician": {
"first_name": "Leah",
"last_name": "Little",
"license": "6745260859",
"unit_type": "Apt. 189",
"unit_number": "9321",
"street_number": "90 Young Court",
"street_name": "Hackett Summit",
"street_type": "Mews",
"suburb": "West Jasmineview",
"state": "QLD",
"address_type": "physical",
"delivery_type": "",
"delivery_number": "",
"postcode": "2134",
"phone": "0479439278"
},
"stc_documents": [],
"coc_documents": [],
"invoice_documents": [],
"other_documents": []
}
}
}
Create stc jobs
Path: /pvds.json
Example: https://www.greendeal.com.au/rapi/v1/pvds.json
HTTP Method:POST
Request Parameter
Parameter | Type | Is Required? | Note | Example |
created_by | String | No | The user must exist in the current Retailer's User List. | "xxx@gmail.com" |
trade_mode | String | Yes | Trade mode, Valid values are: "Creadit" or "Cash" | "Credit" |
po_reference | String | Yes | Customer Reference | "A2444" |
order_reference | String | Yes | Order Reference | "RSB7908" |
gst | String | Yes |
1.gst=true this is a commercial building 2.gst=false it is a residential building |
"false" |
owner_address | Hash | No | See owner_address params info |
|
install_address | Hash | No | See install_address params info |
|
system | Hash | No | See system params info |
|
installer | Hash | No | See installer params info |
|
designer | Hash | No | See designer params info |
|
electrician | Hash | No | See electrician params info |
|
owner_address params info
Parameter | Type | Is Required? | Note | Example |
owner_type | String | Yes |
Valid values are: "Individual", "Corporate body", "Government body" or "Trustee" |
"Individual" |
first_name | String | No | first name | "Avril Ramona" |
last_name | String | No | last name | "Lavigne" |
owner_type_name | String | No | the name of owner type | "INTERNATIONAL FISH SUPPLIERS PTY. LTD" |
unit_type | String | No | unit Type of owner address | "ANT" |
unit_number | String | No | unit number of owner address | "4" |
street_number | String | No | street number of owner address | "10" |
street_name | String | No | street name of owner address | "GEORGE ST" |
street_type | String | No | street Type of owner address | "ACCESS" |
suburb | String | Yes | suburb of the owner address | "Barangaroo" |
state | String | No | state of the owner address | "QLD" |
post_code | String | Yes | the region zip code | "4571" |
address_type | String | No |
Type of owner address 1.physical 2.p_o_box(postal) Valid values are: "physical" or "p_o_box" |
"physical" |
phone | String | Yes | owner phone | "07 3387 1810" |
String | No | owner email | "stc@greendeal.com.au" |
install_address params info
Parameter | Type | Is Required? | Note | Example |
property_type | String | Yes |
Valid values are: "Residential", "School" or "Commercial" |
"School" |
story | String | Yes | Valid values are: "Single story" or "Multi story" | "Single story" |
nmi | String | No | serial number of electric meter | "1111111111" |
unit_type | String | No | unit type | "ANT" |
unit_number | String | No | unit number | "25" |
street_number | String | No | street number | "33" |
street_name | String | No | street name | "JERVIS" |
street_type | String | No | street type | "ACCESS" |
suburb | String | Yes | suburb | "BEECHMONT" |
state | String | No | state | "QLD" |
post_code | String | Yes | post code | "4211" |
latitude | String | No | between -90 and 90 | "50" |
longitude | String | No | between -180 and 180 | "80" |
special_address | String | No | special address | "Street type should be : Avenue south" |
System params info
Parameter | Type | Is Required? | Note | Example |
complete_unit | Boolean | Yes |
Whether it is an additional capacity/panels to an existing system 1.True:It isn't an additional capacity/panels to an existing sysytem 2.False:It is an additional capacity/panels to an existing sysytem |
"true" |
connected | Int | Yes |
Type of Connection so far there are three types: "Connected to an electricity grid with battery storage" -> "1" "Connected to an electricity grid without battery storage" -> "2" "Stand-alone (not connected to an electricity grid)" -> "3" |
"1" |
battery_storage_manufacturer | String | No | battery storage manufacturer | "Sungrow-Samsung" |
battery_storage_model | String | No | battery storage model | "SG-WMB-SBP4K8" |
install_date | Date | Yes | installation date | "2018-10-10" |
install_on_building | Boolean | yes |
System mounting type 1.value=true install on building or structure 2.value=false Ground mounted or free standing |
"true" |
deemed_years | Int | No | default 13 | "12" |
additional_capacity_details | String | Yes | Some necessary notes needed if it is not the first time to install system | Existnig 3kw sysytem located on north roof. 6 new panels replaced to old system. Located on south-west facing south. |
install_additional_information | String | No | additional information | This is a commercial building,signer is general maneger of this company.Company ABN isXXXXXXXX |
inverters | Array | No | See inverters info | |
panels | Array | No | See panels info |
Panels params info
Parameter | Type | Is Required? | Note | Example |
brand_id | Int | Yes | brand id, see get panel brands | |
watts_per | String | Yes | See get panel brands | "12" |
qty | Int | Yes | | |
Inverters params info
Parameter | Type | Is Required? | Note | Example |
brand_id | Int | Yes | See get inverter brands | |
qty | Int | Yes | | |
Installer params info
Parameter | Type | Is Required? | Note | Example |
first_name | String | Yes | ||
last_name | String | Yes | ||
accreditation | String | Yes |
Designer params info
Parameter | Type | Is Required? | Note | Example |
first_name | String | Yes | ||
last_name | String | Yes | ||
accreditation | String | Yes |
Eelectrician params info
Parameter | Type | Is Required? | Note | Example |
first_name | String | Yes | ||
last_name | String | Yes | ||
license | String | Yes |
Request Example
{
"client_id": "23565656e63f33016ad7f4f338a6f70be78c136addbbb9c803d09756c6ee93f1",
"signature": "49f6bab0335586a39fa061eb1cfc966b",
"timestamp": "2019-08-02T09:45:23+11:00",
"trade_mode": "Cash",
"po_reference": "test",
"gst": "false",
"install_address": {
"property_type": "Commercial",
"story": "Single story",
"post_code": 4211,
"suburb": "BEECHMONT"
},
"system": {
"complete_unit": "true",
"connected": "1",
"install_date": "2019-08-05",
"install_on_building": "true",
"additional_capacity_details": "6 new panels replaced to old system",
"panels": [{
"brand_id": 1001,
"watts_per": "12",
"qty": 1
}],
"inverters": [{
"brand_id": 84,
"qty": 1
}]
}
}
Response Example
{
"message": "success",
"code": 200,
"response": {
"body": {
"gwtid": "GWT417778",
"pvd_num": null,
"trade_mode": "Cash",
"claimed_quantity": null,
"price": null,
"gst": false,
"status": "New",
"payment_status": "Open",
"submit_date": null,
"credit_memo": null,
"unqualified_reasons": null,
"failed_reasons": null,
"created_via": "GWT",
"note": null,
"received_date": null,
"reference": null,
"amount": 0,
"created_at": "2019-08-02T19:46:04.612+10:00",
"finished_at": null,
"finished_location": null,
"install_detail": {
"property_type": "Commercial",
"latitude": null,
"longitude": null,
"special_address": null,
"installation_address": " BEECHMONT , 4211",
"single_or_multi_story": "Single story",
"same_as_postal_address": false
},
"owner_detail": {
"first_name": null,
"last_name": null,
"state": null,
"phone": null,
"delivery_type": "",
"delivery_number": "",
"suburb": null,
"post_code": null,
"type": null,
"type_name": "",
"address_type": "Physical",
"address": " "
},
"system_detail": {
"deemed_years": 15,
"installation_date": "2019-08-05",
"type_of_connection": "1",
"system_mounting_type": "Building or structure",
"rated_output": 0.012,
"complete_unit": "YES",
"additional_upgrade_system_details": "6 new panels replaced to old system",
"panel_brand": "Flextronics Industrial Ltd",
"panel_model": "FLV-MB-320S72AB",
"number_panels": 1,
"number_inverters": "1",
"watts_per_panel": 12,
"inverter_manufacture": "Afore New Energy Technology Shanghai Co Ltd",
"inverter_series": "Hybrid inverter",
"inverter_model": "HNS3000HS"
},
"serial_numbers": [
],
"serial_numbers_photo": [
],
"installer": {
"first_name": "Lily",
"last_name": "Jackson",
"accreditation": "A0000001",
"unit_type": "Apt. 155",
"unit_number": "3499",
"street_number": "47 Ava Run",
"street_name": "Bruen Trail",
"street_type": "Street",
"suburb": "East Ivystad",
"state": "TAS",
"address_type": "physical",
"delivery_type": "",
"delivery_number": "",
"postcode": "3191",
"phone": "0483404356"
},
"designer": {
"first_name": "Adam",
"last_name": "Collier",
"accreditation": "A0000002",
"unit_type": "Apt. 243",
"unit_number": "765",
"street_number": "473 Henry Meadow",
"street_name": "Bode Boulevard",
"street_type": "Street",
"suburb": "Lake Mayaborough",
"state": "WA",
"address_type": "physical",
"delivery_type": "",
"delivery_number": "",
"postcode": "3329",
"phone": "0413340599"
},
"electrician": {
"first_name": "Leah",
"last_name": "Little",
"license": "6745260859",
"unit_type": "Apt. 189",
"unit_number": "9321",
"street_number": "90 Young Court",
"street_name": "Hackett Summit",
"street_type": "Mews",
"suburb": "West Jasmineview",
"state": "QLD",
"address_type": "physical",
"delivery_type": "",
"delivery_number": "",
"postcode": "2134",
"phone": "0479439278"
},
"stc_documents": [
],
"coc_documents": [
],
"invoice_documents": [
],
"other_documents": [
]
}
}
}
Delete STC Job
Path: /pvds/:id.json
Example: https://www.greendeal.com.au/rapi/v1/pvds/GWT00000.json
id means gwtid
HTTP Method:DELETE
Request Parameter
Parameter | Type | Is Required? | Example |
gwtid | String | Yes | "GWT383595" |
Response
{
"message": "STC job was successfully delete"
}
Request Example
{
"client_id": "23565656e63f33016ad7f4f338a6f70be78c136addbbb9c803d09756c6ee93f1",
"signature": "2dc1b977b376a2fd26bf05c1f15da59b",
"timestamp": "2019-08-02T10:31:50+11:00",
"gwtid": "GWT383595"
}
Response Example
{
"message": "STC job was successfully delete"
}
Get panel brands
Path: /dictionaries/panel_brands.json
Example: https://www.greendeal.com.au/rapi/v1/dictionaries/panel_brands.json
HTTP Method:GET
Request Parameter
Parameter | Type | Is Required? | Description | Example |
brand_id | Int | No | When brand_id not provided, default returns records for all brand | 2648 |
Response
Parameter | Type | Description |
id | Int | |
name | String | panel brand(eg:Canadian Solar Inc) |
model_number | String | model number of panel (eg:CS6K-255P-SD) |
Request One Example
{
"client_id": "23565656e63f33016ad7f4f338a6f70be78c136addbbb9c803d09756c6ee93f1",
"signature": "2dc1b977b376a2fd26bf05c1f15da59b",
"timestamp": "2019-08-02T10:31:50+11:00",
"brand_id": 4480
}
Response One Example
{
"message": "success",
"code": 200,
"response": {
"body": {
"id": "YL360CG2536F-2 1/2",
"text": "Yingli Energy China Co Ltd",
"brand_id": 4480
}
}
}
Request All Example
{
"client_id": "23565656e63f33016ad7f4f338a6f70be78c136addbbb9c803d09756c6ee93f1",
"signature": "2dc1b977b376a2fd26bf05c1f15da59b",
"timestamp": "2019-08-02T10:31:50+11:00"
}
Response All Example
{
"message": "success",
"code": 200,
"response": {
"body": [
...
{
"id": "YL360CG2536F-2 1/2",
"text": "Yingli Energy China Co Ltd",
"brand_id": 4480
},
...
]
}
}
Get inverter brands
Path: /dictionaries/inverter_brands.json
Example: https://www.greendeal.com.au/rapi/v1/dictionaries/inverter_brands.json
HTTP Method:GET
Request Parameter
Parameter | Type | Is Required? | Description | Example |
brand_id | Int | No | When brand_id not provided, default returns records for all brand | 253 |
series | String | No | Symo |
Response
Parameter | Type | Description |
id | Int | |
name | String | inverter manufacturer(e.g:SMA Australia Pty Ltd) |
model_number | String | model number of inverter(eg:STP12000TL-20) |
series | String | inverter series(eg:4G) |
ac_power | Int | inverter ac_power(eg:2850) |
Request One Example
{
"client_id": "23565656e63f33016ad7f4f338a6f70be78c136addbbb9c803d09756c6ee93f1",
"signature": "2dc1b977b376a2fd26bf05c1f15da59b",
"timestamp": "2019-08-02T10:31:50+11:00",
"brand_id": 191
}
Response One Example
{
"message": "success",
"code": 200,
"response": {
"body": {
"id": "H3_211",
"text": "Delta Electronics Inc",
"name": "H3_211",
"brand_id": 191
}
}
}
Request All Example
{
"client_id": "23565656e63f33016ad7f4f338a6f70be78c136addbbb9c803d09756c6ee93f1",
"signature": "2dc1b977b376a2fd26bf05c1f15da59b",
"timestamp": "2019-08-02T10:31:50+11:00"
}
Response All Example
{
"message": "success",
"code": 200,
"response": {
"body": [
...
{
"id": "H3_211",
"text": "Delta Electronics Inc",
"name": "H3_211",
"brand_id": 191
},
...
]
}
}