Introduction to GraphQL | GraphQL
GraphQL offers a powerful way to integrate many aspects of SolarPlus and build your custom integrations with any platform.
Setting up GraphQL access via IDE
If creating an integration via IDE you can set up a config file to manage access and add your User API token generated in SolarPlus under 'Integrations'.
{
"name": "SolaPlus Live",
"schemaPath": "schema.graphql",
"extensions": {
"endpoints": {
"Default GraphQL Endpoint": {
"url": "https://go.solarplus.co/graphql",
"headers": {
"user-agent": "JS GraphQL",
"authorization": "Bearer ~add-token-here~"
},
"introspect": false
}
}
}
}
Query the API
Create your query file
query Inventory($id: ID!) {
Inventory(id: $id) {
id
name
created
}
}Add argument variables, eg. ID
{ "id": 181043 }
Result:
{
"data": {
"System": {
"id": "181043",
"name": "9.6 kW Primo Telsa",
"created": "2021-06-25 04:34:14"
}
}
Querying the API via browser
Go to https://go.solarplus.co/graphql while logged into the app in another tab
Open the schema panel on the right to review the schema structure .
Query as per instructions on the left hand panel:
{ Inventory(id: 87381 ) {
id
name
InventoryPricings {
id
item_variation_suffix
unitPrice
}
}
}Sample JSON result:
{
"data": {
"Inventory": {
"id": "87381",
"name": "Clenergy ezRack Mounting 40mm Tin",
"InventoryPricings": [
{
"id": "77899",
"item_variation_suffix": "Bracket Tin PV-ezRack",
"unitPrice": "$2.43"
},
{
"id": "77900",
"item_variation_suffix": "Isolator Shade, 280*158*114mm",
"unitPrice": "$8.80"
},
{
"id": "77901",
"item_variation_suffix": "Cable Clip for 2 cables",
"unitPrice": "$0.30"
},
{
"id": "77902",
"item_variation_suffix": "PV-ezRack End Clamp - 40mm",
"unitPrice": "$0.80"
},
{
"id": "77903",
"item_variation_suffix": "PV-ezRack Inter Clamp - 40mm",
"unitPrice": "$2.00"
},
{
"id": "77904",
"item_variation_suffix": "Clamp Grounding PV-ezRack",
"unitPrice": "$0.34"
},
{
"id": "77905",
"item_variation_suffix": "Eco Rail, 4200mm",
"unitPrice": "$24.35"
},
{
"id": "77906",
"item_variation_suffix": "Splice for ECO-Rail",
"unitPrice": "$1.80"
}
]
}
}
}GraphQL Common Applications
Contact Search
Capabilities:
Search and return matching Contact IDs
Search and return full Contact records
Find a single Contact by exact match on firstName + lastName + email + address
Queries:
ContactIds(search: ContactIdsSearchInput): [ID]
Returns matching contact IDs only
Contacts(search: ContactIdsSearchInput): [Contact]
Returns matching full contact records
Contact(firstName, lastName, email, address): Contact
Returns a single contact using exact matching
All 4 fields are required for this exact-match path
Search Input
ContactIdsSearchInput
Fields:
createdFrom: String
createdTo: String
leadSource: Int
status: Int
state: String
stateId: ID
pipelineStage: ID
businessCategoryIds: [ID]
assignedCustomerRepId: ID
query: String
Field Notes:
-
createdFrom / createdTo
Format: YYYY-MM-DD
Inclusive date filtering
-
leadSource
Integer lead source value stored on the contact
-
status
Integer contact status
-
Common values:
0 = Lead
1 = Active
2 = Closed
-
state
Matches the contact state text, for example Wellington Region, NSW, QLD
-
stateId
Alternate way to search by state using a state record ID
-
pipelineStage
Matches System.pipeline_stage
A contact is returned if it has at least one non-invoice quote/system with that pipeline stage
-
businessCategoryIds
Filters contacts by linked business categories
-
assignedCustomerRepId
Filters by assigned customer rep on the contact
-
query
-
Free-text search across:
contact full name
full address
business name
email
primary phone
customer rep name
-
Recommended Usage
Use ContactIds when:
you only need IDs for downstream processing
you want the smallest payload
Use Contacts when:
you need contact details like full_name, email, full_address
you want quote/system fields in the same query
Use exact-match Contact(...) when:
you need to identify one contact from an external system
you already have firstName, lastName, email, and address
Examples:
-
Search and return contact IDs
query { ContactIds( search: { createdFrom: "2026-01-01" createdTo: "2026-03-19" leadSource: 0 state: "NSW" } ) }
-
Example response:
{ "data": { "ContactIds": [428378, 428375] } } -
Search and return full contact records
query { Contacts( search: { createdFrom: "2026-01-01" createdTo: "2026-03-19" leadSource: 0 state: "NSW" } ) { id full_name email full_address state created Systems { id setting_quote_number quote_status quote_status_id pipeline_stage } } }-
Example response:
{ "data": { "Contacts": [ { "id": "428378", "full_name": "John Doe", "email": "john@doe.com", "full_address": "123 Example Street, Wellington Region, New Zealand", "state": "Wellington Region", "created": "2026-03-17 22:06:24", "Systems": [ { "id": "510777", "setting_quote_number": 11869, "quote_status": "0", "quote_status_id": 0, "pipeline_stage": null } ] } ] } }
-
-
Find one contact by exact match
query { Contact( firstName: "John" lastName: "Doe" email: "john@doe.com" address: "123 Example Street, Wellington Region, New Zealand" ) { id full_name email full_address Systems { id setting_quote_number quote_status quote_status_id pipeline_stage } } } -
Filter by category and assigned rep
query { Contacts( search: { businessCategoryIds: [3, 5] assignedCustomerRepId: 1088 } ) { id full_name email } } -
Free-text search
query { Contacts( search: { query: "john doe wellington" } ) { id full_name email full_address } }
Related content
Inventory API to update pricebook
See Inventory API Documentation
Quote Pricing Update via GraphQL
This endpoint allows you to set the overall price for a quote with aline item price override.
Mutation: updateQuoteOptions
where:
id = system_id (ID) this is the SolarPlus system or quote ID
quote_use_price = Apply custom price (boolean)
quote_price = override price (DEC, 2)
quote_price_location: (INT)
0 = retail ex gst
1 = retail inc gst
2 = final price
mutation updateQuoteOptions($input: UpdateSystemInput, $id: ID) {
updateSystem(input: $input, id: $id) {
id
quote_use_price
quote_status
quote_price
quote_price_location
__typename
}
}Variables passed:
{
"id": "316419",
"input": {
"quote_use_price": true,
"quote_price": "7500.00",
"quote_price_location": 2
}
}
Getting Site information of a Quote via GraphQL
This allows you to get the site information of a particular system
query System($id: ID!) {
System(id: $id) {
id
Site{
id
full_address
lat
lng
}
}
}
Variables passed: (id = system ID)
{
"id": 535913
}
Sample JSON result:
{
"data": {
"System": {
"id": "535913",
"Site": {
"id": "671753",
"full_address": "448 Epsom Road, Flemington VIC, Australia",
"lat": -27.58762108535,
"lng": 152.72160961891
}
}
}
}
Updating Quote Site Address via GraphQL
This endpoint allows you to set the site address of a particular system/quote without updating the Contact address.
Mutation: updateSiteAddress
where:
id = site ID
full_address = site address
lat = site latitude
lng = site longitude
Note: To get latitude and longitude: Go to Google Maps , copy the address and get the latitude and longitude values
mutation updateSiteAddress ($id: ID!, $input:UpdateSiteInput!){
updateSite(id:$id,input:$input){
id
}
}
Variables passed:
{
"id": 671753,
"input":{
"full_address": "Kyoto Street, Brassall QLD, Australia"
"lat":"-27.5874928",
"lng":"152.7187754"
}
}
Loading a system package to an existing quote
This allows you to load a system package to an existing system record.
Mutation: loadSystemPackage
mutation loadSystemPackage($systemId: ID!, $packageId: ID!) {
loadSystemPackage(
systemId: $systemId
packageId: $packageId
) {
id
name
}
}
Variables passed:
{
"systemId": "542500",
"packageId": "61668"
}
Comments
0 comments
Article is closed for comments.