-
-
Save Y0lan/5bc79bd878f9eba59c2425c0fa822ed6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,600&display=swap" ref="preconnect" rel="stylesheet"/> | |
<meta charset="utf-8"/> | |
<title>API Reference - Pylon Observer</title> | |
<!--SEO Meta Tags--> | |
<!-- | |
<meta name="description" content="High Resolution Solar Design Software" /> | |
<meta name="keywords" content="high resolution, imagery, images, solar, software, design, tool" /> | |
<meta name="author" content="Pylon" /> | |
--> | |
<!--Mobile Specific Meta Tag--> | |
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"> | |
<!--Favicon--> | |
<link href="/apple-touch-icon.png?v=GvkjeWkgdM" rel="apple-touch-icon" sizes="180x180"/> | |
<link href="/favicon-32x32.png?v=GvkjeWkgdM" rel="icon" sizes="32x32" type="image/png"/> | |
<link href="/favicon-16x16.png?v=GvkjeWkgdM" rel="icon" sizes="16x16" type="image/png"/> | |
<link color="#007ee5" href="/safari-pinned-tab.svg?v=GvkjeWkgdM" rel="mask-icon"/> | |
<link href="/favicon.ico?v=GvkjeWkgdM" rel="shortcut icon"/> | |
<meta content="#2f313a" name="msapplication-TileColor"/> | |
<meta content="#2f313a" name="theme-color"/> | |
<link href="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/atom-one-dark.min.css" rel="stylesheet"/> | |
<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.min.js"></script> | |
<script>hljs.initHighlightingOnLoad();</script> | |
<link crossorigin="anonymous" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" integrity="sha256-l85OmPOjvil/SOvVt3HnSSjzF1TUMyT9eV0c2BzEGzU=" rel="stylesheet"> | |
<style> | |
html { | |
font-size: 16px; | |
} | |
html, body { | |
padding: 0; | |
margin: 0; | |
} | |
h1 { | |
font-size: 1.5rem; | |
margin: 0; | |
} | |
h2 { | |
font-size: 1.25rem; | |
margin: 0; | |
} | |
h3 { | |
font-size: 1.125rem; | |
margin: 0; | |
} | |
h1 a, h2 a, h3 a { | |
color: inherit; | |
text-decoration: none; | |
} | |
h1 a:hover, h2 a:hover, h3 a:hover { | |
text-decoration: underline; | |
} | |
hr { | |
margin: 0; | |
flex: 1; | |
} | |
ol, ul { | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
} | |
pre code, pre code * { | |
font-family: monospace; | |
font-size: .75rem; | |
} | |
#docs-app { | |
} | |
#docs-sidebar { | |
flex-grow: 0; | |
flex-shrink: 0; | |
width: 16rem; | |
position: fixed; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
height: 100vh; | |
flex-direction: column; | |
display: none; | |
} | |
#docs-sidebar-header { | |
padding: 1rem 1rem 0.5rem; | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
} | |
#docs-sidebar-footer { | |
padding: 1rem; | |
} | |
#docs-sidebar-header input { | |
max-width: 100%; | |
} | |
#docs-sidebar-nav { | |
overflow-y: scroll; | |
flex: 1; | |
} | |
#docs-sidebar-nav h2 { | |
font-size: .875rem; | |
text-transform: uppercase; | |
font-weight: 600; | |
color: #616e7c; | |
} | |
#docs-sidebar-nav section { | |
padding: .5rem; | |
} | |
#docs-sidebar-nav a { | |
display: block; | |
text-decoration: none; | |
color: inherit; | |
} | |
#docs-sidebar-nav a:hover { | |
text-decoration: underline; | |
} | |
.toc-category h2 { | |
margin: .75rem 0; | |
} | |
.toc-resource { | |
padding: .25rem .5rem; | |
margin-top: .25rem; | |
} | |
.toc-resource-actions { | |
margin: 0 0 .5rem; | |
} | |
#docs-content { | |
min-height: 100vh; | |
} | |
#docs-content h1 { | |
margin: 1rem 0; | |
} | |
#docs-content h2 { | |
margin: 1rem 0; | |
} | |
#docs-content h3 { | |
margin: 1rem 0; | |
} | |
#docs-content article { | |
} | |
#docs-content article > section { | |
padding: 3rem 0; | |
} | |
#docs-content article .docs-column { | |
margin: 0 auto; | |
padding: 1rem; | |
} | |
#docs-content article h1 { | |
width: 100%; | |
} | |
#docs-content .content { | |
box-sizing: border-box; | |
} | |
#docs-content .content { | |
font-size: .9375rem; | |
} | |
#docs-content .illustration { | |
box-sizing: border-box; | |
} | |
#site-nav { | |
margin: 0 auto; | |
padding: 1rem; | |
display: flex; | |
justify-content: flex-end; | |
} | |
#site-nav a { | |
display: inline-block; | |
} | |
.footer { | |
padding-left: 16rem; | |
} | |
.box { | |
} | |
.box__header { | |
background: #E4E7EB; | |
display: block; | |
border-top-left-radius: 5px; | |
border-top-right-radius: 5px; | |
padding: .5rem 1rem; | |
} | |
.box__content { | |
padding: 1rem; | |
} | |
.sticky .box { | |
min-height: 0; | |
display: flex; | |
flex-direction: column; | |
} | |
.sticky .box--code .box__content { | |
overflow-y: auto; | |
} | |
#docs-content dt { | |
font-weight: bold; | |
} | |
#docs-content dd { | |
display: block; | |
margin: 0; | |
margin-bottom: 0.5rem; | |
} | |
#docs-content dd p { | |
margin: 0; | |
} | |
#docs-content .attr { | |
padding: .5rem 0; | |
margin: .5rem 0; | |
} | |
#docs-content dt.attr__name { | |
display: inline-block; | |
} | |
#docs-content dd.attr__type { | |
display: inline-block; | |
margin: 0 0 0 .25rem; | |
} | |
#docs-content dd.attr__desc { | |
display: block; | |
margin: .5rem 0 0 0; | |
} | |
#docs-content table { | |
/*border-spacing: 0.5rem;*/ | |
border-collapse: collapse; | |
} | |
#docs-content table th { | |
text-align: left; | |
padding-bottom: .5rem; | |
padding-right: 1rem; | |
} | |
#docs-content table td { | |
vertical-align: top; | |
padding-bottom: .5rem; | |
} | |
.route-table { | |
font-size: .9125rem; | |
} | |
.route-table .http-method { | |
display: inline-block; | |
width: 3rem; | |
text-align: right; | |
} | |
.route-table .route { | |
font-family: monospace; | |
/*white-space: nowrap;*/ | |
} | |
#docs-footer { | |
padding: 6rem 0; | |
} | |
@media screen and (min-width: 721px) { | |
.sticky { | |
position: sticky; | |
top: 1rem; | |
max-height: calc(100vh - 3rem); | |
display: flex; | |
flex-direction: column; | |
overflow: hidden; | |
} | |
} | |
@media screen and (max-width: 720px) { | |
#docs-content .illustration { | |
margin: 2rem 0; | |
} | |
#site-nav { | |
position: fixed; | |
top: 0; | |
left: 0; | |
right: 0; | |
border-bottom: 1px solid #E4E7EB; | |
} | |
} | |
@media screen and (min-width: 721px) { | |
#docs-content .content { | |
width: 50%; | |
padding-right: 1rem; | |
} | |
#docs-content .illustration { | |
width: 50%; | |
padding-left: 1rem; | |
} | |
#docs-content .docs-column { | |
display: flex; | |
flex-wrap: wrap; | |
} | |
} | |
@media screen and (min-width: 1001px) { | |
#docs-sidebar { | |
display: flex; | |
} | |
#docs-content { | |
margin-left: 16rem; | |
} | |
} | |
@media screen and (max-width: 720px) { | |
.hide-mobile { | |
display: none !important; | |
} | |
} | |
@media screen and (min-width: 721px) { | |
.show-mobile { | |
display: none !important; | |
} | |
} | |
.level { | |
display: flex; | |
align-items: center; | |
} | |
* { | |
background-color: inherit; | |
} | |
html { | |
font-family: 'Source Sans Pro', sans-serif; | |
background-color: #fefefe; | |
} | |
.docs-invert #docs-sidebar, | |
.docs-invert #docs-content { | |
filter: invert(100%); | |
} | |
pre code, | |
pre code * { | |
font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; | |
} | |
#docs-sidebar { | |
border-right: 1px solid #E4E7EB; | |
background: white; | |
} | |
#docs-sidebar-header input[type="search"] { | |
border-radius: 4px; | |
font-size: .9375rem; | |
} | |
#docs-sidebar-footer { | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
} | |
#docs-sidebar h2 { | |
padding: 0 .5rem; | |
} | |
#docs-sidebar a { | |
transition: color .3s ease, background-color .3s ease; | |
} | |
#docs-sidebar a.active { | |
color: hsl(207, 100%, 34.9%); | |
background-color: hsl(207, 60%, 94.9%); | |
} | |
.toc-resource-action { | |
font-size: .9375rem; | |
padding: .25rem .5rem; | |
padding-left: 1.25rem; | |
} | |
.content h2 { | |
/* padding-bottom: .5rem; */ | |
/* border-bottom: 1px solid #E4E7EB; */ | |
} | |
.route-table .route { | |
color: #3E4C59; | |
margin-left: .5rem; | |
font-size: .8125rem; | |
font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; | |
} | |
.route-table a { | |
text-decoration: none; | |
} | |
.http-method[data-http-method="GET"] { | |
color: rgb(6, 122, 184); | |
} | |
.http-method[data-http-method="POST"] { | |
color: rgb(9, 130, 93); | |
} | |
.http-method[data-http-method="PATCH"] { | |
color: rgb(229, 111, 74); | |
} | |
.attr { | |
border-bottom: 1px solid #E4E7EB; | |
} | |
.attr__name { | |
font-weight: bold; | |
} | |
.attr__type { | |
color: #616E7C; | |
} | |
#docs-content dd.attr__constraints { | |
display: inline-block; | |
color: #616E7C; | |
text-decoration: underline; | |
font-size: .875rem; | |
margin-left: .25rem; | |
} | |
.attr__desc { | |
padding-bottom: .5rem; | |
} | |
.attr__enum-text { | |
text-decoration: underline; | |
} | |
.attr__enum-value { | |
margin: 0 .125rem; | |
} | |
#docs-content .content p:first-child { | |
margin-top: 0; | |
} | |
.box { | |
background: #F5F7FA; | |
} | |
#docs-content { | |
color: #2E3C49; | |
line-height: 1.375; | |
} | |
#site-nav { | |
display: flex; | |
justify-content: space-between; | |
align-items: center; | |
} | |
#site-nav h1 { | |
margin: 0; | |
display: inline-block; | |
} | |
#site-nav a { | |
font-size: 1rem; | |
font-weight: 400; | |
margin-left: 1.5rem; | |
color: #333333; | |
border-radius: .25rem; | |
} | |
#mobile-nav-select { | |
border: 0; | |
outline: 0; | |
background: #E4E7EB; | |
padding: 0.0625rem 0.25rem; | |
border-radius: 0.25rem; | |
} | |
#docs-content .docs-column { | |
margin: 0 auto; | |
} | |
#docs-content article>hr { | |
margin: 0 auto; | |
} | |
hr { | |
border-top: 1px solid #E4E7EB; | |
border-bottom: none; | |
} | |
#docs-content section.resource-header { | |
background: #F5F7FA; | |
} | |
section.resource-header .box__content { | |
border: 1px solid #E4E7EB; | |
border-bottom-left-radius: 5px; | |
border-bottom-right-radius: 5px; | |
background: white; | |
} | |
.content p code, | |
.content dl code, | |
.content table code { | |
background: #f8f8f8; | |
font-size: .8125rem; | |
border: 1px solid #E4E7EB; | |
border-radius: 2px; | |
padding: .075rem .125rem; | |
} | |
.box--code .box__header { | |
background-color: #F5F7FA; | |
border: 1px solid #E4E7EB; | |
} | |
.box--code .box__content { | |
padding: 0; | |
margin: 0; | |
border-bottom-left-radius: 5px; | |
border-bottom-right-radius: 5px; | |
overflow: hidden; | |
} | |
.box--code .box__content code { | |
padding: 1rem; | |
} | |
.box+.box { | |
margin-top: 1rem; | |
} | |
.action-mobile-breadcrumb { | |
font-size: 1rem; | |
display: block; | |
color: #616E7C; | |
} | |
.rpc-version { | |
font-size: 1rem; | |
color: #616E7C; | |
margin: 0 .25rem; | |
font-weight: 700; | |
} | |
.rpc-billable { | |
font-size: 1rem; | |
background-color: #effaf3; | |
color: #257942; | |
margin: 0 .25rem; | |
padding: 0 .5rem; | |
border-radius: 3px; | |
font-weight: 700; | |
} | |
.tag-preview { | |
font-size: 1rem; | |
background-color: #EDE7F6; | |
border: 1px solid #D1C4E9; | |
color: #311B92; | |
margin: 0 .25rem; | |
padding: 0 .5rem; | |
border-radius: 3px; | |
font-weight: normal; | |
} | |
.tag-preview--toc { | |
font-size: .875rem; | |
} | |
.subtitle { | |
display: block; | |
} | |
.copyright { | |
color: #9AA5B1; | |
} | |
@media screen and (min-width: 721px) { | |
.action-mobile-breadcrumb { | |
display: none; | |
} | |
} | |
@media screen and (min-width: 1001px) { | |
#site-nav { | |
max-width: 75vw; | |
} | |
#docs-content .docs-column { | |
max-width: 75vw; | |
} | |
#docs-content article>hr { | |
max-width: 75vw; | |
} | |
} | |
.action-permissions { | |
display: flex; | |
align-items: center; | |
color: #616E7C; | |
font-weight: normal; | |
width: fit-content; | |
} | |
.action-permissions:hover { | |
text-decoration: none; | |
} | |
.action-permissions .svg-icon path:not([fill="none"]) { | |
fill: #818E9C; | |
} | |
.action-permissions code { | |
background: #f8f8f8; | |
font-size: .8125rem; | |
border: 1px solid #E4E7EB; | |
border-radius: 2px; | |
padding: .075rem .125rem; | |
margin: 0 .125rem; | |
} | |
.action-permissions em { | |
font-size: .8125rem; | |
margin: 0 .125rem; | |
} | |
.link-to-guide { | |
font-weight: 700; | |
} | |
p.callout { | |
background: #cce5ff; | |
border: 1px solid #b8daff; | |
color: #004085; | |
border-radius: .5rem; | |
padding: 1rem; | |
} | |
p.warning { | |
background: #FFECB3; | |
border: 1px solid #FAE0B2; | |
color: #BF360C; | |
border-radius: .5rem; | |
padding: 1rem; | |
} | |
.bulleted-list { | |
list-style-type: circle; | |
padding-left: 1.5rem; | |
} | |
</style> | |
</link></meta></head> | |
<body> | |
<div id="docs-app"> | |
<div id="docs-sidebar"> | |
<header id="docs-sidebar-header"> | |
<a class="flex" href="/"> | |
<span class="logo--page"> | |
<svg height="100%" viewbox="0 0 265 42" xmlns="http://www.w3.org/2000/svg"> | |
<defs> | |
<lineargradient id="logo-gradient" x1="0%" x2="0%" y1="0%" y2="92.5%"> | |
<stop offset="0%" style="stop-color:#007ee5;"></stop> | |
<stop offset="100%" style="stop-color:#00e9ef;"></stop> | |
</lineargradient> | |
</defs> | |
<polygon fill="url(#logo-gradient)" points="13.1,0 0,13.1 1.5,30.9 13.1,42 22.1,36 27,13.7 "></polygon> | |
<g> | |
<path d="M42,29.88V12.13h7.53a5.06,5.06,0,0,1,2.26.51A5.83,5.83,0,0,1,53.58,14a6.29,6.29,0,0,1,1.17,1.9A5.79,5.79,0,0,1,55.18,18a6.16,6.16,0,0,1-1.53,4.07,5.64,5.64,0,0,1-1.75,1.33,5.09,5.09,0,0,1-2.25.5h-4.2v5.95Zm3.45-9h4A2,2,0,0,0,51,20.13a3.25,3.25,0,0,0,.64-2.1,3.49,3.49,0,0,0-.2-1.21A3,3,0,0,0,51,15.9a2.18,2.18,0,0,0-.76-.56,2.33,2.33,0,0,0-.89-.19H45.45Z"></path> | |
<path d="M60.53,12.13l4.37,8.55,4.45-8.55h3.73L66.63,23.68v6.2H63.2V23.63l-6.42-11.5Z"></path> | |
<path d="M76.43,29.88V12.13h3.45V26.85h9.05v3Z"></path> | |
<path d="M99.43,30A7.67,7.67,0,0,1,96,29.24a8.57,8.57,0,0,1-2.66-2,9.25,9.25,0,0,1-1.71-2.89A9.52,9.52,0,0,1,91,21a9.37,9.37,0,0,1,2.41-6.27,8.53,8.53,0,0,1,2.69-2A7.78,7.78,0,0,1,99.51,12a7.49,7.49,0,0,1,3.42.79,8.68,8.68,0,0,1,2.65,2.06,9.63,9.63,0,0,1,2.3,6.2,9.33,9.33,0,0,1-2.4,6.24,8.46,8.46,0,0,1-2.67,2A7.81,7.81,0,0,1,99.43,30ZM94.5,21a7.58,7.58,0,0,0,.34,2.23,6,6,0,0,0,1,1.9,4.74,4.74,0,0,0,1.56,1.32,4.64,4.64,0,0,0,4.21,0,4.9,4.9,0,0,0,1.54-1.36,6.45,6.45,0,0,0,1-1.91,7.26,7.26,0,0,0,0-4.39,6.46,6.46,0,0,0-1-1.9,4.76,4.76,0,0,0-1.55-1.31,4.62,4.62,0,0,0-4.18,0,5,5,0,0,0-1.55,1.35,6.18,6.18,0,0,0-1,1.9A7.26,7.26,0,0,0,94.5,21Z"></path> | |
<path d="M115.61,18.5V29.88h-3.45V12.13h2.67l9.25,11.65V12.15h3.45V29.88h-2.8Z"></path> | |
</g> | |
<g> | |
<path d="M146.83,17.39a4.63,4.63,0,0,1,.59-2.35A5.39,5.39,0,0,1,149,13.35a7.19,7.19,0,0,1,2.23-1,9.52,9.52,0,0,1,2.56-.34,9.41,9.41,0,0,1,2.53.34,7.09,7.09,0,0,1,2.23,1A5.39,5.39,0,0,1,160.11,15a4.63,4.63,0,0,1,.59,2.35v7.22a4.61,4.61,0,0,1-.59,2.35,5.28,5.28,0,0,1-1.57,1.69,6.89,6.89,0,0,1-2.23,1,9.81,9.81,0,0,1-2.53.33,9.93,9.93,0,0,1-2.56-.33,7,7,0,0,1-2.23-1A5.28,5.28,0,0,1,147.42,27a4.61,4.61,0,0,1-.59-2.35Zm1.46,7.22a3.14,3.14,0,0,0,.47,1.72A3.84,3.84,0,0,0,150,27.55a6.13,6.13,0,0,0,1.75.75,8.54,8.54,0,0,0,4,0,6,6,0,0,0,1.76-.75,3.87,3.87,0,0,0,1.23-1.22,3.06,3.06,0,0,0,.47-1.72V17.39a3.22,3.22,0,0,0-.47-1.78,3.84,3.84,0,0,0-1.25-1.22,5.65,5.65,0,0,0-1.76-.71,9.78,9.78,0,0,0-2-.22,8.27,8.27,0,0,0-2,.24,5.63,5.63,0,0,0-1.74.71,3.74,3.74,0,0,0-1.24,1.23,3.22,3.22,0,0,0-.47,1.75Z"></path> | |
<path d="M173.85,20.43A3.61,3.61,0,0,1,176,22.14a5.89,5.89,0,0,1,.59,2.74,5.21,5.21,0,0,1-.48,2.29,4.06,4.06,0,0,1-1.23,1.51,5,5,0,0,1-1.85.83,10.41,10.41,0,0,1-2.3.24h-6.62V12.25h6.65a6.82,6.82,0,0,1,1.93.27,4.61,4.61,0,0,1,1.59.82,3.8,3.8,0,0,1,1.08,1.38,4.6,4.6,0,0,1,.39,2,5.49,5.49,0,0,1-.42,2.17A3.23,3.23,0,0,1,173.85,20.43Zm-3.11-.69a5.83,5.83,0,0,0,1.42-.16,3,3,0,0,0,1.14-.53,2.6,2.6,0,0,0,.75-.95,3.36,3.36,0,0,0,.27-1.42,3.14,3.14,0,0,0-.28-1.41,2.48,2.48,0,0,0-.77-.92,3.13,3.13,0,0,0-1.13-.49,6.33,6.33,0,0,0-1.4-.15h-5.19v6Zm0,8.56a9,9,0,0,0,1.77-.13,3.69,3.69,0,0,0,1.38-.54,2.59,2.59,0,0,0,.9-1.06,3.89,3.89,0,0,0,.33-1.71,4.44,4.44,0,0,0-.31-1.74,2.87,2.87,0,0,0-.88-1.14,3.5,3.5,0,0,0-1.37-.61,9.16,9.16,0,0,0-1.82-.17h-5.19v7.1Z"></path> | |
<path d="M180.28,16.45a2.47,2.47,0,0,0,.3,1.54,2.87,2.87,0,0,0,1,1,6,6,0,0,0,1.54.61c.59.15,1.2.28,1.85.39s1.51.32,2.26.51a6.51,6.51,0,0,1,2,.87,4,4,0,0,1,1.41,1.54,4.75,4.75,0,0,1,.45,2.52,4,4,0,0,1-.61,2,4.84,4.84,0,0,1-1.42,1.43,6.29,6.29,0,0,1-2,.87,8.91,8.91,0,0,1-2.26.28,9.1,9.1,0,0,1-1.95-.21,7.34,7.34,0,0,1-1.81-.64,6.44,6.44,0,0,1-1.5-1.06,4.33,4.33,0,0,1-1-1.47l1.33-.6a3.13,3.13,0,0,0,.79,1.11,4.43,4.43,0,0,0,1.2.78,6.39,6.39,0,0,0,1.46.47,7.54,7.54,0,0,0,1.57.16,7.45,7.45,0,0,0,1.7-.19,5.28,5.28,0,0,0,1.48-.6,3.39,3.39,0,0,0,1.07-1,2.81,2.81,0,0,0,.5-1.41,2.84,2.84,0,0,0-1.44-2.9,6,6,0,0,0-1.65-.68c-.63-.17-1.28-.32-2-.47s-1.44-.31-2.14-.5a6.49,6.49,0,0,1-1.88-.79,3.85,3.85,0,0,1-1.33-1.36,4,4,0,0,1-.44-2.2,3.65,3.65,0,0,1,.56-1.94,4.62,4.62,0,0,1,1.37-1.38,6.48,6.48,0,0,1,1.91-.84,8.67,8.67,0,0,1,2.22-.29,8.8,8.8,0,0,1,1.91.21,7.8,7.8,0,0,1,1.78.62,5.71,5.71,0,0,1,1.47,1,4.67,4.67,0,0,1,1,1.43l-1.31.59a3,3,0,0,0-.78-1.07,4.88,4.88,0,0,0-1.16-.77,6,6,0,0,0-1.41-.45,7.83,7.83,0,0,0-1.52-.15,7.56,7.56,0,0,0-1.67.18,5.34,5.34,0,0,0-1.45.56,3.29,3.29,0,0,0-1,.94A2.59,2.59,0,0,0,180.28,16.45Z"></path> | |
<path d="M195.66,20.26h8.78v1.48h-8.78V28.3h9.52v1.45h-11V12.25h11v1.46h-9.52Z"></path> | |
<path d="M213.17,22.34h-3.44v7.41h-1.46V12.25h6.6a8.84,8.84,0,0,1,2.3.28,4.89,4.89,0,0,1,1.84.91A4.43,4.43,0,0,1,220.25,15a5.6,5.6,0,0,1,.48,2.32,5.06,5.06,0,0,1-.47,2.31A4.21,4.21,0,0,1,219,21.2a5.49,5.49,0,0,1-1.86.87,8.91,8.91,0,0,1-2.23.27h-.05l5.86,7.41H218.9ZM214.9,21a8.28,8.28,0,0,0,1.81-.18,3.79,3.79,0,0,0,1.38-.61,2.64,2.64,0,0,0,.87-1.12,4.28,4.28,0,0,0,.31-1.75,4,4,0,0,0-.32-1.73,2.74,2.74,0,0,0-.9-1.11,4,4,0,0,0-1.38-.61,8.16,8.16,0,0,0-1.77-.18h-5.17V21Z"></path> | |
<path d="M221.52,12.23h1.54l5.86,16.44,5.81-16.44h1.53L230,29.75h-2.15Z"></path> | |
<path d="M239.82,20.26h8.78v1.48h-8.78V28.3h9.52v1.45h-11V12.25h11v1.46h-9.52Z"></path> | |
<path d="M257.32,22.34h-3.43v7.41h-1.46V12.25H259a8.89,8.89,0,0,1,2.3.28,4.89,4.89,0,0,1,1.84.91A4.43,4.43,0,0,1,264.41,15a5.76,5.76,0,0,1,.48,2.32,5.2,5.2,0,0,1-.47,2.31,4.21,4.21,0,0,1-1.27,1.55,5.49,5.49,0,0,1-1.86.87,8.91,8.91,0,0,1-2.23.27H259l5.86,7.41h-1.81ZM259.06,21a8.28,8.28,0,0,0,1.81-.18,3.67,3.67,0,0,0,1.37-.61,2.66,2.66,0,0,0,.88-1.12,4.28,4.28,0,0,0,.31-1.75,4.18,4.18,0,0,0-.32-1.73,2.82,2.82,0,0,0-.9-1.11,3.92,3.92,0,0,0-1.39-.61,8,8,0,0,0-1.76-.18h-5.17V21Z"></path> | |
</g> | |
</svg> | |
</span> | |
</a> | |
</header> | |
<nav id="docs-sidebar-nav"> | |
<section> | |
<h2>API Reference</h2> | |
</section> | |
<section class="toc-category"> | |
<a class="toc-resource" href="#introduction"> | |
Introduction | |
</a> | |
<a class="toc-resource" href="#authentication"> | |
Authentication | |
</a> | |
<a class="toc-resource" href="#using-the-api"> | |
Using the API | |
</a> | |
<a class="toc-resource" href="#status-codes"> | |
Status codes | |
</a> | |
<a class="toc-resource" href="#billing"> | |
Billing | |
</a> | |
</section> | |
<section class="toc-category"> | |
<h2 class="toc-resource-title">Solar design</h2> | |
<a class="toc-resource" href="#solar_projects"> | |
Solar projects | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#solar_project_object">The solar project object</a></li> | |
<li><a class="toc-resource-action" href="#solar_projects.index">List solar projects</a></li> | |
<li><a class="toc-resource-action" href="#solar_projects.show">Show solar project</a></li> | |
</ul> | |
<a class="toc-resource" href="#solar_designs"> | |
Solar designs | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#solar_design_object">The solar design object</a></li> | |
<li><a class="toc-resource-action" href="#solar_designs.index">List solar designs</a></li> | |
<li><a class="toc-resource-action" href="#solar_designs.show">Show solar design</a></li> | |
</ul> | |
<a class="toc-resource" href="#solar_modules"> | |
Solar modules | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#solar_module_object">The solar module object</a></li> | |
<li><a class="toc-resource-action" href="#solar_modules.show">Show solar module</a></li> | |
</ul> | |
<a class="toc-resource" href="#solar_inverters"> | |
Solar inverters | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#solar_inverter_object">The solar inverter object</a></li> | |
<li><a class="toc-resource-action" href="#solar_inverters.show">Show solar inverter</a></li> | |
</ul> | |
<a class="toc-resource" href="#solar_batteries"> | |
Solar batteries | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#solar_battery_object">The solar battery object</a></li> | |
<li><a class="toc-resource-action" href="#solar_batteries.show">Show solar battery</a></li> | |
</ul> | |
<a class="toc-resource" href="#australian_stcs"> | |
Australian STCs | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#au_stc_amount.index">Calculate STC quantity</a></li> | |
</ul> | |
</section> | |
<section class="toc-category"> | |
<h2 class="toc-resource-title">Pylon platform</h2> | |
<a class="toc-resource" href="#users"> | |
Users | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#user_object">The user object</a></li> | |
<li><a class="toc-resource-action" href="#users.index">List users</a></li> | |
<li><a class="toc-resource-action" href="#users.show">Show user</a></li> | |
</ul> | |
<a class="toc-resource" href="#files"> | |
Files | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#file_object">The file object</a></li> | |
<li><a class="toc-resource-action" href="#files.index">List files</a></li> | |
<li><a class="toc-resource-action" href="#files.store">Create file</a></li> | |
<li><a class="toc-resource-action" href="#files.show">Show file</a></li> | |
</ul> | |
<a class="toc-resource" href="#events"> | |
Events | |
<span class="tag-preview tag-preview--toc" style="float: right">Preview</span> | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#event_object">The event object</a></li> | |
<li><a class="toc-resource-action" href="#events.index">List events</a></li> | |
<li><a class="toc-resource-action" href="#events.show">Show event</a></li> | |
<li><a class="toc-resource-action" href="#event-types">Event types</a></li> | |
</ul> | |
</section> | |
<section class="toc-category"> | |
<h2 class="toc-resource-title">CRM</h2> | |
<a class="toc-resource" href="#opportunities"> | |
Opportunities | |
<span class="tag-preview tag-preview--toc" style="float: right">Preview</span> | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#opportunity_object">The opportunity object</a></li> | |
<li><a class="toc-resource-action" href="#opportunities.store-form">Create leads</a></li> | |
<li><a class="toc-resource-action" href="#opportunities.index">List opportunities</a></li> | |
<li><a class="toc-resource-action" href="#opportunities.show">Show opportunity</a></li> | |
<li><a class="toc-resource-action" href="#custom-properties">Custom properties</a></li> | |
</ul> | |
<a class="toc-resource" href="#contacts"> | |
Contacts | |
<span class="tag-preview tag-preview--toc" style="float: right">Preview</span> | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#contact_object">The contact object</a></li> | |
<li><a class="toc-resource-action" href="#contacts.show">Show contact</a></li> | |
</ul> | |
<a class="toc-resource" href="#lead_statuses"> | |
Lead statuses | |
<span class="tag-preview tag-preview--toc" style="float: right">Preview</span> | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#lead_status_object">The lead status object</a></li> | |
<li><a class="toc-resource-action" href="#lead_statuses.index">List lead statuses</a></li> | |
<li><a class="toc-resource-action" href="#lead_statuses.show">Show lead status</a></li> | |
</ul> | |
<a class="toc-resource" href="#pipelines"> | |
Pipelines | |
<span class="tag-preview tag-preview--toc" style="float: right">Preview</span> | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#pipeline_object">The pipeline object</a></li> | |
<li><a class="toc-resource-action" href="#pipelines.index">List pipelines</a></li> | |
<li><a class="toc-resource-action" href="#pipelines.show">Show pipeline</a></li> | |
</ul> | |
<a class="toc-resource" href="#pipeline_stages"> | |
Pipeline stages | |
<span class="tag-preview tag-preview--toc" style="float: right">Preview</span> | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#pipeline_stage_object">The pipeline stage object</a></li> | |
<li><a class="toc-resource-action" href="#pipeline_stages.index">List pipeline stages</a></li> | |
<li><a class="toc-resource-action" href="#pipeline_stages.show">Show pipeline stage</a></li> | |
</ul> | |
<a class="toc-resource" href="#tags"> | |
Tags | |
<span class="tag-preview tag-preview--toc" style="float: right">Preview</span> | |
</a> | |
<ul class="toc-resource-actions"> | |
<li><a class="toc-resource-action" href="#tag_object">The tag object</a></li> | |
<li><a class="toc-resource-action" href="#tags.index">List tags</a></li> | |
<li><a class="toc-resource-action" href="#tags.show">Show tag</a></li> | |
</ul> | |
</section> | |
</nav> | |
<footer id="docs-sidebar-footer"> | |
<span class="copyright">© Pylon 2020</span> | |
<svg height="24" onclick="toggleInvert()" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1.5-1.5-1.5V8h-2.5L12 6.5 10.5 8H8v2.5L6.5 12 8 13.5V16zm4-7c1.66 0 3 1.34 3 3s-1.34 3-3 3V9z"></path></svg> | |
</footer> | |
</div> | |
<main id="docs-content"> | |
<header id="site-nav"> | |
<span class="level"> | |
<h1 class="hide-mobile">Pylon API Reference</h1> | |
<select class="show-mobile" id="mobile-nav-select" onchange="mobileNavSelected(this.value)"> | |
<option disabled="" value="">API Reference</option> | |
<option value="introduction">Introduction</option> | |
<option value="authentication">Authentication</option> | |
<option value="using-the-api">Using the API</option> | |
<option value="status-codes">Status codes</option> | |
<option value="billing">Billing</option> | |
<optgroup label="Solar projects"> | |
<option value="solar_projects">Solar projects</option> | |
<option value="solar_project_object"> | |
The solar project object | |
</option> | |
<option value="solar_projects.index"> | |
List solar projects | |
</option> | |
<option value="solar_projects.show"> | |
Show solar project | |
</option> | |
</optgroup> | |
<optgroup label="Solar designs"> | |
<option value="solar_designs">Solar designs</option> | |
<option value="solar_design_object"> | |
The solar design object | |
</option> | |
<option value="solar_designs.index"> | |
List solar designs | |
</option> | |
<option value="solar_designs.show"> | |
Show solar design | |
</option> | |
</optgroup> | |
<optgroup label="Solar modules"> | |
<option value="solar_modules">Solar modules</option> | |
<option value="solar_module_object"> | |
The solar module object | |
</option> | |
<option value="solar_modules.show"> | |
Show solar module | |
</option> | |
</optgroup> | |
<optgroup label="Solar inverters"> | |
<option value="solar_inverters">Solar inverters</option> | |
<option value="solar_inverter_object"> | |
The solar inverter object | |
</option> | |
<option value="solar_inverters.show"> | |
Show solar inverter | |
</option> | |
</optgroup> | |
<optgroup label="Solar batteries"> | |
<option value="solar_batteries">Solar batteries</option> | |
<option value="solar_battery_object"> | |
The solar battery object | |
</option> | |
<option value="solar_batteries.show"> | |
Show solar battery | |
</option> | |
</optgroup> | |
<optgroup label="Australian STCs"> | |
<option value="australian_stcs">Australian STCs</option> | |
<option value="au_stc_amount.index"> | |
Calculate STC quantity | |
</option> | |
</optgroup> | |
<optgroup label="Users"> | |
<option value="users">Users</option> | |
<option value="user_object"> | |
The user object | |
</option> | |
<option value="users.index"> | |
List users | |
</option> | |
<option value="users.show"> | |
Show user | |
</option> | |
</optgroup> | |
<optgroup label="Files"> | |
<option value="files">Files</option> | |
<option value="file_object"> | |
The file object | |
</option> | |
<option value="files.index"> | |
List files | |
</option> | |
<option value="files.store"> | |
Create file | |
</option> | |
<option value="files.show"> | |
Show file | |
</option> | |
</optgroup> | |
<optgroup label="Events"> | |
<option value="events">Events</option> | |
<option value="event_object"> | |
The event object | |
</option> | |
<option value="events.index"> | |
List events | |
</option> | |
<option value="events.show"> | |
Show event | |
</option> | |
<option value="event-types"> | |
Event types | |
</option> | |
</optgroup> | |
<optgroup label="Opportunities"> | |
<option value="opportunities">Opportunities</option> | |
<option value="opportunity_object"> | |
The opportunity object | |
</option> | |
<option value="opportunities.store-form"> | |
Create leads | |
</option> | |
<option value="opportunities.index"> | |
List opportunities | |
</option> | |
<option value="opportunities.show"> | |
Show opportunity | |
</option> | |
<option value="custom-properties"> | |
Custom properties | |
</option> | |
</optgroup> | |
<optgroup label="Contacts"> | |
<option value="contacts">Contacts</option> | |
<option value="contact_object"> | |
The contact object | |
</option> | |
<option value="contacts.show"> | |
Show contact | |
</option> | |
</optgroup> | |
<optgroup label="Lead statuses"> | |
<option value="lead_statuses">Lead statuses</option> | |
<option value="lead_status_object"> | |
The lead status object | |
</option> | |
<option value="lead_statuses.index"> | |
List lead statuses | |
</option> | |
<option value="lead_statuses.show"> | |
Show lead status | |
</option> | |
</optgroup> | |
<optgroup label="Pipelines"> | |
<option value="pipelines">Pipelines</option> | |
<option value="pipeline_object"> | |
The pipeline object | |
</option> | |
<option value="pipelines.index"> | |
List pipelines | |
</option> | |
<option value="pipelines.show"> | |
Show pipeline | |
</option> | |
</optgroup> | |
<optgroup label="Pipeline stages"> | |
<option value="pipeline_stages">Pipeline stages</option> | |
<option value="pipeline_stage_object"> | |
The pipeline stage object | |
</option> | |
<option value="pipeline_stages.index"> | |
List pipeline stages | |
</option> | |
<option value="pipeline_stages.show"> | |
Show pipeline stage | |
</option> | |
</optgroup> | |
<optgroup label="Tags"> | |
<option value="tags">Tags</option> | |
<option value="tag_object"> | |
The tag object | |
</option> | |
<option value="tags.index"> | |
List tags | |
</option> | |
<option value="tags.show"> | |
Show tag | |
</option> | |
</optgroup> | |
</select> | |
<a href="https://getpylon.com/developers">Docs home</a> | |
</span> | |
<nav> | |
<a class="hide-mobile" href="/login">Login</a> | |
</nav> | |
</header> | |
<hr/> | |
<article> | |
<article> | |
<section id="introduction"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#introduction">Introduction</a> | |
</h1> | |
<div class="content"> | |
<p> | |
The Pylon API is organized according to REST principles. | |
We use resource-oriented URLs, content negotiation, hypermedia, and informative status codes and headers. | |
Most endpoints accept and return JSON-encoded bodies, though other content types are sometimes available. | |
</p> | |
<p> | |
The API will evolve over time, but breaking changes will be kept to a minimum and made in consultation with our users. | |
</p> | |
<h2>Not a developer?</h2> | |
<p> | |
Send this page to your IT team or web development contractor. | |
Or check out our <a href="mailto:[email protected]?subject=Zapier%20integration" target="_blank">Zapier integration (coming soon)</a> to start integrating without needing to write code. | |
</p> | |
<h2>API support</h2> | |
<p> | |
If you are using Pylon's API to integrate with your own software, we offer technical support via email. | |
If you have a question that is not covered by this documentation, please | |
<a href="mailto:[email protected]?subject=API%20support" target="_blank">get in touch</a>. | |
</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
API root URL | |
</header> | |
<pre class="box__content"><code class="language-bash">https://api.getpylon.com</code></pre> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section id="authentication"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#authentication">Authentication</a> | |
</h1> | |
<div class="content"> | |
<p> | |
To start making requests to the API, you'll need to first create an <strong>API token</strong> in your | |
<a href="/settings/api" target="_blank">API settings area</a>. | |
You can create multiple tokens, and revoke them at any time. | |
Tokens are associated with your team and the user who created them. | |
</p> | |
<p> | |
Pass your API token in the <code>Authorization</code> header as shown in the example, where <code>$TOKEN</code> should be replaced with your actual secret API token value. | |
You should <em>always</em> use HTTPS when making requests containing sensitive information, and our API will return an error if you use a non-HTTPS URL. | |
</p> | |
<h2>API token security</h2> | |
<p> | |
Your API token is intended for <strong>server-side use</strong>, and should not be distributed to browsers (e.g. in page HTML or in a JavaScript bundle), nor committed to source control. | |
If you suspect a token has been compromised, <strong>revoke it immediately</strong> from your API settings. | |
</p> | |
<p> | |
<strong>Do not</strong> distribute API tokens using emails, SMS messages, or group chat software. | |
Doing this leaves your API token in history from where it could be leaked. | |
If you need to transmit API tokens between team members or to third parties (e.g. your IT contractor), use a secure ephemeral service. | |
<a href="https://secrets.crabmusket.net" target="_blank">This instance of SnapPass</a> provides such a service. | |
</p> | |
<p> | |
Delete unused API keys, and keys created for development or testing purposes, to reduce the chance of a leak. | |
Consider regenerating API keys periodically by creating a new key, switching your applications to it, then deleting the old key. | |
Our <a href="/settings/api/logs">API logging</a> helps you ensure that you have switched completely before deleting the old key. | |
</p> | |
<h2>Permissions</h2> | |
<p> | |
When you create an API token to make requests with, you can assign it permissions. | |
By creating multiple tokens with appropriate permissions, you can increase the security of your integration. | |
</p> | |
<table> | |
<thead> | |
<tr> | |
<th>Permission</th> | |
<th>Description</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td><code>read</code></td> | |
<td>This is implicitly allowed for all API tokens.</td> | |
</tr> | |
<tr> | |
<td><code>write</code></td> | |
<td>This is required in order to create or update any resources.</td> | |
</tr> | |
<tr> | |
<td><code>payment</code></td> | |
<td>This permission is required for any <a href="#billing">billable</a> API calls, as well as API calls which may spend your Pylon Observer credit balance.</td> | |
</tr> | |
<tr> | |
<td><code>admin</code></td> | |
<td>Certain parts of the API contain more sensitive company information, and to read or write these resources, this additional permission is required.</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Authenticated request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/users \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section id="using-the-api"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#using-the-api">Using the API</a> | |
</h1> | |
<div class="content"> | |
<p> | |
In order to use the Pylon API, you should ensure you are familiar with the following conventions. | |
</p> | |
<h2>HTTP features</h2> | |
<p> | |
Our API makes frequent use of HTTP headers and status codes. | |
See <a href="#status-codes">below</a> for details of status codes that may be returned from API calls. | |
</p> | |
<p> | |
Your client should be prepared to follow redirects (HTTP 3XX responses) as we make use of them in some responses, as well as when making changes to the API's organisation. | |
Most HTTP clients have a simple configuration option that enables following redirects, if it is not the default behaviour. | |
</p> | |
<h2>JSON:API specification</h2> | |
<p> | |
Our API follows a subset of the <a href="https://jsonapi.org/" target="_blank">JSON:API specification</a>. | |
As such, there are several predictable ways all endpoints will behave. | |
Developers are encouraged to use JSON:API-compatible <a href="https://jsonapi.org/implementations/#client-libraries" target="_blank">tools and libraries</a> when working with our API. | |
</p> | |
<h3>Content types</h3> | |
<p> | |
When making requests to resource endpoints, your client should specify the <code>Accept: application/vnd.api+json</code> request header. | |
In addition, requests with bodies (e.g. POST, PATCH) should include the header <code>Content-Type: application/vnd.api+json</code>. | |
</p> | |
<p> | |
All API endpoints which represent resources will respond with the header <code>Content-Type: application/vnd.api+json</code>. | |
Any exceptions to this are noted in this document. | |
</p> | |
<h3>Single resources</h3> | |
<p> | |
A response body representing a single resource will contain a <code>data</code> property which is an object containing the resource. | |
All resources contain <code>type</code>, <code>id</code>, <code>attributes</code> and <code>relationships</code>, and usually contain <code>links</code>. | |
</p> | |
<h3>Collection resources</h3> | |
<p> | |
A response body representing a collection of resources will contain a <code>data</code> property which is an array of resource objects. | |
Each object in the array is identical to the individual resource object described above. | |
</p> | |
<p> | |
See the example <span class="show-mobile">below</span><span class="hide-mobile">to the right</span> | |
for an illustration of a typical response body. | |
</p> | |
<h3 id="rest-resources-fields">Filtering response fields</h3> | |
<p> | |
If you want to reduce the size of response bodies from the API—for example, if you are only interested in one field, not the rest of the response—you may use JSON:API <a href="https://jsonapi.org/format/#fetching-sparse-fieldsets" target="_blank">sparse fieldsets</a> to filter response bodies. | |
The general format is to provide a query parameter <code>fields[type]=field1,field2</code> where the <code>type</code> is the type of an object included in the response body, and <code>field1</code> and <code>field1</code> are names of either <strong>attributes</strong> or <strong>relationships</strong> of the object. | |
</p> | |
<p> | |
For example, here is URL for a request to the <a href="#users">users</a> API which filters the response fields. | |
</p> | |
<pre class="language-bash"><code>https://api.getpylon.com/v1/users?fields[users]=email</code></pre> | |
<p> | |
In the response to this request, all objects of the <code>users</code> type will only contain an <code>email</code> attribute, and no relationships: | |
</p> | |
<h2>Pagination</h2> | |
<p> | |
A response body representing a collection will have pagination links in a top-level <code>links</code> property. | |
The <code>next</code> and <code>prev</code> links allow your code to navigate through a collection of resources automatically. | |
When you have reached the end of the collection, the <code>next</code> will be <code>null</code>. | |
</p> | |
<p> | |
If your request contains query parameters, the pagination links will automatically include these parameters as well. | |
You <strong>should not</strong> construct paginated URLs manually! Use the <code>links</code>! | |
</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
A collection of <a href="#users">User</a> resources | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": [{ | |
"type": "users", | |
"id": "MVGH032m", | |
"attributes": { | |
"email": "[email protected]", | |
"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 | |
} | |
} | |
}</code></pre> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section id="status-codes"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#status-codes">Status codes</a> | |
</h1> | |
<div class="content"> | |
<p> | |
Our API uses HTTP status codes to denote success and failure. | |
Ensure that if your HTTP client does not throw an exception on unsuccessful status codes, you manually check each response's status code. | |
</p> | |
<h2>Error format</h2> | |
<p> | |
All unsuccessful API calls will receive a response with a 4XX or 5XX status code, and contain a body in the <a href="https://tools.ietf.org/html/rfc7807" target="_blank">problem details format</a>. | |
<a href="/docs/errors">See documentation for specific error types</a>. | |
There is an example of a problem details response body | |
<span class="show-mobile">below</span><span class="hide-mobile">to the right</span>. | |
</p> | |
<h2>Common status codes</h2> | |
<p> | |
Our API makes use of HTTP response codes to indicate the success or failure of requests. | |
Codes in the 200-299 range represent successes. | |
Codes in the 300-399 range are redirects, which your HTTP client should follow automatically. | |
Codes in the 400-599 range represent errors. | |
Described below are the most common response codes you will encounter. | |
</p> | |
<dl> | |
<dt>200</dt> | |
<dd><p>Success. Response body will contain a resource representation.</p></dd> | |
<dt>201</dt> | |
<dd><p>Success. A new resource was created and its representation is included in the response.</p></dd> | |
<dt>204</dt> | |
<dd><p>Success. Response body will be empty.</p></dd> | |
<dt>303</dt> | |
<dd><p>See other: this typically indicates that the request created a resource, and its representation can be found at another location.</p></dd> | |
<dt>400</dt> | |
<dd><p>There was a problem with the syntax of your request (e.g., invalid JSON formatting).</p></dd> | |
<dt>401</dt> | |
<dd><p>You did not provide sufficient or correct authentication information.</p></dd> | |
<dt>402</dt> | |
<dd><p>When performing an operation that requires payment, this failure indicates your account has insufficient credit to complete it.</p></dd> | |
<dt>403</dt> | |
<dd><p>You are not permitted to perform the action. For example, maybe the API token being used has only the <code>read</code> permission and you attempted a write. Missing <code>payments</code> permissions will cause 403 errors, not 402 errors.</p></dd> | |
<dt>406</dt> | |
<dd><p>The request used content negotiation incorrectly. This is typically because the request did not specify the <code>Accept: application/vnd.api+json</code> header.</p></dd> | |
<dt>415</dt> | |
<dd><p>The request body content type was not accepted. This is typically because the request did not specify the <code>Content-Type: application/vnd.api+json</code> header.</p></dd> | |
<dt>422</dt> | |
<dd><p> | |
Validation failure. Some properties of the request failed validation. | |
More detail will be provided in the <code>errors</code> property, as in the example response | |
<span class="show-mobile">below</span><span class="hide-mobile">to the right</span>. | |
</p></dd> | |
<dt>500</dt> | |
<dd><p> | |
Server error. This indicates a bug in the API and should be reported to us for assistance. | |
</p></dd> | |
</dl></div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example validation error response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "https://observer.getpylon.com/docs/errors#validation_error", | |
"code": "validation_error", | |
"title": "Some parameters failed validation.", | |
"status": 422, | |
"errors": { | |
"email": [ | |
"The email must be a valid email address." | |
], | |
"first_name": [ | |
"The first name field is required." | |
] | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section id="billing"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#billing">Billing</a> | |
</h1> | |
<div class="content"> | |
<p> | |
Some methods in the API may incur billing charges when used. | |
These methods are marked with a label under their title: | |
</p> | |
<p><span class="rpc-billable">Billable</span></p> | |
<p> | |
In order to make billable requests, your API token must be given the <code>payment</code> permission when it is created. | |
This prevents you from accidentally causing billing with API tokens meant for administrative purposes. | |
</p> | |
</div> | |
<aside class="illustration"> | |
<h2>Billing rates</h2> | |
<p> | |
Check our <a href="">pricing page</a> for billing rates. | |
</p> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="solar_projects"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#solar_projects">Solar projects</a> | |
</h1> | |
<div class="content"> | |
<p>Each solar project is located at one address and represents plans | |
to install a single solar system. This might involve multiple solar arrays, but | |
typically all behind the same meter.</p> | |
<p>The <code>solar_projects</code> resource represents the project itself, | |
including location and customer details. Each project may have more than one | |
<em>design</em>, as you go through the process of determining the best system | |
to fit your customer's needs. For more details about the solar designs | |
proposed for each project, see the <a href="#solar_designs">solar designs</a> | |
resource.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#solar_projects.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/solar_projects</span> | |
</a> | |
</li> | |
<li> | |
<a href="#solar_projects.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/solar_projects/{solar_project}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="solar_project_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#solar_project_object">The solar project object</a></h1> | |
<div class="content"> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">reference_number</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>This reference number can be used to identify the project in external systems</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">site_location</dt> | |
<dd class="attr__type"> array of numbers</dd> | |
<dd class="attr__desc"><p>[Longutide, latitude] coordinates of this project.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">site_location[*]</dt> | |
<dd class="attr__type"> number</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">site_address</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p>Street address of this project. Note that users can edit some of these properties to make cosmetic corrections.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">customer_details</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p>Information about the customer which will be displayed in web proposals for this project.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">acceptance</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p>"Acceptance" is when the customer agrees to purchase a solar system.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">acceptance.is_accepted</dt> | |
<dd class="attr__type"> boolean</dd> | |
<dd class="attr__desc"><p>Has the project been accepted via any method?</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">acceptance.manually_sold</dt> | |
<dd class="attr__type"> boolean</dd> | |
<dd class="attr__desc"><p>Is the project marked as "sold" in the library?</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">acceptance.latest_esignature</dt> | |
<dd class="attr__type"> boolean</dd> | |
<dd class="attr__desc"><p>Was the latest e-signature request for any design of this project signed?</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">is_archived</dt> | |
<dd class="attr__type"> boolean</dd> | |
<dd class="attr__desc"><p>Has this project been archived?</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">updated_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
</dl> | |
<h2>Relationships</h2> | |
<dl> | |
<dt>owner</dt> | |
<dd> | |
<p>A single <a href="#users">user</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>designs</dt> | |
<dd> | |
<p>A collection of <a href="#solar_designs">solar designs</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>primary_design</dt> | |
<dd> | |
<p>A single <a href="#solar_designs">solar design</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>opportunities</dt> | |
<dd> | |
<p>A collection of <a href="#opportunities">opportunities</a></p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "solar_projects", | |
"id": "UBJshFIvlA", | |
"attributes": { | |
"reference_number": "PYL-0003-7789", | |
"site_location": [ | |
145.0709934, | |
-37.8510383 | |
], | |
"site_address": { | |
"line1": "19 Parmesan Avenue", | |
"line2": "", | |
"city": "Glen Iris", | |
"state": "Victoria", | |
"zip": "3147", | |
"country": "Australia" | |
}, | |
"customer_details": { | |
"name": "Jill Lepore", | |
"phone": "0421 000 111", | |
"email": "[email protected]" | |
}, | |
"acceptance": { | |
"is_accepted": false, | |
"manually_sold": false, | |
"latest_esignature": false | |
}, | |
"is_archived": false, | |
"created_at": "2019-11-04T08:56:04+00:00", | |
"updated_at": "2020-02-18T13:14:00+00:00" | |
}, | |
"relationships": { | |
"owner": { | |
"data": { | |
"type": "users", | |
"id": "9M7zLC6uMg" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/users/9M7zLC6uMg" | |
} | |
}, | |
"designs": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_designs?filter%5Bproject%5D=UBJshFIvlA&fields%5Bsolar_designs%5D=created_at" | |
} | |
}, | |
"primary_design": { | |
"data": null | |
}, | |
"opportunities": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/UBJshFIvlA/opportunities" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/solar_projects/UBJshFIvlA" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="solar_projects.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#solar_projects">Solar projects ›</a></span> | |
<a data-copyable="" href="#solar_projects.index">List solar projects</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<p>Projects are returned in the order they were created, least recent first. | |
Results include archived projects.</p> | |
<h2>Query parameters</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">filter</dt> | |
<dd class="attr__type"> optional object</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[is_archived]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Whether to list projects that have been archived. Defaults to <code>false</code>.</p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"true"</code> | |
<code class="attr__enum-value">"false"</code> | |
<code class="attr__enum-value">"any"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[reference_number]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Return only the project with this reference number, if any.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[created_at.gte]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>List projects created on or after the given timestamp.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[created_at.lt]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>List projects created before the given timestamp.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[created_at.within]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Format: duration</dd> <dd class="attr__desc"><p>List projects created within the given time duration before now, specified as an ISO8601 period, e.g. <code>PT30M</code>.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[owner]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Only projects owned by the user with this <code>id</code>. May be a comma-separated list to include multiple owners.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[acceptance]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Provide <code>is_accepted</code> to return only projects which have been accepted (i.e. sold), and <code>none</code> to return projects which have not been accepted.</p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"is_accepted"</code> | |
<code class="attr__enum-value">"none"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[opportunity]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Provide <code>opportunity</code> to return only projects which are linked to the specified opportunity</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">sort</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Order to sort projects. Defaults to <code>created_at.asc</code>.</p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"created_at.asc"</code> | |
<code class="attr__enum-value">"created_at.desc"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">fields</dt> | |
<dd class="attr__type"> optional object</dd> | |
<dd class="attr__desc"><p>Learn about filtering response fields <a href="#rest-resources">here</a>.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">fields[solar_projects]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Limit the fields returned for these projects.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">fields[solar_designs]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>These fields will be applied to links to solar design resources from this result.</p></dd> | |
</div> | |
</dl> | |
<h2>Returns</h2> | |
A collection of <a href="#solar_project_object">solar project objects</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/solar_projects \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="solar_projects.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#solar_projects">Solar projects ›</a></span> | |
<a data-copyable="" href="#solar_projects.show">Show solar project</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Query parameters</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">fields</dt> | |
<dd class="attr__type"> optional object</dd> | |
<dd class="attr__desc"><p>Learn about filtering response fields <a href="#rest-resources">here</a>.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">fields[solar_projects]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Limit the fields returned for these projects.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">fields[solar_designs]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>These fields will be applied to links to solar design resources from this result.</p></dd> | |
</div> | |
</dl> | |
<h2>Returns</h2> | |
An instance of the <a href="#solar_project_object">solar project object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/solar_projects/$SOLAR_PROJECT \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "solar_projects", | |
"id": "qu6H7elQ", | |
"attributes": { | |
"reference_number": "PYL-0003-7789", | |
"site_location": [ | |
145.0709934, | |
-37.8510383 | |
], | |
"site_address": { | |
"line1": "19 Parmesan Avenue", | |
"line2": "", | |
"city": "Glen Iris", | |
"state": "Victoria", | |
"zip": "3147", | |
"country": "Australia" | |
}, | |
"customer_details": { | |
"name": "Jill Lepore", | |
"phone": "0421 000 111", | |
"email": "[email protected]" | |
}, | |
"acceptance": { | |
"is_accepted": false, | |
"manually_sold": false, | |
"latest_esignature": false | |
}, | |
"is_archived": false, | |
"created_at": "2019-11-04T08:56:04+00:00", | |
"updated_at": "2020-02-18T13:14:00+00:00" | |
}, | |
"relationships": { | |
"owner": { | |
"data": { | |
"type": "users", | |
"id": "Nr1IcNCtBQ" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/users/Nr1IcNCtBQ" | |
} | |
}, | |
"designs": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_designs?filter%5Bproject%5D=qu6H7elQ&fields%5Bsolar_designs%5D=created_at" | |
} | |
}, | |
"primary_design": { | |
"data": null | |
}, | |
"opportunities": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/qu6H7elQ/opportunities" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/solar_projects/qu6H7elQ" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="solar_designs"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#solar_designs">Solar designs</a> | |
</h1> | |
<div class="content"> | |
<p><em>While this API is still in preview, you may wish to use the | |
<a href="/legacy-docs/api/#projects">legacy solar projects API</a>. | |
That API will continue working for the forseeable future.</em></p> | |
<p>Each solar design contains a wealth of information about the layout, connection, | |
configuration and pricing of a solar system. We are planning to expose much of | |
this information via the API, but until we decide on the best way to do this, | |
only basic information is available.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#solar_designs.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/solar_designs</span> | |
</a> | |
</li> | |
<li> | |
<a href="#solar_designs.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/solar_designs/{solar_design}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="solar_design_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#solar_design_object">The solar design object</a></h1> | |
<div class="content"> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">is_primary</dt> | |
<dd class="attr__type"> boolean</dd> | |
<dd class="attr__desc"><p>Is this design its project's <code>primary_design</code>?</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">summary</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p>The <code>summary</code> contains high-level information about this design.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">summary.dc_output_kw</dt> | |
<dd class="attr__type"> number</dd> | |
<dd class="attr__desc"><p>Rated DC output size of the system in kilowatts.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">summary.storage_kwh</dt> | |
<dd class="attr__type"> number</dd> | |
<dd class="attr__desc"><p>Total storage capacity included in this design, in kilowatt-hours.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">summary.description</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>Short human-readable summary of the design properties.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">summary.web_proposal_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>URL of the web proposal associated with this design. This page is accessible without authentication and contains the customer's sensitive information like name and address, so share this URL with care.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">summary.pdf_proposal_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>URL of the proposal as a PDF document for offline viewing or printing. Only share this URL with care.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">summary.latest_snapshot_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>URL of the image showing the latest panel snapshot of this design.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pricing</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p>Contains data about the pricing inputs for this design.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pricing.total</dt> | |
<dd class="attr__type"> number</dd> | |
<dd class="attr__desc"><p>The total cash price (in cents) charged for this design.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pricing.total_includes_tax</dt> | |
<dd class="attr__type"> boolean</dd> | |
<dd class="attr__desc"><p>Does the <code>total</code> include any taxes?</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pricing.currency</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The currency all amounts for this design are expressed in. Amounts are expressed in whole numbers of cents, so an amount of <code>10000</code> would, in dollars, equate to $100.00.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p>Contains formatted values displayed to the customer on their proposal.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.currency</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The currency all amounts on the proposal are expressed in.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.total_tax_formatted</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The total amount of sales tax included in the price.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.total_price_formatted</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The total cash price charged for this solar design.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.deposit_amount_formatted</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The total cash amount required as a deposit.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.financed_amount_formatted</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The amount that will be financed, and is therefore not payable up-front.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.amount_payable_formatted</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The total cash price, less the deposit and any financing.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.locale_au</dt> | |
<dd class="attr__type"> optional object</dd> | |
<dd class="attr__desc"><p>Quote data specific to Australia.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.locale_au.eligible_for_stcs</dt> | |
<dd class="attr__type"> boolean</dd> | |
<dd class="attr__desc"><p>Can this design receive STC incentives?</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.locale_au.stc_quantity</dt> | |
<dd class="attr__type"> optional number</dd> | |
<dd class="attr__desc"><p>The number of STCs that this design is eligible for.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.locale_au.stc_value_formatted</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>The cash value of the STCs this design will generate, given the per-STC price set in the design configuration.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.locale_au.eligible_for_lgcs</dt> | |
<dd class="attr__type"> boolean</dd> | |
<dd class="attr__desc"><p>Can this design receive LGC incentives?</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.locale_au.lgc_quantity</dt> | |
<dd class="attr__type"> optional number</dd> | |
<dd class="attr__desc"><p>The number of LGCs that this design is eligible for.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">proposal_quote.locale_au.lgc_value_formatted</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>The cash value of the LGCs this design will generate, given the per-LGC price set in the design configuration.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">module_types</dt> | |
<dd class="attr__type"> array of objects</dd> | |
<dd class="attr__desc"><p>The different kinds of solar module used in this design. Usually there will only be one type.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">module_types[*].sku</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>A unique identifier of this hardware. See <a href="#solar_modules">solar modules</a> for more info.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">module_types[*].description</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>A human-readable label for this type of panel. <em>Do not</em> attempt to parse meaningful information from this string; if you need more detail, look up the datasheet using the <code>sku</code>.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">module_types[*].quantity</dt> | |
<dd class="attr__type"> integer</dd> | |
<dd class="attr__desc"><p>The number of this type of module used in the design</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">module_types[*].type_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>A permalink to this module type's definition</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">inverter_types</dt> | |
<dd class="attr__type"> array of objects</dd> | |
<dd class="attr__desc"><p>The different kinds of inverter used in this design. Usually there will only be one type.</p></dd> | |
</div> | |
</dl> | |
<h2>Relationships</h2> | |
<dl> | |
<dt>project</dt> | |
<dd> | |
<p>A single <a href="#solar_projects">solar project</a></p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "solar_designs", | |
"id": "fr0jQV7jFw", | |
"attributes": { | |
"is_primary": true, | |
"summary": { | |
"dc_output_kw": 6.49, | |
"storage_kwh": 0, | |
"description": "6.49kW REC", | |
"web_proposal_url": "https://app.getpylon.com/proposals/XsYKuKj5fT", | |
"pdf_proposal_url": "https://app.getpylon.com/proposal/4NCX7KwGwg/fr0jQV7jFw/pdf", | |
"latest_snapshot_url": "https://static.getpylon.com/images/designs/1599550073.jpeg" | |
}, | |
"locale": { | |
"au": { | |
"stc_quantity": 103, | |
"stc_value": 360500 | |
} | |
}, | |
"module_types": [ | |
{ | |
"sku": "779db75d-436a-5631-ba68-5eea5e3d25e2", | |
"description": "REC Solar TwinPeak 2 Series", | |
"quantity": 22, | |
"type_url": "https://api.getpylon.com/v1/solar_modules/779db75d-436a-5631-ba68-5eea5e3d25e2" | |
} | |
], | |
"inverter_types": [ | |
{ | |
"sku": "cb532cd0-a5d4-5b77-a0e3-9a8dd27690f7", | |
"description": "Sungrow Power Sun Access SH5K", | |
"quantity": 1, | |
"type_url": "https://api.getpylon.com/v1/solar_inverters/cb532cd0-a5d4-5b77-a0e3-9a8dd27690f7" | |
} | |
], | |
"storage_types": [ | |
{ | |
"sku": "56f5e7f0-4fb3-5ceb-8e8e-2f1be9dcdb0e", | |
"description": "Sonnen Eco 8.10", | |
"quantity": 1, | |
"type_url": "https://api.getpylon.com/v1/solar_batteries/56f5e7f0-4fb3-5ceb-8e8e-2f1be9dcdb0e" | |
} | |
], | |
"pricing": { | |
"total": 760000, | |
"total_includes_tax": true, | |
"currency": "aud" | |
}, | |
"proposal_quote": { | |
"currency": "aud", | |
"total_tax_formatted": "$0.00", | |
"total_price_formatted": "$7,600.00", | |
"deposit_amount_formatted": "$760.00", | |
"financed_amount_formatted": "$5,000.00", | |
"amount_payable_formatted": "$1,840.00", | |
"estimated_total_repayments_formatted": "$5,801.04", | |
"locale_au": { | |
"eligible_for_stcs": true, | |
"stc_quantity": 103, | |
"stc_value_formatted": "$3,605.00", | |
"eligible_for_lgcs": false | |
} | |
}, | |
"created_at": "2020-02-18T13:14:00+00:00", | |
"updated_at": "2020-02-18T16:09:40+00:00" | |
}, | |
"relationships": { | |
"project": { | |
"data": { | |
"type": "solar_projects", | |
"id": "4NCX7KwGwg" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/4NCX7KwGwg" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/solar_designs/fr0jQV7jFw?fields%5Bsolar_designs%5D=created_at" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="solar_designs.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#solar_designs">Solar designs ›</a></span> | |
<a data-copyable="" href="#solar_designs.index">List solar designs</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<p class="callout">Note that the filter query parameter <code>fields[solar_designs]</code> | |
is <strong>mandatory</strong> when making requests to this resource. This | |
is a slight divergence from the JSON:API spec and from other resources in our API. | |
<a href="#rest-resources-fields">Read more about fields</a></p> | |
<p>Here's an example of a request URL that filters the response body to only | |
include the <code>summary</code> and <code>created_at</code> fields:</p> | |
<pre class="language-bash"><code>https://api.getpylon.com/v1/solar_designs?fields[solar_designs]=summary,created_at</code></pre> | |
<p>The fields you are allowed to include are the <strong>attributes</strong> | |
and <strong>relationships</strong> of the | |
<a href="#solar_design_object">solar design object</a>. We require this in order to better | |
track usage of different design properties without having to split the | |
design into sub-resources.</p> | |
<h2>Query parameters</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">filter</dt> | |
<dd class="attr__type"> optional object</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[project]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>List designs belonging to the project with the given id</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[opportunity]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>List designs whose project belongs to the opportunity with the given id</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[created_at.gte]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>List designs created on or after the given timestamp.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[created_at.lt]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>List designs created before the given timestamp.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[updated_at.gte]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>List designs modified on or after the given timestamp.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[dc_output_kw.gte]</dt> | |
<dd class="attr__type"> optional number</dd> | |
<dd class="attr__desc"><p>List designs with a size at least this value.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[dc_output_kw.lt]</dt> | |
<dd class="attr__type"> optional number</dd> | |
<dd class="attr__desc"><p>List designs with size less than this value.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">fields</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p>Learn about filtering response fields <a href="#rest-resources">here</a>.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">fields[solar_designs]</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>Comma-separated list of fields to include. E.g. <code>created_at,summary</code></p></dd> | |
</div> | |
</dl> | |
<h2>Returns</h2> | |
A collection of <a href="#solar_design_object">solar design objects</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/solar_designs \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="solar_designs.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#solar_designs">Solar designs ›</a></span> | |
<a data-copyable="" href="#solar_designs.show">Show solar design</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<p class="callout">Note that the filter query parameter <code>fields[solar_designs]</code> | |
is <strong>mandatory</strong> when making requests to this resource. This | |
is a slight divergence from the JSON:API spec and from other resources in our API. | |
<a href="#rest-resources-fields">Read more about fields</a></p> | |
<p>Here's an example of a request URL that filters the response body to only | |
include the <code>summary</code> and <code>created_at</code> fields:</p> | |
<pre class="language-bash"><code>https://api.getpylon.com/v1/solar_designs?fields[solar_designs]=summary,created_at</code></pre> | |
<p>The fields you are allowed to include are the <strong>attributes</strong> | |
and <strong>relationships</strong> of the | |
<a href="#solar_design_object">solar design object</a>. We require this in order to better | |
track usage of different design properties without having to split the | |
design into sub-resources.</p> | |
<h2>Query parameters</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">fields</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p>Learn about filtering response fields <a href="#rest-resources">here</a>.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">fields[solar_designs]</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>Comma-separated list of fields to include. E.g. <code>created_at,summary</code></p></dd> | |
</div> | |
</dl> | |
<h2>Returns</h2> | |
An instance of the <a href="#solar_design_object">solar design object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/solar_designs/$SOLAR_DESIGN \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "solar_designs", | |
"id": "dAtSGXAsNg", | |
"attributes": { | |
"is_primary": true, | |
"summary": { | |
"dc_output_kw": 6.49, | |
"storage_kwh": 0, | |
"description": "6.49kW REC", | |
"web_proposal_url": "https://app.getpylon.com/proposals/4uqnML0ple", | |
"pdf_proposal_url": "https://app.getpylon.com/proposal/iqsfWkg83Q/dAtSGXAsNg/pdf", | |
"latest_snapshot_url": "https://static.getpylon.com/images/designs/1599550073.jpeg" | |
}, | |
"locale": { | |
"au": { | |
"stc_quantity": 103, | |
"stc_value": 360500 | |
} | |
}, | |
"module_types": [ | |
{ | |
"sku": "779db75d-436a-5631-ba68-5eea5e3d25e2", | |
"description": "REC Solar TwinPeak 2 Series", | |
"quantity": 22, | |
"type_url": "https://api.getpylon.com/v1/solar_modules/779db75d-436a-5631-ba68-5eea5e3d25e2" | |
} | |
], | |
"inverter_types": [ | |
{ | |
"sku": "cb532cd0-a5d4-5b77-a0e3-9a8dd27690f7", | |
"description": "Sungrow Power Sun Access SH5K", | |
"quantity": 1, | |
"type_url": "https://api.getpylon.com/v1/solar_inverters/cb532cd0-a5d4-5b77-a0e3-9a8dd27690f7" | |
} | |
], | |
"storage_types": [ | |
{ | |
"sku": "56f5e7f0-4fb3-5ceb-8e8e-2f1be9dcdb0e", | |
"description": "Sonnen Eco 8.10", | |
"quantity": 1, | |
"type_url": "https://api.getpylon.com/v1/solar_batteries/56f5e7f0-4fb3-5ceb-8e8e-2f1be9dcdb0e" | |
} | |
], | |
"pricing": { | |
"total": 760000, | |
"total_includes_tax": true, | |
"currency": "aud" | |
}, | |
"proposal_quote": { | |
"currency": "aud", | |
"total_tax_formatted": "$0.00", | |
"total_price_formatted": "$7,600.00", | |
"deposit_amount_formatted": "$760.00", | |
"financed_amount_formatted": "$5,000.00", | |
"amount_payable_formatted": "$1,840.00", | |
"estimated_total_repayments_formatted": "$5,801.04", | |
"locale_au": { | |
"eligible_for_stcs": true, | |
"stc_quantity": 103, | |
"stc_value_formatted": "$3,605.00", | |
"eligible_for_lgcs": false | |
} | |
}, | |
"created_at": "2020-02-18T13:14:00+00:00", | |
"updated_at": "2020-02-18T16:09:40+00:00" | |
}, | |
"relationships": { | |
"project": { | |
"data": { | |
"type": "solar_projects", | |
"id": "iqsfWkg83Q" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/iqsfWkg83Q" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/solar_designs/dAtSGXAsNg?fields%5Bsolar_designs%5D=created_at" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="solar_modules"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#solar_modules">Solar modules</a> | |
</h1> | |
<div class="content"> | |
<p>This collection contains information about every solar module available in | |
Observer. This data is sourced from the manufacuturer datasheets themselves, | |
which we link to as part of the API response.</p> | |
<p>When building with Observer, feel free to use these datasheets to enhance | |
your integration. We will expose more information as part of each datasheet | |
in the future; subscribe to our developers mailing list to be kept up-to-date.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#solar_modules.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/solar_modules/{solar_module}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="solar_module_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#solar_module_object">The solar module object</a></h1> | |
<div class="content"> | |
<p>The <code>id</code> of a solar module datasheet is refered to as its SKU | |
(stock keeping unit). These SKUs have been generated using a <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier#Versions_3_and_5_(namespace_name-based)" target="_blank">UUID v5</a> | |
computed from the module's <code>identity</code> properties. You are encouraged | |
to use these SKUs to uniquely identify solar modules in your own systems if you like.</p> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">identity</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">identity.brand</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>Company/brand that produces this module.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">identity.series</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The line of module.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">identity.model_number</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The most specific product code this product has been assigned.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">identity.sku_identifier</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>This helps create a unique SKU in cases where other properties are not unique enough.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">files</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">files.datasheet_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The URL of the manufacturer's datasheet for this component.</p></dd> | |
</div> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "solar_modules", | |
"id": "c59f1f6f-67cb-5c39-ba91-ec66a9f3451e", | |
"attributes": { | |
"name": "Tindo Solar Karra 72 Cell Series 380W", | |
"identity": { | |
"brand": "Tindo Solar", | |
"series": "Karra 72 Cell Series", | |
"model_number": "Karra-380", | |
"sku_identifier": "" | |
}, | |
"files": { | |
"datasheet_url": "https://static.getpylon.com/datasheets/panels/TindoSolar_Karra-Datasheets.pdf" | |
} | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/solar_modules/c59f1f6f-67cb-5c39-ba91-ec66a9f3451e" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="solar_modules.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#solar_modules">Solar modules ›</a></span> | |
<a data-copyable="" href="#solar_modules.show">Show solar module</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
An instance of the <a href="#solar_module_object">solar module object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/solar_modules/$SOLAR_MODULE \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "solar_modules", | |
"id": "c59f1f6f-67cb-5c39-ba91-ec66a9f3451e", | |
"attributes": { | |
"name": "Tindo Solar Karra 72 Cell Series 380W", | |
"identity": { | |
"brand": "Tindo Solar", | |
"series": "Karra 72 Cell Series", | |
"model_number": "Karra-380", | |
"sku_identifier": "" | |
}, | |
"files": { | |
"datasheet_url": "https://static.getpylon.com/datasheets/panels/TindoSolar_Karra-Datasheets.pdf" | |
} | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/solar_modules/c59f1f6f-67cb-5c39-ba91-ec66a9f3451e" | |
} | |
}, | |
"@type": "https://schema.pylon.solar/ld/PVModuleDatasheet", | |
"@id": "https://api.getpylon.com/v1/solar_modules/c59f1f6f-67cb-5c39-ba91-ec66a9f3451e", | |
"@context": { | |
"data": "@nest", | |
"attributes": "@nest", | |
"electrical": "@nest", | |
"stc_pmax_w": "https://schema.pylon.solar/ld/pvModulePowerAtSTC", | |
"files": "@nest", | |
"datasheet_url": "https://schema.pylon.solar/ld/productDatasheetURL" | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="solar_inverters"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#solar_inverters">Solar inverters</a> | |
</h1> | |
<div class="content"> | |
<p>This collection contains information about every solar inverter available in | |
Observer. This data is sourced from the manufacuturer datasheets themselves, | |
which we link to as part of the API response.</p> | |
<p>When building with Observer, feel free to use these datasheets to enhance | |
your integration. We will expose more information as part of each datasheet | |
in the future; subscribe to our developers mailing list to be kept up-to-date.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#solar_inverters.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/solar_inverters/{solar_inverter}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="solar_inverter_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#solar_inverter_object">The solar inverter object</a></h1> | |
<div class="content"> | |
<p>The <code>id</code> of a solar module datasheet is refered to as its SKU | |
(stock keeping unit). These SKUs have been generated using a <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier#Versions_3_and_5_(namespace_name-based)" target="_blank">UUID v5</a> | |
computed from the module's <code>brand</code>, <code>series</code>, and | |
<code>model_number</code>. You are encouraged to use these SKUs to uniquely | |
identify inverters in your own systems if you like.</p> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">identity</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">identity.brand</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>Company/brand that produces this module.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">identity.series</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The line of inverter.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">identity.model_number</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The most specific product code this product has been assigned.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">identity.sku_identifier</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>This helps create a unique SKU in cases where other properties are not unique enough.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">files</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">files.datasheet_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The URL of the manufacturer's datasheet for this component.</p></dd> | |
</div> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "solar_inverters", | |
"id": "cb532cd0-a5d4-5b77-a0e3-9a8dd27690f7", | |
"attributes": { | |
"name": "Sungrow Power SH5K 4990W", | |
"identity": { | |
"brand": "Sungrow Power", | |
"series": "Sun Access", | |
"model_number": "SH5K", | |
"sku_identifier": null | |
}, | |
"files": { | |
"datasheet_url": "https://static.getpylon.com/datasheets/inverters/SungrowPower_SH5K.pdf" | |
} | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/solar_inverters/cb532cd0-a5d4-5b77-a0e3-9a8dd27690f7" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="solar_inverters.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#solar_inverters">Solar inverters ›</a></span> | |
<a data-copyable="" href="#solar_inverters.show">Show solar inverter</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
An instance of the <a href="#solar_inverter_object">solar inverter object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/solar_inverters/$SOLAR_INVERTER \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "solar_inverters", | |
"id": "cb532cd0-a5d4-5b77-a0e3-9a8dd27690f7", | |
"attributes": { | |
"name": "Sungrow Power SH5K 4990W", | |
"identity": { | |
"brand": "Sungrow Power", | |
"series": "Sun Access", | |
"model_number": "SH5K", | |
"sku_identifier": null | |
}, | |
"files": { | |
"datasheet_url": "https://static.getpylon.com/datasheets/inverters/SungrowPower_SH5K.pdf" | |
} | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/solar_inverters/cb532cd0-a5d4-5b77-a0e3-9a8dd27690f7" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="solar_batteries"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#solar_batteries">Solar batteries</a> | |
</h1> | |
<div class="content"> | |
<p>This collection contains information about every solar battery available in | |
Observer. This data is sourced from the manufacuturer datasheets themselves, | |
which we link to as part of the API response.</p> | |
<p>When building with Observer, feel free to use these datasheets to enhance | |
your integration. We will expose more information as part of each datasheet | |
in the future; subscribe to our developers mailing list to be kept up-to-date.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#solar_batteries.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/solar_batteries/{solar_battery}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="solar_battery_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#solar_battery_object">The solar battery object</a></h1> | |
<div class="content"> | |
<p>The <code>id</code> of a solar battery is refered to as its SKU | |
(stock keeping unit). These SKUs have been generated using a <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier#Versions_3_and_5_(namespace_name-based)" target="_blank">UUID v5</a> | |
computed from the module's <code>brand</code>, <code>manufacturer</code>, and | |
<code>model_number</code>. You are encouraged to use these SKUs to uniquely | |
identify inverters in your own systems if you like.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"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": "" | |
} | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/solar_batteries/56f5e7f0-4fb3-5ceb-8e8e-2f1be9dcdb0e" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="solar_batteries.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#solar_batteries">Solar batteries ›</a></span> | |
<a data-copyable="" href="#solar_batteries.show">Show solar battery</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
An instance of the <a href="#solar_battery_object">solar battery object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/solar_batteries/$SOLAR_BATTERY \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-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": "" | |
} | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/solar_batteries/56f5e7f0-4fb3-5ceb-8e8e-2f1be9dcdb0e" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="australian_stcs"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#australian_stcs">Australian STCs</a> | |
</h1> | |
<div class="content"> | |
<p>The Clean Energy Regulator website contains <a href="http://www.cleanenergyregulator.gov.au/RET/Scheme-participants-and-industry/Agents-and-installers/Small-scale-technology-certificates"> | |
more information about STCs</a>. This API allows you to calculate the amount | |
of STCs that a given solar system will generate.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#au_stc_amount.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/au/stc_amount</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="au_stc_amount.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#australian_stcs">Australian STCs ›</a></span> | |
<a data-copyable="" href="#au_stc_amount.index">Calculate STC quantity</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<em>No permissions required</em> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Query parameters</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">sgu_kind</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"solar_deemed"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">output_kw</dt> | |
<dd class="attr__type"> number</dd> | |
<dd class="attr__desc"><p>The rated DC output of the installed system, in kW.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">site_postcode</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">installation_year</dt> | |
<dd class="attr__type"> integer</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">deeming_period</dt> | |
<dd class="attr__type"> optional integer</dd> | |
<dd class="attr__desc"><p>Defaults to the number of years remaining in the STC scheme.</p></dd> | |
</div> | |
</dl> | |
<h2>Returns</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">data</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">data.stcs</dt> | |
<dd class="attr__type"> integer</dd> | |
<dd class="attr__desc"><p>The number of STCs this system will create.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">data.zone</dt> | |
<dd class="attr__type"> integer</dd> | |
<dd class="attr__desc"><p>The rating zone the given postcode is associated with.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">data.zone_rating</dt> | |
<dd class="attr__type"> integer</dd> | |
<dd class="attr__desc"><p>The rating value for the given zone.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">data.deeming_period</dt> | |
<dd class="attr__type"> integer</dd> | |
<dd class="attr__desc"><p>The actual number of years used for deeming calculations.</p></dd> | |
</div> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/au/stc_amount \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"stcs": 77, | |
"zone": 3, | |
"zone_rating": 1.382, | |
"deeming_period": 10 | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="users"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#users">Users</a> | |
</h1> | |
<div class="content"> | |
<p>Each of your employees should each have a unique account they can log in | |
to Pylon with. Sharing accounts means you will have less accurate control over | |
your employees' access to the software, and less accurate metrics on their usage. | |
Each of these accounts is a User.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#users.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/users</span> | |
</a> | |
</li> | |
<li> | |
<a href="#users.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/users/{user}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="user_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#user_object">The user object</a></h1> | |
<div class="content"> | |
<p></p> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">full_name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">email</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">gravatar_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>URL of the <a href="https://en.gravatar.com/" rel="nofollow" target="_blank">Gravatar</a> associated with this user's email address.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">photo_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>URL of the user's uploaded profile image.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">updated_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "users", | |
"id": "Q4tOVccCQ", | |
"attributes": { | |
"full_name": "Example User", | |
"email": "[email protected]", | |
"job_title": null, | |
"gravatar_url": "https://www.gravatar.com/avatar/eab5a44fcb64a71900d00cd085b15b22?s=300&d=mp&r=PG", | |
"photo_url": null, | |
"created_at": "2020-01-14T19:00:01+00:00", | |
"updated_at": "2020-04-22T01:15:18+00:00" | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/users/Q4tOVccCQ" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="users.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#users">Users ›</a></span> | |
<a data-copyable="" href="#users.index">List users</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<p>This resource lists all users in the team your API token belongs to. | |
This is useful for combining with other resources in this API to get details | |
about users which are referenced by their ID. You can then choose to display | |
details such as their name, email, and profile picture.</p> | |
<h2>Returns</h2> | |
A collection of <a href="#user_object">user objects</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/users \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="users.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#users">Users ›</a></span> | |
<a data-copyable="" href="#users.show">Show user</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
An instance of the <a href="#user_object">user object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/users/$USER \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "users", | |
"id": "JZE4MUVgaw", | |
"attributes": { | |
"full_name": "Example User", | |
"email": "[email protected]", | |
"job_title": null, | |
"gravatar_url": "https://www.gravatar.com/avatar/eab5a44fcb64a71900d00cd085b15b22?s=300&d=mp&r=PG", | |
"photo_url": null, | |
"created_at": "2020-01-14T19:00:01+00:00", | |
"updated_at": "2020-04-22T01:15:18+00:00" | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/users/JZE4MUVgaw" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="files"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#files">Files</a> | |
</h1> | |
<div class="content"> | |
This is an object describing a file hosted on Pylon's servers. | |
This API allows you to upload files to Pylon for the purpose of using them with other APIs. | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#files.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/files</span> | |
</a> | |
</li> | |
<li> | |
<a href="#files.store"> | |
<span class="http-method" data-http-method="POST">POST</span> | |
<span class="route">/v1/files</span> | |
</a> | |
</li> | |
<li> | |
<a href="#files.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/files/{file}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="file_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#file_object">The file object</a></h1> | |
<div class="content"> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The original filename of this file as provided by the uploader.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">purpose</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The purpose this file was uploaded for (may be left blank).</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>When this file was uploaded (<em>not</em> when the original file itself was created).</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">expires_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>When the file will expire, if not used by linking it to another entity.</p></dd> | |
</div> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "files", | |
"id": "nD2kRrvg", | |
"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/nD2kRrvg" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="files.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#files">Files ›</a></span> | |
<a data-copyable="" href="#files.index">List files</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
A collection of <a href="#file_object">file objects</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/files \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="files.store"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#files">Files ›</a></span> | |
<a data-copyable="" href="#files.store">Create file</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
<code>write</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<p>Upload a new file to be used by another API operation. Note that you | |
<strong>may</strong> also provide a <code>purpose</code> form parameter, | |
which is omitted from the example to the right.</p> | |
<p>File creation is done using form-data to submit file content, | |
instead of a JSON-API request body. However, as the server will return a | |
JSON-API object representing the file, you must use the corresponding | |
<code>Accept</code> header.</p> | |
<h2>Returns</h2> | |
An instance of the <a href="#file_object">file object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/files \ | |
--request POST \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json" \ | |
--header "Content-Type: multipart/form-data" \ | |
--form "file=@/path/to/file"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "files", | |
"id": "T7FbOHbKRQ", | |
"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/T7FbOHbKRQ" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="files.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#files">Files ›</a></span> | |
<a data-copyable="" href="#files.show">Show file</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
An instance of the <a href="#file_object">file object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/files/$FILE \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "files", | |
"id": "9DqyCmmNEw", | |
"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/9DqyCmmNEw" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="events"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#events">Events</a> | |
<span class="tag-preview">Preview</span> | |
</h1> | |
<div class="content"> | |
<strong>This API is in preview and breaking changes may be made without warning.</strong> | |
<p>Events are created automatically by Pylon when certain actions happen in your account. For | |
example, when one of your customers signs a proposal, a <code>web_proposals.signed</code> event | |
will be created.</p> | |
<p>The most important feature of events is that when an event is created, it will be automatically | |
delivered to each webhook destination you have configured in your | |
<a href="/settings/api">API settings</a>.</p> | |
<p>Note that events are only accessible for 30 days after they are created.</p> | |
Related guide: <a class="link-to-guide" href="https://getpylon.com/developers/guides/using-webhooks" target="_blank">using webhooks</a> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#events.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/events</span> | |
</a> | |
</li> | |
<li> | |
<a href="#events.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/events/{event}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="event_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#event_object">The event object</a></h1> | |
<div class="content"> | |
There are many kinds of events. This section describes properties common to | |
all events accessed via the API. See <a href="#event-types">Event types</a> | |
for details about the properties belonging to each type of event. | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>Name of the event. For a full list of names, see <a href="#event-types">Event types</a>.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>When did this event occur?</p></dd> | |
</div> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "events", | |
"id": "FrROqVIc7ggtIjUJ", | |
"attributes": { | |
"name": "events.test_sent", | |
"created_at": "2023-06-05T22:25:02+00:00" | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/events/FrROqVIc7ggtIjUJ" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="events.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#events">Events ›</a></span> | |
<a data-copyable="" href="#events.index">List events</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<p>Note that events are only accessible for 30 days after they are created.</p> | |
<h2>Returns</h2> | |
A collection of <a href="#event_object">event objects</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/events \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="events.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#events">Events ›</a></span> | |
<a data-copyable="" href="#events.show">Show event</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<p>Note that events are only accessible for 30 days after they are created.</p> | |
<h2>Returns</h2> | |
An instance of the <a href="#event_object">event object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/events/$EVENT \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "events", | |
"id": "SD3htdY7kFNgquQE", | |
"attributes": { | |
"name": "events.test_sent", | |
"created_at": "2023-06-05T22:25:02+00:00" | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/events/SD3htdY7kFNgquQE" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="event-types"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#event-types">Event types</a> | |
</h1> | |
<div class="content" id="event-solar_projects.created"> | |
<h3> | |
<a data-copyable="" href="#event-solar_projects.created">Solar project created</a> | |
</h3> | |
<p> | |
This event is dispatched when a solar project is created. | |
Note that when this event is received, there will be very little data available, maybe only the site address and reference number. | |
You can use this event to link the new project to your external system, but you will need to use the <a href="#solar_projects">projects API</a> or wait for future webhook events to receive actual data. | |
</p> | |
<h3>Attributes</h3> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"solar_projects.created"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">description</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_reference_number</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The reference number for this customer.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_in_app_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: uri</dd> <dd class="attr__desc"><p>A link to the project in the Pylon app. This can be used to direct your team members to the project.</p></dd> | |
</div> | |
</dl> | |
<h3>Relationships</h3> | |
<dl> | |
<dt>solar_project</dt> | |
<dd> | |
<p>The new <a href="#solar_projects">solar project</a> that was created</p> | |
</dd> | |
<dt>created_by</dt> | |
<dd> | |
<p>The <a href="#users">user</a> who created this project</p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request body | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "events", | |
"id": "kVBmgZczw00rfPSh", | |
"attributes": { | |
"name": "solar_projects.created", | |
"created_at": "2023-06-05T22:25:02+00:00", | |
"description": "Project created by Example User at 19 Parmesan Avenue, Glen Iris", | |
"project_reference_number": "PYL-0003-7789", | |
"project_in_app_url": "https://app.getpylon.com/library/BKt80Xvx8Q" | |
}, | |
"relationships": { | |
"solar_project": { | |
"data": { | |
"type": "solar_projects", | |
"id": "BKt80Xvx8Q" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/BKt80Xvx8Q" | |
} | |
}, | |
"created_by": { | |
"data": { | |
"type": "users", | |
"id": "HHkcauDsXA" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/users/HHkcauDsXA" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/events/kVBmgZczw00rfPSh" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
<div class="content" style="padding: 3rem;"> | |
<!-- -------------------------------- --> | |
</div> | |
<aside class="illustration" style="padding: 3rem;"> | |
</aside> | |
<div class="content" id="event-solar_projects.updated"> | |
<h3> | |
<a data-copyable="" href="#event-solar_projects.updated">Solar project updated</a> | |
</h3> | |
<p> | |
This event is dispatched when a solar project is edited. | |
This includes changes to the customer details, address, etc., but not the solar designs belonging to the project. | |
</p> | |
<p> | |
<strong>If you need to track changes to the designs themselves, use the <a href="#event-solar_designs.updated">solar design updated</a> event.</strong> | |
</p> | |
<p class="callout"> | |
Note that this event may be high volume, so ensure your destination server can handle the load. | |
</p> | |
<h3>Attributes</h3> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"solar_projects.updated"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">description</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_reference_number</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The reference number for this customer.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_in_app_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: uri</dd> <dd class="attr__desc"><p>A link to the project in the Pylon app. This can be used to direct your team members to the project.</p></dd> | |
</div> | |
</dl> | |
<h3>Relationships</h3> | |
<dl> | |
<dt>solar_project</dt> | |
<dd> | |
<p>The <a href="#solar_projects">solar project</a> that was updated</p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request body | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "events", | |
"id": "KccB7uSoqtmA92Z", | |
"attributes": { | |
"name": "solar_projects.updated", | |
"created_at": "2023-06-05T22:25:02+00:00", | |
"description": "Project at 19 Parmesan Avenue, Glen Iris was updated", | |
"project_reference_number": "PYL-0003-7789", | |
"project_in_app_url": "https://app.getpylon.com/library/4fsOpUsUfg" | |
}, | |
"relationships": { | |
"solar_project": { | |
"data": { | |
"type": "solar_projects", | |
"id": "4fsOpUsUfg" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/4fsOpUsUfg" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/events/KccB7uSoqtmA92Z" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
<div class="content" style="padding: 3rem;"> | |
<!-- -------------------------------- --> | |
</div> | |
<aside class="illustration" style="padding: 3rem;"> | |
</aside> | |
<div class="content" id="event-solar_projects.deleted"> | |
<h3> | |
<a data-copyable="" href="#event-solar_projects.deleted">Solar project deleted</a> | |
</h3> | |
<p> | |
This event is dispatched when a solar project is deleted. | |
Project deletion is a rare event that usually happens only in cases of refunds, or when a mistake has been made in the project's location. | |
You should make sure you're listening for <code>solar_projects.updated</code> to notice when projects are archived. | |
</p> | |
<h3>Attributes</h3> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"solar_projects.deleted"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>When this event was created (i.e. when the project was deleted).</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">description</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_reference_number</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The reference number for this customer.</p></dd> | |
</div> | |
</dl> | |
<h3>Relationships</h3> | |
<dl> | |
<dt>solar_project</dt> | |
<dd> | |
<p>The <a href="#solar_projects">solar project</a> that was deleted</p> | |
</dd> | |
<dt>deleted_by</dt> | |
<dd> | |
<p>The <a href="#users">user</a> who deleted the project</p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request body | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "events", | |
"id": "7Zgo9v1FugwnR5y", | |
"attributes": { | |
"name": "solar_projects.deleted", | |
"created_at": "2023-06-05T22:25:02+00:00", | |
"description": "Project at 19 Parmesan Avenue, Glen Iris was deleted by Example User", | |
"project_reference_number": "PYL-0003-7789" | |
}, | |
"relationships": { | |
"solar_project": { | |
"data": { | |
"type": "solar_projects", | |
"id": "i7xGRQTDWQ" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/i7xGRQTDWQ" | |
} | |
}, | |
"deleted_by": { | |
"data": { | |
"type": "users", | |
"id": "6frS4jPSCA" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/users/6frS4jPSCA" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/events/7Zgo9v1FugwnR5y" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
<div class="content" style="padding: 3rem;"> | |
<!-- -------------------------------- --> | |
</div> | |
<aside class="illustration" style="padding: 3rem;"> | |
</aside> | |
<div class="content" id="event-solar_designs.created"> | |
<h3> | |
<a data-copyable="" href="#event-solar_designs.created">Solar design created</a> | |
</h3> | |
<p> | |
This event is dispatched when a solar design is created. | |
Note that when this event is received, there will be very little data available. | |
You can use this event to link the new design to your external system, but you will need to use the <a href="#solar_designs">designs API</a> or wait for future webhook events to receive actual data. | |
</p> | |
<h3>Attributes</h3> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"solar_designs.created"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">description</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_reference_number</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The reference number for this customer.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_in_app_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: uri</dd> <dd class="attr__desc"><p>A link to the project in the Pylon app. This can be used to direct your team members to the project.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">design_in_app_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: uri</dd> <dd class="attr__desc"><p>A link to the specific design in the Pylon app. This can be used to direct your team members to the design.</p></dd> | |
</div> | |
</dl> | |
<h3>Relationships</h3> | |
<dl> | |
<dt>solar_design</dt> | |
<dd> | |
<p>The new <a href="#solar_designs">solar design</a> that was created</p> | |
</dd> | |
<dt>solar_project</dt> | |
<dd> | |
<p>The <a href="#solar_projects">solar project</a> that the design belongs to</p> | |
</dd> | |
<dt>created_by</dt> | |
<dd> | |
<p>The <a href="#users">user</a> who created this design</p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request body | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "events", | |
"id": "pEduoj9ptHcPcII", | |
"attributes": { | |
"name": "solar_designs.created", | |
"created_at": "2023-06-05T22:25:02+00:00", | |
"description": "Design created by Example User for project at 19 Parmesan Avenue, Glen Iris", | |
"project_reference_number": "PYL-0003-7789", | |
"project_in_app_url": "https://app.getpylon.com/library/YGw829csgQ", | |
"design_in_app_url": "https://app.getpylon.com/library/YGw829csgQ/view/xQxpt8RQnA" | |
}, | |
"relationships": { | |
"solar_design": { | |
"data": { | |
"type": "solar_designs", | |
"id": "xQxpt8RQnA" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_designs/xQxpt8RQnA?fields%5Bsolar_designs%5D=created_at" | |
} | |
}, | |
"solar_project": { | |
"data": { | |
"type": "solar_projects", | |
"id": "YGw829csgQ" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/YGw829csgQ" | |
} | |
}, | |
"created_by": { | |
"data": { | |
"type": "users", | |
"id": "gYQG1mQ" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/users/gYQG1mQ" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/events/pEduoj9ptHcPcII" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
<div class="content" style="padding: 3rem;"> | |
<!-- -------------------------------- --> | |
</div> | |
<aside class="illustration" style="padding: 3rem;"> | |
</aside> | |
<div class="content" id="event-solar_designs.updated"> | |
<h3> | |
<a data-copyable="" href="#event-solar_designs.updated">Solar design updated</a> | |
</h3> | |
<p> | |
This event is dispatched when a solar design is edited. | |
This includes changes to the solar panels, snapshot image, production reports and proposal. | |
</p> | |
<p class="callout"> | |
Note that this event may be high volume, so ensure your destination server can handle the load. | |
</p> | |
<h3>Attributes</h3> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"solar_designs.updated"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">description</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_reference_number</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The reference number for this customer.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_in_app_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: uri</dd> <dd class="attr__desc"><p>A link to the project in the Pylon app. This can be used to direct your team members to the project.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">design_in_app_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: uri</dd> <dd class="attr__desc"><p>A link to the specific design in the Pylon app. This can be used to direct your team members to the design.</p></dd> | |
</div> | |
</dl> | |
<h3>Relationships</h3> | |
<dl> | |
<dt>solar_design</dt> | |
<dd> | |
<p>The new <a href="#solar_designs">solar design</a> that was updated</p> | |
</dd> | |
<dt>solar_project</dt> | |
<dd> | |
<p>The <a href="#solar_projects">solar project</a> that the updated design belongs to</p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request body | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "events", | |
"id": "I1V5EbSRNslFr1p", | |
"attributes": { | |
"name": "solar_designs.updated", | |
"created_at": "2023-06-05T22:25:03+00:00", | |
"description": "Design updated by Example User for project at 19 Parmesan Avenue, Glen Iris", | |
"project_reference_number": "PYL-0003-7789", | |
"project_in_app_url": "https://app.getpylon.com/library/wi5fQ95xOw", | |
"design_in_app_url": "https://app.getpylon.com/library/wi5fQ95xOw/view/64qjFhyFmA" | |
}, | |
"relationships": { | |
"solar_design": { | |
"data": { | |
"type": "solar_designs", | |
"id": "64qjFhyFmA" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_designs/64qjFhyFmA?fields%5Bsolar_designs%5D=created_at" | |
} | |
}, | |
"solar_project": { | |
"data": { | |
"type": "solar_projects", | |
"id": "wi5fQ95xOw" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/wi5fQ95xOw" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/events/I1V5EbSRNslFr1p" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
<div class="content" style="padding: 3rem;"> | |
<!-- -------------------------------- --> | |
</div> | |
<aside class="illustration" style="padding: 3rem;"> | |
</aside> | |
<div class="content" id="event-solar_designs.deleted"> | |
<h3> | |
<a data-copyable="" href="#event-solar_designs.deleted">Solar design deleted</a> | |
</h3> | |
<p> | |
This event is dispatched when a solar design is deleted. | |
Note that the project this design belongs to may still exist and contain other designs. | |
</p> | |
<h3>Attributes</h3> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"solar_projects.deleted"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>When this event was created (i.e. when the design was deleted).</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">description</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_reference_number</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The reference number for this customer.</p></dd> | |
</div> | |
</dl> | |
<h3>Relationships</h3> | |
<dl> | |
<dt>solar_design</dt> | |
<dd> | |
<p>The <a href="#solar_designs">solar design</a> that was deleted</p> | |
</dd> | |
<dt>solar_project</dt> | |
<dd> | |
<p>The <a href="#solar_projects">solar project</a> the design belongs to</p> | |
</dd> | |
<dt>deleted_by</dt> | |
<dd> | |
<p>The <a href="#users">user</a> who deleted the design</p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request body | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "events", | |
"id": "9KtPYSLXo9g22r", | |
"attributes": { | |
"name": "solar_designs.deleted", | |
"created_at": "2023-06-05T22:25:03+00:00", | |
"description": "A design for project at 19 Parmesan Avenue, Glen Iris was deleted by Example User", | |
"project_reference_number": "PYL-0003-7789" | |
}, | |
"relationships": { | |
"solar_design": { | |
"data": { | |
"type": "solar_designs", | |
"id": "mgTVy4NRUA" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_designs/mgTVy4NRUA?fields%5Bsolar_designs%5D=created_at" | |
} | |
}, | |
"solar_project": { | |
"data": { | |
"type": "solar_projects", | |
"id": "ZCzKnmGaFA" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/ZCzKnmGaFA" | |
} | |
}, | |
"deleted_by": { | |
"data": { | |
"type": "users", | |
"id": "6B4uP3Ydhg" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/users/6B4uP3Ydhg" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/events/9KtPYSLXo9g22r" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
<div class="content" style="padding: 3rem;"> | |
<!-- -------------------------------- --> | |
</div> | |
<aside class="illustration" style="padding: 3rem;"> | |
</aside> | |
<div class="content" id="event-web_proposals.signed"> | |
<h3> | |
<a data-copyable="" href="#event-web_proposals.signed">Web proposal signed</a> | |
</h3> | |
<p> | |
This event is dispatched when a customer has completed an e-signature proposal. | |
The event is created at the same time the PDF copy of the proposal (complete with signature) is sent to you and to the customer. | |
</p> | |
<h3>Attributes</h3> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"web_proposals.signed"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">description</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">customer_name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The name the customer entered when they signed their proposal.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">customer_email</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The email the customer confirmed before signing. Their PDF copy of the signed proposal was sent to this email address.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">project_in_app_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: uri</dd> <dd class="attr__desc"><p>A link to the project that was signed in the Pylon app. This can be used to direct your team members to the project.</p></dd> | |
</div> | |
</dl> | |
<h3>Relationships</h3> | |
<dl> | |
<dt>solar_design</dt> | |
<dd> | |
<p>The <a href="#solar_designs">solar design</a> the customer signed the proposal for</p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>solar_project</dt> | |
<dd> | |
<p>The <a href="#solar_projects">solar project</a> the design belongs to</p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request body | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "events", | |
"id": "RLCCxPTv7LwBOrr", | |
"attributes": { | |
"name": "web_proposals.signed", | |
"created_at": "2023-06-05T22:25:03+00:00", | |
"description": "Andre Rieu signed proposal for 19 Parmesan Avenue", | |
"customer_name": "Andre Rieu", | |
"customer_email": "[email protected]", | |
"project_in_app_url": "https://app.getpylon.com/library/ABYMwCGNNg/view/FZXtzWCH3g" | |
}, | |
"relationships": { | |
"solar_design": { | |
"data": { | |
"type": "solar_designs", | |
"id": "FZXtzWCH3g" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_designs/FZXtzWCH3g" | |
} | |
}, | |
"solar_project": { | |
"data": { | |
"type": "solar_projects", | |
"id": "ABYMwCGNNg" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects/ABYMwCGNNg" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/events/RLCCxPTv7LwBOrr" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
<div class="content" style="padding: 3rem;"> | |
<!-- -------------------------------- --> | |
</div> | |
<aside class="illustration" style="padding: 3rem;"> | |
</aside> | |
<div class="content" id="event-gateway_payments.created"> | |
<h3> | |
<a data-copyable="" href="#event-gateway_payments.created">Gateway payment received</a> | |
</h3> | |
<p> | |
This event is dispatched when a customer sends a payment for one of your proposals through our Payment Gateway. | |
Note that the funds will only be transferred to your bank account once a payout happens. | |
</p> | |
<h3>Attributes</h3> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"gateway_payments.created"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">created_at</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
</dl> | |
<h3>Relationships</h3> | |
<dl> | |
<dt>solar_design</dt> | |
<dd> | |
<p>The <a href="#solar_designs">solar design</a> the payment was made for</p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>solar_project</dt> | |
<dd> | |
<p>The <a href="#solar_projects">solar project</a> the design belongs to</p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request body | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "events", | |
"id": "ea74emgKgNENgRln", | |
"attributes": { | |
"name": "gateway_payments.created", | |
"created_at": "2023-06-05T22:25:03+00:00" | |
}, | |
"relationships": { | |
"solar_design": { | |
"data": null | |
}, | |
"solar_project": { | |
"data": null | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/events/ea74emgKgNENgRln" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="opportunities"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#opportunities">Opportunities</a> | |
<span class="tag-preview">Preview</span> | |
</h1> | |
<div class="content"> | |
<strong>This API is in preview and breaking changes may be made without warning.</strong> | |
<p>Opportunities are the most important entity in your sales process. An | |
opportunity is a <strong>chance to earn revenue</strong>. 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.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#opportunities.store-form"> | |
<span class="http-method" data-http-method="POST">POST</span> | |
<span class="route">/v1/opportunities_form</span> | |
</a> | |
</li> | |
<li> | |
<a href="#opportunities.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/opportunities</span> | |
</a> | |
</li> | |
<li> | |
<a href="#opportunities.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/opportunities/{opportunity}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="opportunity_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#opportunity_object">The opportunity object</a></h1> | |
<div class="content"> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">title</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>Short name to identify this lead in the UI.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">value</dt> | |
<dd class="attr__type"> integer</dd> | |
<dd class="attr__desc"><p>The value (in cents) this opportunity is estimated to be worth.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">source</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p>Information about where this opportunity originated from.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">source.name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>If this opportunity comes from a third-party provider, we recommend using the domain of that provider. Beyond that, you may choose your own source names.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">source.linked_id</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The ID of the opportunity within the source system, if applicable.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">custom_property_values</dt> | |
<dd class="attr__type"> object</dd> | |
<dd class="attr__desc"><p>Custom properties can be added in your team settings. Opportunities are allowed to have data in this object not configured in settings; in the web UI, these 'unstructured' custom properties will be hidden by default.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">in_app_url</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>A link to open this opportunity in the web application.</p></dd> | |
</div> | |
</dl> | |
<h2>Relationships</h2> | |
<dl> | |
<dt>owner</dt> | |
<dd> | |
<p>A single <a href="#users">user</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>primary_contact</dt> | |
<dd> | |
<p>A single <a href="#contacts">contact</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>users</dt> | |
<dd> | |
<p>A collection of <a href="#users">users</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>pipeline</dt> | |
<dd> | |
<p>A single <a href="#pipelines">pipeline</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>pipeline_stage</dt> | |
<dd> | |
<p>A single <a href="#pipeline_stages">pipeline stage</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>status</dt> | |
<dd> | |
<p>A single <a href="#lead_statuses">lead status</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>solar_projects</dt> | |
<dd> | |
<p>A collection of <a href="#solar_projects">solar projects</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>tags</dt> | |
<dd> | |
<p>A collection of <a href="#tags">tags</a></p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "opportunities", | |
"id": "qO472OCiw", | |
"attributes": { | |
"title": "Beach house solar + battery", | |
"value": null, | |
"source": { | |
"name": "solarleads.com.au", | |
"linked_id": null | |
}, | |
"custom_property_values": { | |
"purchase_timeframe": "Immediately" | |
}, | |
"custom_properties_meta": { | |
"visibility": {} | |
}, | |
"created_at": "2020-06-18T15:04:10+00:00", | |
"updated_at": "2020-07-01T16:09:40+00:00", | |
"stage_updated_at": null, | |
"status_updated_at": null, | |
"confidence": null, | |
"notes": "", | |
"in_app_url": "https://app.getpylon.com/platform/leads/qO472OCiw", | |
"current_pipeline_name": null | |
}, | |
"relationships": { | |
"owner": { | |
"data": null | |
}, | |
"primary_contact": { | |
"data": { | |
"type": "contacts", | |
"id": "yP8wF8zwzg" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/contacts/yP8wF8zwzg" | |
} | |
}, | |
"subscribed_users": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/users?filter%5Bsubscribed_opportunity%5D=qO472OCiw" | |
} | |
}, | |
"pipeline": { | |
"data": null | |
}, | |
"pipeline_stage": { | |
"data": null | |
}, | |
"status": { | |
"data": { | |
"type": "lead_statuses", | |
"id": "QVzPyJWEkw" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/lead_statuses/QVzPyJWEkw" | |
} | |
}, | |
"solar_projects": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects?filter%5Bopportunity%5D=qO472OCiw" | |
} | |
}, | |
"tags": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/tags?filter%5Bopportunity%5D=qO472OCiw" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/opportunities/qO472OCiw" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="opportunities.store-form"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#opportunities">Opportunities ›</a></span> | |
<a data-copyable="" href="#opportunities.store-form">Create leads</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
<code>write</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<p>When integrating with our CRM via the API, use this endpoint to send new | |
leads into the system. It allows you to quickly and easily integrate with | |
your website or other custom sources of sales opportunities.</p> | |
Related guide: <a class="link-to-guide" href="/docs/guides/create-leads-with-the-api" target="_blank"> | |
learn how to create leads with the Pylon API | |
</a> | |
<h2>Request body</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">first_name</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p>The contact person's first name. Note this is the <strong>only</strong> mandatory property.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">last_name</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p>The contact person's surname.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">email_address</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">phone_number</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">phone_number_locale</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at most 2</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">status</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Name of status this lead will be assigned to.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">title</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p>Title of the new lead to create. If not given, a title will be created automatically.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">source_name</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p>How was this lead discovered? If missing, <code>"not provided"</code> will be used</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">source_linked_id</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p>ID of the lead in its source system, for example a third party lead generation website.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">tags</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Comma separated list of tag names. Tags that are not already in the system will be created.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">notes</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at most 65535</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">custom_property_values</dt> | |
<dd class="attr__type"> optional object</dd> | |
<dd class="attr__desc"><p>This object should contain all custom properties you've defined. | |
You may pass in properties with names that you have not yet defined in your settings. | |
See <a href="#custom-properties">custom properties</a> for more details.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">address</dt> | |
<dd class="attr__type"> optional object</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">address.line1</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p>The house number, street name, etc.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">address.line2</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p>Suite or unit number, etc.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">address.city</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">address.state</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">address.zip</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">address.country</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__constraints">Length at most 250</dd> <dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">raw_address</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>If you don't have address components, provide the entire address here and we'll attempt to parse it for you.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pipeline</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Name of pipeline this lead will be inserted into. If provided, lead will be marked as converted to a deal</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pipeline_stage</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Name of pipeline stage this lead will be inserted into. If provided, lead will be marked as converted to a deal</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">value</dt> | |
<dd class="attr__type"> optional integer</dd> | |
<dd class="attr__desc"><p>Estimated value of the opportunity in dollars.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">confidence</dt> | |
<dd class="attr__type"> optional integer</dd> | |
<dd class="attr__desc"><p>confidence level between 0 and 100. Defaults to null if unknown</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">owner</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Email of user to assign this lead to. If not given, the lead will not have an owner.</p></dd> | |
</div> | |
</dl> | |
<h2>Returns</h2> | |
An instance of the <a href="#opportunity_object">opportunity object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">echo '{ | |
"first_name": "Sally", | |
"last_name": "Rooney", | |
"phone_number": "0400 000 111", | |
"status": "Uncontacted", | |
"source_name": "solarleads.com.au", | |
"source_linked_id": "SL-1234", | |
"notes": "Also interested to hear about heat pumps please", | |
"address": { | |
"line1": "42 Wallaby Way", | |
"line2": "Unit 3", | |
"city": "Sydney", | |
"state": "New South Wales", | |
"zip": "2000", | |
"country": "Australia" | |
}, | |
"custom_property_values": { | |
"pylon.solar:nmi_number": "11112222", | |
"purchase_timeframe": "Immediately" | |
}, | |
"tags": "special promotion,heat pump", | |
"owner": "[email protected]" | |
}' | curl https://api.getpylon.com/v1/opportunities_form \ | |
--request POST \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json" \ | |
--header "Content-Type: application/json" \ | |
--data @-</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "opportunities", | |
"id": "aNAbsWuHBA", | |
"attributes": { | |
"title": "Beach house solar + battery", | |
"value": null, | |
"source": { | |
"name": "solarleads.com.au", | |
"linked_id": null | |
}, | |
"custom_property_values": { | |
"purchase_timeframe": "Immediately" | |
}, | |
"custom_properties_meta": { | |
"visibility": {} | |
}, | |
"created_at": "2020-06-18T15:04:10+00:00", | |
"updated_at": "2020-07-01T16:09:40+00:00", | |
"stage_updated_at": null, | |
"status_updated_at": null, | |
"confidence": null, | |
"notes": "", | |
"in_app_url": "https://app.getpylon.com/platform/leads/aNAbsWuHBA", | |
"current_pipeline_name": null | |
}, | |
"relationships": { | |
"owner": { | |
"data": null | |
}, | |
"primary_contact": { | |
"data": { | |
"type": "contacts", | |
"id": "5sTicxITVg" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/contacts/5sTicxITVg" | |
} | |
}, | |
"subscribed_users": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/users?filter%5Bsubscribed_opportunity%5D=aNAbsWuHBA" | |
} | |
}, | |
"pipeline": { | |
"data": null | |
}, | |
"pipeline_stage": { | |
"data": null | |
}, | |
"status": { | |
"data": { | |
"type": "lead_statuses", | |
"id": "oIngNXr4QQ" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/lead_statuses/oIngNXr4QQ" | |
} | |
}, | |
"solar_projects": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects?filter%5Bopportunity%5D=aNAbsWuHBA" | |
} | |
}, | |
"tags": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/tags?filter%5Bopportunity%5D=aNAbsWuHBA" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/opportunities/aNAbsWuHBA" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="opportunities.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#opportunities">Opportunities ›</a></span> | |
<a data-copyable="" href="#opportunities.index">List opportunities</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Query parameters</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">sort</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"position"</code> | |
<code class="attr__enum-value">"-position"</code> | |
<code class="attr__enum-value">"created_at"</code> | |
<code class="attr__enum-value">"-created_at"</code> | |
<code class="attr__enum-value">"updated_at"</code> | |
<code class="attr__enum-value">"-updated_at"</code> | |
<code class="attr__enum-value">"value"</code> | |
<code class="attr__enum-value">"-value"</code> | |
<code class="attr__enum-value">"confidence"</code> | |
<code class="attr__enum-value">"-confidence"</code> | |
<code class="attr__enum-value">"lead_status_id"</code> | |
<code class="attr__enum-value">"-lead_status_id"</code> | |
<code class="attr__enum-value">"zip"</code> | |
<code class="attr__enum-value">"-zip"</code> | |
<code class="attr__enum-value">"source_type"</code> | |
<code class="attr__enum-value">"-source_type"</code> | |
<code class="attr__enum-value">"owner_id"</code> | |
<code class="attr__enum-value">"-owner_id"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter</dt> | |
<dd class="attr__type"> optional object</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[owner]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>List opportunities belonging to the given owner(s). May be a comma-separated string of multiple <a href="#users">user</a> IDs.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[is_a]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Filter opportunities by their 'kind'.</p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"lead"</code> | |
<code class="attr__enum-value">"deal"</code> | |
<code class="attr__enum-value">"lost-deal"</code> | |
<code class="attr__enum-value">"any"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[lead_status]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at least 1</dd> <dd class="attr__desc"><p>List opportunities belonging to the given <a href="#lead_statuses">lead_status</a>(es). May be a comma-separated string of multiple IDs.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[pipeline_stage]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at least 1</dd> <dd class="attr__desc"><p>List opportunities belonging to the given <a href="#pipeline_stages">pipeline_stage<a>(s). May be a comma-separated string of multiple IDs.</a></a></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[pipeline]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Length at least 1</dd> <dd class="attr__desc"><p>List opportunities belonging to the given <a href="#pipelines">pipeline</a>(s). May be a comma-separated string of multiple IDs.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[id]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>List opportunities with only these <code>id</code>s. May be a comma-separated string of multiple IDs.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[created_at.gte]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>List opportunities created on or after the given timestamp.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[created_at.lt]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>List opportunities created before the given timestamp.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[updated_at.gte]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>List opportunities updated on or after the given timestamp.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[updated_at.lt]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__constraints">Format: date-time</dd> <dd class="attr__desc"><p>List opportunities updated before the given timestamp.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[tags.all]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>List opportunities that have all the specified tags. May be a comma-separated list of <a href="#tags">tag</a> IDs.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[tags.any]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>List opportunities that have any of the specified tags. May be a comma-separated list of <a href="#tags">tag</a> IDs.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[source.name]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>List opportunities belonging to the given source.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">filter[address.zip]</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>List opportunities belonging to the postcode.</p></dd> | |
</div> | |
</dl> | |
<h2>Returns</h2> | |
A collection of <a href="#opportunity_object">opportunity objects</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/opportunities \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="opportunities.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#opportunities">Opportunities ›</a></span> | |
<a data-copyable="" href="#opportunities.show">Show opportunity</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<p>Along with the body content, this response will return a <code>Link</code> | |
header pointing to the in-app URL of the opportunity. Its <code>in-app</code> rel | |
can be used to identify it. For example:</p> | |
<pre><code class="language-http">Link: <https://observer.getpylon.com/platform/opportunities/qpZ72TFx>; rel="in-app alternate"; type="text/html"</code></pre> | |
<h2>Returns</h2> | |
An instance of the <a href="#opportunity_object">opportunity object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/opportunities/$OPPORTUNITY \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "opportunities", | |
"id": "GbPk5ekI1A", | |
"attributes": { | |
"title": "Beach house solar + battery", | |
"value": null, | |
"source": { | |
"name": "solarleads.com.au", | |
"linked_id": null | |
}, | |
"custom_property_values": { | |
"purchase_timeframe": "Immediately" | |
}, | |
"custom_properties_meta": { | |
"visibility": {} | |
}, | |
"created_at": "2020-06-18T15:04:10+00:00", | |
"updated_at": "2020-07-01T16:09:40+00:00", | |
"stage_updated_at": null, | |
"status_updated_at": null, | |
"confidence": null, | |
"notes": "", | |
"in_app_url": "https://app.getpylon.com/platform/leads/GbPk5ekI1A", | |
"current_pipeline_name": null | |
}, | |
"relationships": { | |
"owner": { | |
"data": null | |
}, | |
"primary_contact": { | |
"data": { | |
"type": "contacts", | |
"id": "jGfRUfLzDQ" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/contacts/jGfRUfLzDQ" | |
} | |
}, | |
"subscribed_users": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/users?filter%5Bsubscribed_opportunity%5D=GbPk5ekI1A" | |
} | |
}, | |
"pipeline": { | |
"data": null | |
}, | |
"pipeline_stage": { | |
"data": null | |
}, | |
"status": { | |
"data": { | |
"type": "lead_statuses", | |
"id": "AEsR4H8a3Q" | |
}, | |
"links": { | |
"related": "https://api.getpylon.com/v1/lead_statuses/AEsR4H8a3Q" | |
} | |
}, | |
"solar_projects": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/solar_projects?filter%5Bopportunity%5D=GbPk5ekI1A" | |
} | |
}, | |
"tags": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/tags?filter%5Bopportunity%5D=GbPk5ekI1A" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/opportunities/GbPk5ekI1A" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="custom-properties"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#custom-properties">Custom properties</a> | |
</h1> | |
<div class="content"> | |
<p> | |
When creating an opportunity via the <a href="#opportunities.store-form">lead form</a>, you may provide custom properties. | |
These properties may be used by your own software integrations to store and process data that's meaningful to you. | |
</p> | |
<p> | |
You may choose how to name and structure your custom properties, but custom properties must adhere to the following restrictions: | |
<ul class="bulleted-list"> | |
<li><p>Custom property values may not be arrays or objects, only primitive types (strings, numbers, booleans and null).</p></li> | |
<li><p>Custom properties beginning with <code>getpylon.com:</code> and <code>pylon.solar:</code> are reserved for internal use. See below.</p></li> | |
</ul> | |
</p> | |
<p> | |
Custom properties whose name is prefixed by a domain we control are <em>reserved</em>. | |
This means we control their definitions, and may validate them in more strict ways than other custom properties that are defined by your organisation. | |
We also prevent you from providing custom properties we have not defined. | |
</p> | |
<p> | |
For example, <code>pylon.solar:address</code> may be used as described below, but <code>pylon.solar:something</code> may not be, because it is <em>not</em> defined below. | |
However, you may use the custom properties <code>something</code> or <code>yourdomain.com:something</code>, because these properties are not prefixed by one of our domains. | |
</p> | |
<p> | |
We recommend using domain prefixes in order to avoid naming conflicts between custom properties which come from different data sources. | |
For example, our lead source integrations prefix custom properties with the domain of the lead provider so that you can distinguish them. | |
</p> | |
<h2>Reserved custom properties</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:raw_address</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>When a data source doesn't break down the address into components, a "raw address" can be used, which is simply verbatim text intended to represent an address. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:address</dt> | |
<dd class="attr__type"> optional object</dd> | |
<dd class="attr__desc"><p>The full address of the opportunity. When using Pylon CRM for solar sales, each opportunity should correspond to one solar project. Therefore, this address should be where the solar project will be installed. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:address.line1</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The house number, street name, etc.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:address.line2</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>Suite or unit number, etc.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:address.city</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:address.state</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:address.zip</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:address.country</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:coordinates</dt> | |
<dd class="attr__type"> optional object</dd> | |
<dd class="attr__desc"><p>A coordinate point in decimal degrees, in the WGS84 coordinate system. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:coordinates.latitude</dt> | |
<dd class="attr__type"> number</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:coordinates.longitude</dt> | |
<dd class="attr__type"> number</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:customer_type</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:roof_material</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:number_of_storeys</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:power_phases</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:energy_retailer</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:electricity_bill</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:installer_name</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:nmi_number</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:meter_number</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:energy_distributor</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">pylon.solar:solar_vic_application_number</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>Default property created for solar CRM customers. | |
</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">getpylon.com:status_name</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p><em>Used with legacy CRM integration.</em> Name of the status in Pylon CRM the opportunity should be assigned to.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">getpylon.com:address_single_line</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p><em>Used with legacy CRM integration.</em> Address of the opportunity as a single string.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">getpylon.com:label_names</dt> | |
<dd class="attr__type"> optional array of strings</dd> | |
<dd class="attr__desc"><p><em>Used with legacy CRM integration.</em> Nmaes of labels that should be attached to the created opportunity.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">getpylon.com:label_names[*]</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p></p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">getpylon.com:source_rejection_link</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p><em>Used with legacy CRM integration.</em> Link where a salesperson can to go reject this lead from its provider.</p></dd> | |
</div> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example of <a href="#opportunities.store-form">creating an opportunity</a> with custom properties | |
</header> | |
<pre class="box__content"><code class="language-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 | |
} | |
} | |
}</code></pre> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="contacts"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#contacts">Contacts</a> | |
<span class="tag-preview">Preview</span> | |
</h1> | |
<div class="content"> | |
<strong>This API is in preview and breaking changes may be made without warning.</strong> | |
<p>Each Contact in your account represents a natural human who may be a customer of yours, | |
a contractor, partner or any other person who you have contact with. Contacts are created | |
automatically when you add new <a href="#opportunities">Opportunities</a> to the CRM.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#contacts.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/contacts/{contact}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="contact_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#contact_object">The contact object</a></h1> | |
<div class="content"> | |
<h2>Relationships</h2> | |
<dl> | |
<dt>leads</dt> | |
<dd> | |
<p>A collection of <a href="#leads">leads</a></p> | |
</dd> | |
</dl> | |
<dl> | |
<dt>companies</dt> | |
<dd> | |
<p>A collection of <a href="#companies">companies</a></p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "contacts", | |
"id": "84InJW7Hag", | |
"attributes": { | |
"title": "Mr", | |
"first_name": "Nelson", | |
"last_name": "Zheng", | |
"phone_numbers": [], | |
"email_addresses": [ | |
{ | |
"key": "Empoygx2He", | |
"email": "[email protected]", | |
"intended_use": "work" | |
} | |
], | |
"street_addresses": [], | |
"notes": "", | |
"avatar_url": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OCA0OCI+CiAgICAgICAgICAgIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgZmlsbD0iI2ZmNmQwMCI+PC9yZWN0PgogICAgICAgICAgICA8dGV4dCB4PSIyNCIgeT0iMjYiIGZpbGw9IndoaXRlIiBzdHJva2U9IndoaXRlIiBmb250LXNpemU9IjE4cHgiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGRvbWluYW50LWJhc2VsaW5lPSJtaWRkbGUiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBsZXR0ZXItc3BhY2luZz0iMSI+Tlo8L3RleHQ+CiAgICAgICAgPC9zdmc+", | |
"created_at": "2020-06-18T15:04:10+00:00", | |
"updated_at": "2020-07-01T16:09:40+00:00" | |
}, | |
"relationships": { | |
"leads": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/contacts/84InJW7Hag/leads" | |
} | |
}, | |
"companies": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/contacts/84InJW7Hag/companies" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/contacts/84InJW7Hag" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="contacts.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#contacts">Contacts ›</a></span> | |
<a data-copyable="" href="#contacts.show">Show contact</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
An instance of the <a href="#contact_object">contact object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/contacts/$CONTACT \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "contacts", | |
"id": "TU33ml9Nug", | |
"attributes": { | |
"title": "Mr", | |
"first_name": "Nelson", | |
"last_name": "Zheng", | |
"phone_numbers": [], | |
"email_addresses": [ | |
{ | |
"key": "YoAk6HsrEn", | |
"email": "[email protected]", | |
"intended_use": "work" | |
} | |
], | |
"street_addresses": [], | |
"notes": "", | |
"avatar_url": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OCA0OCI+CiAgICAgICAgICAgIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgZmlsbD0iI2ZmNmQwMCI+PC9yZWN0PgogICAgICAgICAgICA8dGV4dCB4PSIyNCIgeT0iMjYiIGZpbGw9IndoaXRlIiBzdHJva2U9IndoaXRlIiBmb250LXNpemU9IjE4cHgiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGRvbWluYW50LWJhc2VsaW5lPSJtaWRkbGUiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBsZXR0ZXItc3BhY2luZz0iMSI+Tlo8L3RleHQ+CiAgICAgICAgPC9zdmc+", | |
"created_at": "2020-06-18T15:04:10+00:00", | |
"updated_at": "2020-07-01T16:09:40+00:00" | |
}, | |
"relationships": { | |
"leads": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/contacts/TU33ml9Nug/leads" | |
} | |
}, | |
"companies": { | |
"data": [], | |
"links": { | |
"related": "https://api.getpylon.com/v1/contacts/TU33ml9Nug/companies" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/contacts/TU33ml9Nug" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="lead_statuses"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#lead_statuses">Lead statuses</a> | |
<span class="tag-preview">Preview</span> | |
</h1> | |
<div class="content"> | |
<strong>This API is in preview and breaking changes may be made without warning.</strong> | |
<p>Lead statuses represent the possible states an <a href="#opportunities">Opportunity</a> may be in while it is a Lead, | |
before being converted to a Deal and placed in a Pipeline. Statuses should be seen as "un-ordered", | |
not necessarily following a specific flow direction. This is in contrast to the <a href="#pipeline_stages">stages</a> | |
in a pipeline.</p> | |
<p>You can edit your team's Lead statuses in your <a href="/settings/crm/leads" target="_blank">settings</a>.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#lead_statuses.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/lead_statuses</span> | |
</a> | |
</li> | |
<li> | |
<a href="#lead_statuses.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/lead_statuses/{lead_status}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="lead_status_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#lead_status_object">The lead status object</a></h1> | |
<div class="content"> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">title</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The name of this status which is used throughout the application.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">order</dt> | |
<dd class="attr__type"> number</dd> | |
<dd class="attr__desc"><p>This is the cosmetic ordering of statuses in the interface.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">kind</dt> | |
<dd class="attr__type"> optional string</dd> | |
<dd class="attr__desc"><p>One of <code>active</code> or <code>lost</code>.</p></dd> | |
</div> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "lead_statuses", | |
"id": "3M3ZBHspGQ", | |
"attributes": { | |
"title": "Uncontacted", | |
"order": 3, | |
"kind": null, | |
"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/lead_statuses/3M3ZBHspGQ" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="lead_statuses.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#lead_statuses">Lead statuses ›</a></span> | |
<a data-copyable="" href="#lead_statuses.index">List lead statuses</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
A collection of <a href="#lead_status_object">lead status objects</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/lead_statuses \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="lead_statuses.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#lead_statuses">Lead statuses ›</a></span> | |
<a data-copyable="" href="#lead_statuses.show">Show lead status</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
An instance of the <a href="#lead_status_object">lead status object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/lead_statuses/$LEAD_STATUS \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "lead_statuses", | |
"id": "NgzDdJ9P6A", | |
"attributes": { | |
"title": "Uncontacted", | |
"order": 3, | |
"kind": null, | |
"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/lead_statuses/NgzDdJ9P6A" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="pipelines"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#pipelines">Pipelines</a> | |
<span class="tag-preview">Preview</span> | |
</h1> | |
<div class="content"> | |
<strong>This API is in preview and breaking changes may be made without warning.</strong> | |
<p>Pipelines represent the different flows your sales can go through. Each Pipeline should | |
represent a different kind of sale: for example, you might have different Pipelines for residential | |
and commercial sales, if your process is different. You may also have a Pipeline to track installations.</p> | |
<p>You can edit your team's pipelines in your <a href="/settings/crm/leads" target="_blank">settings</a>.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#pipelines.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/pipelines</span> | |
</a> | |
</li> | |
<li> | |
<a href="#pipelines.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/pipelines/{pipeline}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="pipeline_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#pipeline_object">The pipeline object</a></h1> | |
<div class="content"> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">title</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The name of this pipeline which is used throughout the application.</p></dd> | |
</div> | |
</dl> | |
<h2>Relationships</h2> | |
<dl> | |
<dt>pipeline_stages</dt> | |
<dd> | |
<p>A collection of <a href="#pipeline_stages">pipeline stages</a></p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "pipelines", | |
"id": "SNGLtlL6g", | |
"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": "pglbEfrmw" | |
} | |
], | |
"links": { | |
"related": "https://api.getpylon.com/v1/pipeline_stages?filter%5Bpipeline%5D=SNGLtlL6g" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/pipelines/SNGLtlL6g" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="pipelines.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#pipelines">Pipelines ›</a></span> | |
<a data-copyable="" href="#pipelines.index">List pipelines</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
A collection of <a href="#pipeline_object">pipeline objects</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/pipelines \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="pipelines.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#pipelines">Pipelines ›</a></span> | |
<a data-copyable="" href="#pipelines.show">Show pipeline</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
An instance of the <a href="#pipeline_object">pipeline object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/pipelines/$PIPELINE \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "pipelines", | |
"id": "scfPTHitSw", | |
"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": "ESumGTrJQ" | |
} | |
], | |
"links": { | |
"related": "https://api.getpylon.com/v1/pipeline_stages?filter%5Bpipeline%5D=scfPTHitSw" | |
} | |
} | |
}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/pipelines/scfPTHitSw" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="pipeline_stages"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#pipeline_stages">Pipeline stages</a> | |
<span class="tag-preview">Preview</span> | |
</h1> | |
<div class="content"> | |
<strong>This API is in preview and breaking changes may be made without warning.</strong> | |
<p>Pipelines are made up of many stages, ordered logically to mirror your business process. | |
Deals should proceed left-to-right through the stages in a Pipeline as they proceed towards | |
completion.</p> | |
<p>You can edit your team's pipelines in your <a href="/settings/crm/leads" target="_blank">settings</a>.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#pipeline_stages.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/pipeline_stages</span> | |
</a> | |
</li> | |
<li> | |
<a href="#pipeline_stages.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/pipeline_stages/{pipeline_stage}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="pipeline_stage_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#pipeline_stage_object">The pipeline stage object</a></h1> | |
<div class="content"> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">title</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The name of this stage, used throughout the application.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">order</dt> | |
<dd class="attr__type"> integer</dd> | |
<dd class="attr__desc"><p>The place within the pipeline this stage is ordered. Stages should be ordered logically.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">kind</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>Different kinds of stage are handled differently by the application. Most stages should be <code>active</code>.</p></dd> | |
<dd class="attr__enum"> | |
<p> | |
<span class="attr__enum-text">Allowed values:</span> | |
<code class="attr__enum-value">"active"</code> | |
<code class="attr__enum-value">"won"</code> | |
<code class="attr__enum-value">"lost"</code> | |
</p> | |
</dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">color</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>Hexadecimal colour string used to accent this stage in the application.</p></dd> | |
</div> | |
</dl> | |
<h2>Relationships</h2> | |
<dl> | |
<dt>pipeline</dt> | |
<dd> | |
<p>A single <a href="#pipelines">pipeline</a></p> | |
</dd> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "pipeline_stages", | |
"id": "ETF6Uv7Ymg", | |
"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/ETF6Uv7Ymg" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="pipeline_stages.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#pipeline_stages">Pipeline stages ›</a></span> | |
<a data-copyable="" href="#pipeline_stages.index">List pipeline stages</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
A collection of <a href="#pipeline_stage_object">pipeline stage objects</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/pipeline_stages \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="pipeline_stages.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#pipeline_stages">Pipeline stages ›</a></span> | |
<a data-copyable="" href="#pipeline_stages.show">Show pipeline stage</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
An instance of the <a href="#pipeline_stage_object">pipeline stage object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/pipeline_stages/$PIPELINE_STAGE \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "pipeline_stages", | |
"id": "mzYZZc6hw", | |
"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/mzYZZc6hw" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<article> | |
<article> | |
<section class="resource-header" id="tags"> | |
<div class="docs-column"> | |
<h1> | |
<a data-copyable="" href="#tags">Tags</a> | |
<span class="tag-preview">Preview</span> | |
</h1> | |
<div class="content"> | |
<strong>This API is in preview and breaking changes may be made without warning.</strong> | |
<p>Tags are short pieces of text which can be attached to <a href="#opportunities">Opportunities</a> to | |
help you organise your sales process. Tags should be used instead of <a href="#custom-properties">custom properties</a> when the piece of | |
information relates to your internal process, not the customer themselves.</p> | |
<p>For example, "has a pool" could be a yes/no custom property, because it relates to the customer.</p> | |
</div> | |
<aside class="illustration"> | |
<div class="box"> | |
<header class="box__header">Endpoints</header> | |
<div class="box__content"> | |
<ul class="route-table"> | |
<li> | |
<a href="#tags.index"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/tags</span> | |
</a> | |
</li> | |
<li> | |
<a href="#tags.show"> | |
<span class="http-method" data-http-method="GET">GET</span> | |
<span class="route">/v1/tags/{tag}</span> | |
</a> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<section id="tag_object"> | |
<div class="docs-column"> | |
<h1><a data-copyable="" href="#tag_object">The tag object</a></h1> | |
<div class="content"> | |
<h2>Attributes</h2> | |
<dl> | |
<div class="attr"> | |
<dt class="attr__name">title</dt> | |
<dd class="attr__type"> string</dd> | |
<dd class="attr__desc"><p>The cosmetic name of this tag.</p></dd> | |
</div> | |
<div class="attr"> | |
<dt class="attr__name">slug</dt> | |
<dd class="attr__type"> integer</dd> | |
<dd class="attr__desc"><p>Machine-usable identifier of this tag.</p></dd> | |
</div> | |
</dl> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header">Example object</header> | |
<pre class="box__content"><code class="language-json">{ | |
"type": "tags", | |
"id": "bxYu5BUWVg", | |
"attributes": { | |
"title": "Battery retrofit", | |
"slug": "battery-retrofit" | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/tags/bxYu5BUWVg" | |
}, | |
"meta": {} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="tags.index"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#tags">Tags ›</a></span> | |
<a data-copyable="" href="#tags.index">List tags</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
A collection of <a href="#tag_object">tag objects</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/tags \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
<hr/> | |
<section id="tags.show"> | |
<div class="docs-column"> | |
<h1> | |
<span class="action-mobile-breadcrumb"><a href="#tags">Tags ›</a></span> | |
<a data-copyable="" href="#tags.show">Show tag</a> | |
<a class="action-permissions" href="#authentication"> | |
<span class="svg-icon" title="Permissions required by this endpoint"> | |
<svg height="18" viewbox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0V0z" fill="none"></path><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"></path></svg> | |
</span> | |
<code>read</code> | |
</a> | |
</h1> | |
<div class="content"> | |
<h2>Returns</h2> | |
An instance of the <a href="#tag_object">tag object</a> | |
</div> | |
<aside class="illustration"> | |
<div class="sticky"> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example request | |
</header> | |
<pre class="box__content"><code class="language-bash">curl https://api.getpylon.com/v1/tags/$TAG \ | |
--header "Authorization: Bearer $TOKEN" \ | |
--header "Accept: application/vnd.api+json"</code></pre> | |
</div> | |
<div class="box box--code"> | |
<header class="box__header"> | |
Example response | |
</header> | |
<pre class="box__content"><code class="language-json">{ | |
"data": { | |
"type": "tags", | |
"id": "VvGunpIgw", | |
"attributes": { | |
"title": "Battery retrofit", | |
"slug": "battery-retrofit" | |
}, | |
"relationships": {}, | |
"links": { | |
"self": "https://api.getpylon.com/v1/tags/VvGunpIgw" | |
} | |
} | |
}</code></pre> | |
</div> | |
</div> | |
</aside> | |
</div> | |
</section> | |
</article> | |
</article> | |
<hr/> | |
<footer id="docs-footer"> | |
</footer> | |
</main> | |
</div> | |
<script> | |
window.addEventListener('load', observeSections); | |
let visibleSections = {}; | |
let shouldUpdateAnchor = false; | |
function observeSections() { | |
window.addEventListener('hashchange', function() { | |
updateTableOfContents(window.location.hash); | |
}); | |
try { | |
let observer = new IntersectionObserver(intersectionCallback, {}); | |
let sectionsWithIds = document.querySelectorAll('section[id]'); | |
for (let i = 0; i < sectionsWithIds.length; i += 1) { | |
observer.observe(sectionsWithIds[i]); | |
} | |
window.addEventListener('scroll', function() { shouldUpdateAnchor = true; }); | |
setInterval(function() { | |
if (shouldUpdateAnchor) { | |
updateCurrentAnchor(); | |
shouldUpdateAnchor = false; | |
} | |
}, 150); | |
} catch(e) { | |
// SILENCE | |
} | |
} | |
function intersectionCallback(entries, observer) { | |
entries.forEach(function(entry) { | |
if (!entry.isIntersecting) { | |
delete visibleSections[entry.target.id]; | |
return; | |
} | |
visibleSections[entry.target.id] = entry.target; | |
}); | |
shouldUpdateAnchor = true; | |
} | |
function updateCurrentAnchor() { | |
let scrollTop = window.pageYOffset; | |
if (scrollTop === 0) { | |
// Remove the hash | |
history.replaceState(undefined, undefined, location.pathname + location.search); | |
updateMobileNav(null); | |
return; | |
} | |
let ids = Object.keys(visibleSections); | |
let sortedIds = ids.filter(function(id) { | |
let top = visibleSections[id].getBoundingClientRect().top; | |
// Limit to checking 20px below the window top so we don't update too | |
// eagerly to sections further down the page. | |
return top < 20; | |
}).sort(function(a, b) { | |
let topA = Math.abs(visibleSections[a].getBoundingClientRect().top); | |
let topB = Math.abs(visibleSections[b].getBoundingClientRect().top); | |
if (topA > topB) { | |
return 1; | |
} | |
if (topA < topB) { | |
return -1; | |
} | |
return 0; | |
}); | |
let bestId = sortedIds[0]; | |
if (bestId) { | |
history.replaceState(undefined, undefined, "#" + bestId); | |
updateTableOfContents(bestId); | |
updateMobileNav(bestId); | |
} | |
} | |
function updateTableOfContents(hash) { | |
let sidebar = document.getElementById('docs-sidebar-nav'); | |
if (!sidebar) { | |
return; | |
} | |
let active = sidebar.querySelector('.active'); | |
if (active) { | |
active.classList.remove('active'); | |
} | |
let link = sidebar.querySelector('[href="#' + hash + '"]'); | |
if (link) { | |
link.classList.add('active'); | |
} | |
} | |
function updateMobileNav(hash) { | |
let selector = document.getElementById('mobile-nav-select'); | |
if (!selector) { | |
return; | |
} | |
selector.value = hash || ''; | |
} | |
</script> | |
<script> | |
function toggleInvert() { | |
document.getElementById('docs-app').classList.toggle('docs-invert'); | |
} | |
document.addEventListener('click', copyLinkTargets); | |
function copyLinkTargets(event) { | |
if (event.target.dataset.copyable === undefined) { | |
return; | |
} | |
if (!event.target.href) { | |
return; | |
} | |
setTimeout(function() { | |
try { | |
navigator.clipboard.writeText(location.href); | |
} catch(e) { | |
// SILENCE | |
} | |
}, 1); | |
} | |
function mobileNavSelected(v) { | |
window.location.hash = v; | |
} | |
</script> | |
</body> | |
</html> | |
Process finished with exit code 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment