### Fetch Opportunities with Query Parameters Source: https://app.getpylon.com/docs/api This example demonstrates how to make a GET request to the opportunities endpoint, utilizing various query parameters for filtering and sorting. It requires an authorization token and specifies the desired API version and content type. ```curl curl https://api.getpylon.com/v1/opportunities \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` -------------------------------- ### Example Solar Project JSON Object Source: https://app.getpylon.com/docs/api This is an example JSON object representing a solar project. It demonstrates the structure and typical values for the attributes and relationships described in the API reference. Note that some fields may be null or empty depending on the project's status. ```json { "type": "solar_projects", "id": "kYFIDJRX8w", "attributes": { "reference_number": "PYL-0003-7789", "site_location": [ 145.0709934, -37.8510383 ], "site_country_code": null, "site_address": { "line1": "19 Parmesan Avenue", "line2": "", "city": "Glen Iris", "state": "Victoria", "zip": "3147", "country": "Australia" }, "customer_details": { "name": "Jill Lepore", "phone": "0400 000 000", "email": "jill@example.com" }, "site_details": { "roof_type": "", "number_of_storeys": null, "power_phases": null, "building_classification": null, "nmi": "", "meter_number": "", "energy_retailer": "", "energy_distributor": "", "dnsp_preapproval_number": "", "mpan": "" }, "acceptance": { "is_accepted": false, "manually_sold": false, "latest_esignature": false, "latest_esignature_pdf_url": null }, "job_sheet_url": null, "is_archived": false, "is_example": null, "created_at": "2019-11-04T08:56:04+00:00", "updated_at": "2020-02-18T13:14:00+00:00" }, "relationships": { "owner": { "data": { "type": "users", "id": "HOx60SiRAB" }, "links": { "related": "https://api.getpylon.com/v1/users/HOx60SiRAB" } }, "designs": { "data": [], "links": { "related": "https://api.getpylon.com/v1/solar_designs?filter%5Bproject%5D=kYFIDJRX8w&fields%5Bsolar_designs%5D=created_at" } }, "primary_design": { "data": null }, "opportunities": { "data": [], "links": { "related": "https://api.getpylon.com/v1/solar_projects/kYFIDJRX8w/opportunities" } } }, "links": { "self": "https://api.getpylon.com/v1/solar_projects/kYFIDJRX8w" }, "meta": {} } ``` -------------------------------- ### Authenticated API Request Example (cURL) Source: https://app.getpylon.com/docs/api Demonstrates how to make an authenticated GET request to the Pylon API using cURL. It requires an API token for authorization and specifies the desired response format. ```shell curl https://api.getpylon.com/v1/users \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` -------------------------------- ### File Object Example - JSON Source: https://app.getpylon.com/docs/api An example JSON object representing a file hosted on Pylon's servers. It includes attributes like original filename, purpose, creation timestamp, and expiration timestamp. ```json { "data": { "type": "files", "id": "rrRaahjE1v", "attributes": { "name": "load-data-2021-q1.csv", "purpose": "interval_analysis", "created_at": "2021-05-01T02:49:28+00:00", "expires_at": "2021-05-08T02:49:28+00:00" }, "relationships": {}, "links": { "self": "https://api.getpylon.com/v1/files/rrRaahjE1v" } } } ``` -------------------------------- ### Solar Project API Response Example (JSON) Source: https://app.getpylon.com/docs/api This JSON object represents a successful response from the Get Pylon API when retrieving or updating a solar project. It includes detailed attributes of the project, such as reference number, site location, customer details, and acceptance status, along with relationship information and self-links. ```json { "data": { "type": "solar_projects", "id": "kYFIDJRX8w", "attributes": { "reference_number": "PYL-0003-7789", "site_location": [ 145.0709934, -37.8510383 ], "site_country_code": null, "site_address": { "line1": "19 Parmesan Avenue", "line2": "", "city": "Glen Iris", "state": "Victoria", "zip": "3147", "country": "Australia" }, "customer_details": { "name": "Jill Lepore", "phone": "0400 000 000", "email": "jill@example.com" }, "site_details": { "roof_type": "", "number_of_storeys": null, "power_phases": null, "building_classification": null, "nmi": "", "meter_number": "", "energy_retailer": "", "energy_distributor": "", "dnsp_preapproval_number": "", "mpan": "" }, "acceptance": { "is_accepted": false, "manually_sold": false, "latest_esignature": false, "latest_esignature_pdf_url": null }, "job_sheet_url": null, "is_archived": false, "is_example": null, "created_at": "2019-11-04T08:56:04+00:00", "updated_at": "2020-02-18T13:14:00+00:00" }, "relationships": { "owner": { "data": { "type": "users", "id": "HOx60SiRAB" }, "links": { "related": "https://api.getpylon.com/v1/users/HOx60SiRAB" } }, "designs": { "data": [], "links": { "related": "https://api.getpylon.com/v1/solar_designs?filter%5Bproject%5D=kYFIDJRX8w&fields%5Bsolar_designs%5D=created_at" } }, "primary_design": { "data": null }, "opportunities": { "data": [], "links": { "related": "https://api.getpylon.com/v1/solar_projects/kYFIDJRX8w/opportunities" } } }, "links": { "self": "https://api.getpylon.com/v1/solar_projects/kYFIDJRX8w" } } } ``` -------------------------------- ### Authentication Example Source: https://app.getpylon.com/docs/api Demonstrates how to authenticate API requests by passing an API token in the Authorization header. Ensure you replace $TOKEN with your actual secret API token. ```http GET /some/resource HTTP/1.1 Host: api.getpylon.com Authorization: Bearer $TOKEN ``` -------------------------------- ### Authenticated Request Example Source: https://app.getpylon.com/docs/api An example of how to make an authenticated request to the Pylon API using a bearer token. ```APIDOC ## Authenticated Request ```bash curl https://api.getpylon.com/v1/users \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` ``` -------------------------------- ### List Solar Designs (cURL) Source: https://app.getpylon.com/docs/api Example cURL request to list solar designs. It includes authorization and content type headers. No specific filters are applied in this basic example. ```shell curl https://api.getpylon.com/v1/solar_designs \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` -------------------------------- ### GET /websites/app_getpylon_api Source: https://app.getpylon.com/docs/api Retrieves a list of solar projects. Projects are returned in the order they were created, least recent first. Results include archived projects. ```APIDOC ## GET /websites/app_getpylon_api ### Description Retrieves a list of solar projects. Projects are returned in the order they were created, least recent first. Results include archived projects. ### Method GET ### Endpoint /websites/app_getpylon_api ### Parameters #### Query Parameters - **sort** (string) - Optional - Field to sort by. Default is `created_at`. - **page[size]** (integer) - Optional - Number of results per page. - **page[number]** (integer) - Optional - Page number to retrieve. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **type** (string) - Type of the resource, always `solar_projects`. - **id** (string) - Unique identifier for the project. - **attributes** (object) - Contains the project's attributes. - **reference_number** (string) - Reference number for the project. - **site_location** (array of numbers) - [Longitude, latitude] coordinates of the project site. - **site_country_code** (string) - ISO 3166 two-letter country code. - **site_address** (object) - Street address of the project. - **line1** (string) - Street address line 1. - **line2** (string) - Street address line 2. - **city** (string) - City. - **state** (string) - State or province. - **zip** (string) - Postal or ZIP code. - **country** (string) - Country. - **customer_details** (object) - Information about the customer. - **name** (string) - Customer name. - **phone** (string) - Customer phone number. - **email** (string) - Customer email address. - **site_details** (object) - Information about the project site. - **roof_type** (string) - Roof material type. - **number_of_storeys** (integer) - Number of storeys in the building. - **power_phases** (string) - Power phases at the site's connection. Allowed values: `"one"`, `"two"`, `"three"`, `"split"`, `null`. - **building_classification** (string) - Classification of the building. Allowed values: `"residential"`, `"commercial"`, `null`. - **nmi** (string) - National Meter Identifier (Australia). - **meter_number** (string) - Meter number. - **energy_retailer** (string) - Name of the customer's energy retailer. - **energy_distributor** (string) - Name of the energy distributor. - **dnsp_preapproval_number** (string) - DNSP pre-approval number (Australia). - **mpan** (string) - Meter Point Administration Number (United Kingdom). - **acceptance** (object) - Acceptance status of the project. - **is_accepted** (boolean) - Whether the project has been accepted. - **manually_sold** (boolean) - Whether the project is marked as "sold" in the library. - **latest_esignature** (boolean) - Whether the latest e-signature request was signed. - **latest_esignature_pdf_url** (string) - URL to the PDF of the latest signed e-signature request. - **job_sheet_url** (string) - URL to the job sheet for this project. - **is_archived** (boolean) - Whether the project has been archived. - **is_example** (boolean) - Whether this project is an example project. - **created_at** (string) - Date and time the project was created (ISO 8601 format). - **updated_at** (string) - Date and time the project was last updated (ISO 8601 format). - **relationships** (object) - Contains information about related resources. - **owner** (object) - Information about the project owner. - **designs** (object) - Information about associated solar designs. - **primary_design** (object) - Information about the primary solar design. - **opportunities** (object) - Information about associated opportunities. - **links** (object) - Links related to the project. - **self** (string) - URL to the project resource. - **meta** (object) - Metadata for the response. #### Response Example ```json { "type": "solar_projects", "id": "kYFIDJRX8w", "attributes": { "reference_number": "PYL-0003-7789", "site_location": [ 145.0709934, -37.8510383 ], "site_country_code": null, "site_address": { "line1": "19 Parmesan Avenue", "line2": "", "city": "Glen Iris", "state": "Victoria", "zip": "3147", "country": "Australia" }, "customer_details": { "name": "Jill Lepore", "phone": "0400 000 000", "email": "jill@example.com" }, "site_details": { "roof_type": "", "number_of_storeys": null, "power_phases": null, "building_classification": null, "nmi": "", "meter_number": "", "energy_retailer": "", "energy_distributor": "", "dnsp_preapproval_number": "", "mpan": "" }, "acceptance": { "is_accepted": false, "manually_sold": false, "latest_esignature": false, "latest_esignature_pdf_url": null }, "job_sheet_url": null, "is_archived": false, "is_example": null, "created_at": "2019-11-04T08:56:04+00:00", "updated_at": "2020-02-18T13:14:00+00:00" }, "relationships": { "owner": { "data": { "type": "users", "id": "HOx60SiRAB" }, "links": { "related": "https://api.getpylon.com/v1/users/HOx60SiRAB" } }, "designs": { "data": [], "links": { "related": "https://api.getpylon.com/v1/solar_designs?filter%5Bproject%5D=kYFIDJRX8w&fields%5Bsolar_designs%5D=created_at" } }, "primary_design": { "data": null }, "opportunities": { "data": [], "links": { "related": "https://api.getpylon.com/v1/solar_projects/kYFIDJRX8w/opportunities" } } }, "links": { "self": "https://api.getpylon.com/v1/solar_projects/kYFIDJRX8w" }, "meta": {} } ``` ``` -------------------------------- ### Show Heat Pump Read Response (JSON) Source: https://app.getpylon.com/docs/api Example JSON response when requesting a specific heat pump. Includes detailed attributes of the heat pump, its identity, and associated files. ```JSON { "data": { "type": "heat_pumps", "id": "f6f8d7aa-1dc5-5d8a-9b62-7b10de47261e", "attributes": { "name": "Solahart 180HAV30", "identity": { "brand": "Solahart", "model_number": "180HAV30", "sku_identifier": "" }, "files": { "datasheet_url": "https://static.getpylon.com/datasheets/heatpumps/Solahart_Atmos-Air-180L-270L.pdf" } }, "relationships": {}, "links": { "self": "https://api.getpylon.com/v1/heat_pumps/f6f8d7aa-1dc5-5d8a-9b62-7b10de47261e" } } } ``` -------------------------------- ### Show Solar Battery Read Response (JSON) Source: https://app.getpylon.com/docs/api Example JSON response when requesting a specific solar battery. Includes detailed attributes of the battery, its identity, and associated files. ```JSON { "data": { "type": "solar_batteries", "id": "56f5e7f0-4fb3-5ceb-8e8e-2f1be9dcdb0e", "attributes": { "name": "Sonnen Eco 8.10", "identity": { "brand": "Sonnen", "manufacturer": "Sonnen", "model_number": "Eco 8.10", "sku_identifier": "" }, "files": { "datasheet_url": "" } }, "relationships": {}, "links": { "self": "https://api.getpylon.com/v1/solar_batteries/56f5e7f0-4fb3-5ceb-8e8e-2f1be9dcdb0e" } } } ``` -------------------------------- ### Example Response for Show Event Source: https://app.getpylon.com/docs/api This JSON structure details the response when requesting a specific event. It contains the event's data, including its type, ID, attributes, and self-referential link. ```json { "data": { "type": "events", "id": "q86LZNYyYP", "attributes": { "name": "events.test_sent", "created_at": "2020-02-20T18:19:20+00:00" }, "relationships": {}, "links": { "self": "https://api.getpylon.com/v1/events/q86LZNYyYP" } } } ``` -------------------------------- ### Retrieve Solar Design - cURL Example Source: https://app.getpylon.com/docs/api This snippet demonstrates how to make a GET request to the Pylon API to retrieve a specific solar design. It requires authentication via a Bearer token and specifies the desired API version and content type. The request targets a solar design identified by its ID. ```shell curl https://api.getpylon.com/v1/solar_designs/$SOLAR_DESIGN \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` -------------------------------- ### List Solar Projects with Query Parameters Source: https://app.getpylon.com/docs/api This snippet demonstrates how to list solar projects using various query parameters for filtering and sorting. It allows filtering by archived status, reference number, creation date, owner, acceptance status, and opportunity. Sorting options are also available. The `fields` parameter can be used to limit the returned data. ```bash curl https://api.getpylon.com/v1/solar_projects \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` -------------------------------- ### Create Solar Project via API (Shell) Source: https://app.getpylon.com/docs/api This snippet demonstrates how to create a solar project using the Pylon API via a cURL command. It includes the necessary headers for authorization and content type, and sends a JSON payload containing project attributes like site location, reference number, site address, and customer details. Ensure you replace '$TOKEN' with your actual API token. ```shell echo '{ "data": { "attributes": { "site_location": [ 151.173, -33.8479 ], "reference_number": "YOUR-CO-0000-1000", "site_address": { "line1": "8 Jolly Circuit", "line2": "", "city": "Ashwood", "state": "Canberra", "zip": "3099", "country": "Australia" }, "customer_details": { "name": "Jill Doe", "phone": "0400 000 000", "email": "jill@example.com" } } } }' | curl https://api.getpylon.com/v1/solar_projects \ --request POST \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" \ --header "Content-Type: application/vnd.api+json" \ --data @- ``` -------------------------------- ### Collection Resource Response Example (JSON) Source: https://app.getpylon.com/docs/api Illustrates a typical JSON:API response body for a collection of resources, specifically user resources. It includes data, pagination links, and metadata. ```json { "data": [{ "type": "users", "id": "MVGH032m", "attributes": { "email": "example@getpylon.com", "created_at": "2019-04-26T08:19:02+00:00" }, "relationships": { }, "links": { "self": "https://api.getpylon.com/v1/users/MVGH032m" } }], "links": { "first": "https://api.getpylon.com/v1/users?page[number]=1", "prev": null, "next": "https://api.getpylon.com/v1/users?page[number]=2", "self": "https://api.getpylon.com/v1/users" }, "meta": { "page": { "current": 1, "size": 15 } } } ``` -------------------------------- ### POST /v1/solar_projects Source: https://app.getpylon.com/docs/api Creates a new solar project at a specified location. This action consumes team credits and may fail if credits are insufficient. ```APIDOC ## POST /v1/solar_projects ### Description This API endpoint allows for the programmatic creation of solar projects. It requires detailed site and customer information. Be aware that this operation consumes team credits and may result in a 402 error if credits are insufficient. Refunds are not provided for erroneously created projects. ### Method POST ### Endpoint https://api.getpylon.com/v1/solar_projects ### Parameters #### Request Body - **data** (object) - Required - The main data object for the request. - **attributes** (object) - Required - Contains the project's attributes. - **site_location** (array) - Required - A [longitude, latitude] coordinate pair for the project location. Length must be 2. - **reference_number** (string) - Optional - A custom reference number for the project. Overrides team's automatic numbering. - **site_address** (object) - Optional - The physical address of the project site. - **line1** (string) - Optional - Street address line 1. - **line2** (string) - Optional - Street address line 2. - **city** (string) - Optional - City. - **state** (string) - Optional - State or province. - **zip** (string) - Optional - Postal or ZIP code. - **country** (string) - Optional - Country. - **customer_details** (object) - Optional - Information about the customer. - **name** (string) - Optional - Name of the customer. - **phone** (string) - Optional - Phone number of the customer. - **email** (string) - Optional - Email address of the customer. ### Request Example ```json { "data": { "attributes": { "site_location": [ 151.173, -33.8479 ], "reference_number": "YOUR-CO-0000-1000", "site_address": { "line1": "8 Jolly Circuit", "line2": "", "city": "Ashwood", "state": "Canberra", "zip": "3099", "country": "Australia" }, "customer_details": { "name": "Jill Doe", "phone": "0400 000 000", "email": "jill@example.com" } } } } ``` ### Response #### Success Response (200) - **data** (object) - The created solar project object. - **type** (string) - The type of the resource (e.g., "solar_projects"). - **id** (string) - The unique identifier for the project. - **attributes** (object) - The attributes of the solar project. - **relationships** (object) - Relationships to other resources. - **links** (object) - Links related to the project. #### Response Example ```json { "data": { "type": "solar_projects", "id": "kYFIDJRX8w", "attributes": { "reference_number": "PYL-0003-7789", "site_location": [ 145.0709934, -37.8510383 ], "site_country_code": null, "site_address": { "line1": "19 Parmesan Avenue", "line2": "", "city": "Glen Iris", "state": "Victoria", "zip": "3147", "country": "Australia" }, "customer_details": { "name": "Jill Lepore", "phone": "0400 000 000", "email": "jill@example.com" }, "site_details": { "roof_type": "", "number_of_storeys": null, "power_phases": null, "building_classification": null, "nmi": "", "meter_number": "", "energy_retailer": "", "energy_distributor": "", "dnsp_preapproval_number": "", "mpan": "" }, "acceptance": { "is_accepted": false, "manually_sold": false, "latest_esignature": false, "latest_esignature_pdf_url": null }, "job_sheet_url": null, "is_archived": false, "is_example": null, "created_at": "2019-11-04T08:56:04+00:00", "updated_at": "2020-02-18T13:14:00+00:00" }, "relationships": { "owner": { "data": { "type": "users", "id": "HOx60SiRAB" }, "links": { "related": "https://api.getpylon.com/v1/users/HOx60SiRAB" } }, "designs": { "data": [], "links": { "related": "https://api.getpylon.com/v1/solar_designs?filter%5Bproject%5D=kYFIDJRX8w&fields%5Bsolar_designs%5D=created_at" } }, "primary_design": { "data": null }, "opportunities": { "data": [], "links": { "related": "https://api.getpylon.com/v1/solar_projects/kYFIDJRX8w/opportunities" } } }, "links": { "self": "https://api.getpylon.com/v1/solar_projects/kYFIDJRX8w" } } } ``` ``` -------------------------------- ### Filtering Response Fields Example (URL) Source: https://app.getpylon.com/docs/api Shows how to use JSON:API sparse fieldsets to filter response fields from the Pylon API. This example requests only the 'email' attribute for user resources. ```url https://api.getpylon.com/v1/users?fields[users]=email ``` -------------------------------- ### Show Opportunity Source: https://app.getpylon.com/docs/api Retrieves a specific opportunity by its ID. Returns a Link header with an in-app URL. ```APIDOC ## GET /v1/opportunities/{id} ### Description Retrieves a specific opportunity by its ID. Along with the body content, this response will return a `Link` header pointing to the in-app URL of the opportunity. ### Method GET ### Endpoint /v1/opportunities/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the opportunity. ### Response #### Success Response (200) - **opportunity** (object) - The opportunity object. - **Link** (header) - Contains a URL pointing to the in-app view of the opportunity. #### Response Example ```json { "data": { "type": "opportunity", "id": "qpZ72TFx", "attributes": { "name": "Specific Opportunity", "value": 5000, "created_at": "2023-10-26T09:00:00Z", "updated_at": "2023-10-26T09:00:00Z" } } } ``` #### Headers Example ``` Link: ; rel="in-app alternate"; type="text/html" ``` ``` -------------------------------- ### GET /v1/tags Source: https://app.getpylon.com/docs/api Retrieves a collection of tag objects. ```APIDOC ## GET /v1/tags ### Description Retrieves a collection of tag objects. ### Method GET ### Endpoint `/v1/tags` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash curl https://api.getpylon.com/v1/tags \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` ### Response #### Success Response (200) - **data** (array) - A list of tag objects. #### Response Example (Example response structure would be similar to the 'Show tag' example, but as an array of tag objects) ``` -------------------------------- ### Opportunities API (Preview) Source: https://app.getpylon.com/docs/api This API is in preview and allows management of opportunities, which represent a chance to earn revenue and store data about potential sales. ```APIDOC # Opportunities API (Preview) **This API is in preview and breaking changes may be made without warning.** Opportunities are the most important entity in your sales process. An opportunity is a **chance to earn revenue**. Opportunities will store most of the data about your potential sales. They will move through your sales pipeline and when they close, you get paid. # The opportunity object (Further details about the opportunity object and its endpoints would follow here, but are not provided in the input text.) ``` -------------------------------- ### GET /v1/pipelines Source: https://app.getpylon.com/docs/api Retrieves a collection of all pipeline objects. ```APIDOC ## GET /v1/pipelines ### Description Retrieves a collection of all pipeline objects. ### Method GET ### Endpoint `/v1/pipelines` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```curl curl https://api.getpylon.com/v1/pipelines \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` ### Response #### Success Response (200) - **data** (array) - A collection of pipeline objects. - Each object contains 'type', 'id', 'attributes', 'relationships', 'links', and 'meta' fields similar to the pipeline object description. ``` -------------------------------- ### Create Component Price (POST) Source: https://app.getpylon.com/docs/api Creates a new component price entry in the Pylon API. Requires authentication and a JSON payload specifying the component details and price. Returns the created component price object. ```shell echo '{ "data": { "type": "solar_projects", "id": "EJ56SKotT8", "attributes": { "code": "MY-CODE-0451", "price_excl_tax": 10000 }, "relationships": { "component": { "data": { "type": "solar_modules", "id": "c59f1f6f-67cb-5c39-ba91-ec66a9f3451e" } } } } }' | curl https://api.getpylon.com/v1/component_prices \ --request POST \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" \ --header "Content-Type: application/vnd.api+json" \ --data @- ``` -------------------------------- ### CRM Lead Created Event Example (JSON) Source: https://app.getpylon.com/docs/api This JSON object illustrates an event dispatched when a new lead is created in the CRM. It contains information about the opportunity, its creation timestamp, and the user who created it. ```json { "data": { "type": "events", "id": "OdJ2256haDA8uGTG", "attributes": { "name": "opportunities.created", "created_at": "2023-01-03T02:11:00+00:00", "description": "Opportunity created by Example User for Beach house solar + battery", "opportunity_in_app_url": "https://app.getpylon.com/platform/leads/yyVS7sGKjH" }, "relationships": { "opportunity": { "data": { "type": "opportunities", "id": "yyVS7sGKjH" }, "links": { "related": "https://api.getpylon.com/v1/opportunities/yyVS7sGKjH" } }, "created_by": { "data": { "type": "users", "id": "HOx60SiRAB" }, "links": { "related": "https://api.getpylon.com/v1/users/HOx60SiRAB" } } }, "links": { "self": "https://api.getpylon.com/v1/events/OdJ2256haDA8uGTG" } } } ``` -------------------------------- ### GET /v1/pipeline_stages Source: https://app.getpylon.com/docs/api Retrieves a collection of all pipeline stage objects. ```APIDOC ## GET /v1/pipeline_stages ### Description Retrieves a collection of all pipeline stage objects. ### Method GET ### Endpoint `/v1/pipeline_stages` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```curl curl https://api.getpylon.com/v1/pipeline_stages \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` ### Response #### Success Response (200) - **data** (array) - A collection of pipeline stage objects. - Each object contains 'type', 'id', 'attributes', 'relationships', 'links', and 'meta' fields similar to the pipeline stage object description. ``` -------------------------------- ### GET /v1/tags/{TAG} Source: https://app.getpylon.com/docs/api Retrieves a specific tag object by its ID. ```APIDOC ## GET /v1/tags/{TAG} ### Description Retrieves a specific tag object. ### Method GET ### Endpoint `/v1/tags/$TAG` ### Parameters #### Path Parameters - **TAG** (string) - Required - The ID of the tag to retrieve. #### Query Parameters None #### Request Body None ### Request Example ```bash curl https://api.getpylon.com/v1/tags/$TAG \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` ### Response #### Success Response (200) - **data** (object) - Contains the tag object. - **type** (string) - The type of the object, always "tags". - **id** (string) - The unique identifier for the tag. - **attributes** (object) - Contains the properties of the tag. - **title** (string) - The cosmetic name of the tag. - **slug** (string) - The machine-usable identifier of the tag. - **created_at** (string) - The timestamp when the tag was created. - **updated_at** (string) - The timestamp when the tag was last updated. - **relationships** (object) - Contains information about related objects. - **links** (object) - Contains links related to the tag. - **self** (string) - The URL of the tag resource. - **meta** (object) - Metadata associated with the tag. #### Response Example ```json { "data": { "type": "tags", "id": "6iYOCCFx5l", "attributes": { "title": "Battery retrofit", "slug": "battery-retrofit", "created_at": "2020-06-18T15:04:10+00:00", "updated_at": "2020-07-01T16:09:40+00:00" }, "relationships": {}, "links": { "self": "https://api.getpylon.com/v1/tags/6iYOCCFx5l" } } } ``` ``` -------------------------------- ### Create Opportunity with Custom Properties (JSON) Source: https://app.getpylon.com/docs/api Example of creating a new opportunity using the Pylon Solar API, demonstrating how to include custom property values. This JSON object shows the structure for providing first name and a nested object for custom properties, including URLs, urgency, and specific Pylon Solar fields like coordinates. ```json { "first_name": "Margaret", "custom_property_values": { "rejection_url": "https://solarleads.com.au/reject/fno39ule11", "urgency": "High", "source_page": "https://mysolarcompany.com/special_deal_page", "api.supplier-website.com:supplier_property": "Some value", "pylon.solar:coordinates": { "latitude": -31, "longitude": 151 } } } ``` -------------------------------- ### GET /v1/pipelines/{PIPELINE} Source: https://app.getpylon.com/docs/api Retrieves a specific pipeline object by its ID. ```APIDOC ## GET /v1/pipelines/{PIPELINE} ### Description Retrieves a specific pipeline object by its ID. ### Method GET ### Endpoint `/v1/pipelines/$PIPELINE` ### Parameters #### Path Parameters - **PIPELINE** (string) - Required - The ID of the pipeline to retrieve. #### Query Parameters None #### Request Body None ### Request Example ```curl curl https://api.getpylon.com/v1/pipelines/$PIPELINE \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` ### Response #### Success Response (200) - **data** (object) - Contains the pipeline object. - **type** (string) - The type of the object, always 'pipelines'. - **id** (string) - The unique identifier for the pipeline. - **attributes** (object) - Contains the attributes of the pipeline (title, is_sales, order, created_at, updated_at). - **relationships** (object) - Contains relationships to other resources, including 'pipeline_stages'. - **links** (object) - Contains links related to the pipeline. - **self** (string) - The URL for the pipeline. #### Response Example ```json { "data": { "type": "pipelines", "id": "ZmtbWOA4Vp", "attributes": { "title": "Solar sales", "is_sales": false, "order": null, "created_at": "2020-06-18T15:04:10+00:00", "updated_at": "2020-07-01T16:09:40+00:00" }, "relationships": { "pipeline_stages": { "data": [ { "type": "pipeline_stages", "id": "kfUgIVtyKP" } ], "links": { "related": "https://api.getpylon.com/v1/pipeline_stages?filter%5Bpipeline%5D=ZmtbWOA4Vp" } } }, "links": { "self": "https://api.getpylon.com/v1/pipelines/ZmtbWOA4Vp" } } } ``` ``` -------------------------------- ### GET /v1/pipeline_stages/{PIPELINE_STAGE} Source: https://app.getpylon.com/docs/api Retrieves a specific pipeline stage object by its ID. ```APIDOC ## GET /v1/pipeline_stages/{PIPELINE_STAGE} ### Description Retrieves a specific pipeline stage object. ### Method GET ### Endpoint `/v1/pipeline_stages/$PIPELINE_STAGE` ### Parameters #### Path Parameters - **PIPELINE_STAGE** (string) - Required - The ID of the pipeline stage to retrieve. #### Query Parameters None #### Request Body None ### Request Example ```bash curl https://api.getpylon.com/v1/pipeline_stages/$PIPELINE_STAGE \ --header "Authorization: Bearer $TOKEN" \ --header "Accept: application/vnd.api+json" ``` ### Response #### Success Response (200) - **data** (object) - Contains the pipeline stage object. - **type** (string) - The type of the object, always "pipeline_stages". - **id** (string) - The unique identifier for the pipeline stage. - **attributes** (object) - Contains the properties of the pipeline stage. - **title** (string) - The name of the pipeline stage. - **order** (integer) - The order of the stage in the pipeline (nullable). - **kind** (string) - The kind of the stage (nullable). - **color** (string) - The color associated with the stage (nullable). - **created_at** (string) - The timestamp when the stage was created. - **updated_at** (string) - The timestamp when the stage was last updated. - **relationships** (object) - Contains information about related objects. - **pipeline** (object) - Information about the associated pipeline (nullable). - **links** (object) - Contains links related to the pipeline stage. - **self** (string) - The URL of the pipeline stage resource. #### Response Example ```json { "data": { "type": "pipeline_stages", "id": "kfUgIVtyKP", "attributes": { "title": "Solar sales", "order": null, "kind": null, "color": null, "created_at": "2020-06-18T15:04:10+00:00", "updated_at": "2020-07-01T16:09:40+00:00" }, "relationships": { "pipeline": { "data": null } }, "links": { "self": "https://api.getpylon.com/v1/pipeline_stages/kfUgIVtyKP" } } } ``` ``` -------------------------------- ### List Solar Designs with Fields Filter (API Request) Source: https://app.getpylon.com/docs/api This example demonstrates how to construct a URL to list solar designs, specifically filtering the response to include only the `summary` and `created_at` fields. The `fields[solar_designs]` parameter is mandatory for this resource. ```http https://api.getpylon.com/v1/solar_designs?fields[solar_designs]=summary,created_at ```